mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 08:33:36 +02:00
Fix \n shenanigans in command output.
This commit is contained in:
committed by
Paul Licameli
parent
65c160212e
commit
510f68e9ad
@@ -39,7 +39,7 @@ print( "-- File to read from has now been opened too\r\n" )
|
||||
|
||||
|
||||
def sendCommand( command ) :
|
||||
print( "Send: >>> "+command )
|
||||
print( "Send: >>> \n"+command )
|
||||
tofile.write( command + EOL )
|
||||
tofile.flush()
|
||||
|
||||
@@ -55,7 +55,7 @@ def getResponse() :
|
||||
def doCommand( command ) :
|
||||
sendCommand( command )
|
||||
response = getResponse()
|
||||
print( "Rcvd: <<< " + response )
|
||||
print( "Rcvd: <<< \n" + response )
|
||||
return response
|
||||
|
||||
def do( command ) :
|
||||
@@ -63,9 +63,6 @@ def do( command ) :
|
||||
|
||||
def quickTest() :
|
||||
do( 'Help: Command=Help' )
|
||||
do( 'Help: Command="SetTrackInfo"' )
|
||||
do( 'SetPreference: Name=GUI/Theme Value=light Reload=false' )
|
||||
|
||||
|
||||
def setup() :
|
||||
global path
|
||||
@@ -169,25 +166,20 @@ def image8() :
|
||||
# Zoomed in to show points stem-plot
|
||||
def image9() :
|
||||
global path
|
||||
do( 'SetPreference: Name=/GUI/SampleView Value=1 Reload=True')
|
||||
makeMonoTracks(1)
|
||||
do( 'SelectTime: StartTime=0 EndTime=0.003' )
|
||||
do( 'ZoomSel' );
|
||||
do( 'Amplify: Ratio=3.0' )
|
||||
do( 'SetPreference: Name=/GUI/SampleView Value=1 Reload=1')
|
||||
do( 'Screenshot: Path='+path+' CaptureWhat=First_Track' )
|
||||
|
||||
# Zoomed in to show points no stem plot
|
||||
def image10() :
|
||||
def image9and10() :
|
||||
global path
|
||||
do( 'SetPreference: Name=/GUI/SampleView Value=0 Reload=True')
|
||||
makeMonoTracks(1)
|
||||
do( 'SelectTime: StartTime=0 EndTime=0.003' )
|
||||
do( 'ZoomSel' );
|
||||
do( 'Amplify: Ratio=3.0' )
|
||||
image9()
|
||||
do( 'SetPreference: Name=/GUI/SampleView Value=0 Reload=1')
|
||||
do( 'Screenshot: Path='+path+' CaptureWhat=First_Track' )
|
||||
|
||||
|
||||
|
||||
#quickTest()
|
||||
setup()
|
||||
image1()
|
||||
@@ -198,6 +190,5 @@ image5()
|
||||
image6()
|
||||
image7()
|
||||
image8()
|
||||
image9()
|
||||
image10()
|
||||
image9and10()
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# pipe-test.py
|
||||
# pipe_test.py
|
||||
# Tests the audacity pipe. Sends 3 commands.
|
||||
# Keep pipe-test.py short!!
|
||||
# Keep pipe_test.py short!!
|
||||
# You can make more complicated longer tests to test other functionality
|
||||
# or to generate screenshots etc in other scripts.
|
||||
|
||||
@@ -41,7 +41,7 @@ print( "-- File to read from has now been opened too\r\n" )
|
||||
|
||||
|
||||
def sendCommand( command ) :
|
||||
print( "Send: >>> "+command )
|
||||
print( "Send: >>> \n"+command )
|
||||
tofile.write( command + EOL )
|
||||
tofile.flush()
|
||||
|
||||
@@ -57,7 +57,7 @@ def getResponse() :
|
||||
def doCommand( command ) :
|
||||
sendCommand( command )
|
||||
response = getResponse()
|
||||
print( "Rcvd: <<< " + response )
|
||||
print( "Rcvd: <<< \n" + response )
|
||||
return response
|
||||
|
||||
def do( command ) :
|
||||
@@ -65,7 +65,7 @@ def do( command ) :
|
||||
|
||||
def quickTest() :
|
||||
do( 'Help: Command=Help' )
|
||||
do( 'Help: Command="SetTrackInfo"' )
|
||||
do( 'SetPreference: Name=GUI/Theme Value=light Reload=false' )
|
||||
#do( 'Help: Command="GetInfo"' )
|
||||
do( 'SetPreference: Name=GUI/Theme Value=dark Reload=1' )
|
||||
|
||||
quickTest()
|
||||
|
Reference in New Issue
Block a user