Forums » Bugs & Problems Search

inconsistent command line handling for example scripts New Reply

Author Post
Posts: 6
Registered: Mar 03, 2009

Hi,

I just tried out reverse.py, but I forgot to put "beats" or "segments", so I had: python reverse.py input.mp3 output.mp3

But reverse.py uses negative integers for sys.argv, as in line 44: toReverse = sys.argv[-3]

and so when i run the code: toReverse == 'reverse.py' (i.e. the name of the script instead of 'beats' or 'segments')

Now, that's ok, because main() checks if toReverse is 'beats' or 'segments' - but only AFTER calling audio.LocalAudioFile() (which involves a wait)

But, in quanta.py, line 66, if the user supplies a wrong value, then in main(), lines 46 and 50 we have a bug, because the variable 'quanta' wont't exist.

Another problem is that some of the scripts are called in this way e.g.: