Re: optparse eats $

2011-04-19 Thread Michael Kent
Try this on your *nix command line: echo ">$100"

On a *nix command line, the '$1' part of ">$100" will be seen as 'give me the 
value of the shell variable "1"', and since it has no value, will result in an 
empty string.  So it's not optparse, or Python, because the literal string you 
intend to pass as a command line argument to your Python script never has a 
chance of getting there.  Try escaping the '$' with a backslash on the command 
line.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: skipping one unittest assertion?

2011-05-01 Thread Michael Kent
I agree that each test should test only one 'thing', but it's also true that 
testing one 'thing' sometimes/often involves multiple assertions.  But in the 
OP's case, it does sound like the assertion he wants to skip should be broken 
out into its own test.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: portable multiprocessing code

2011-05-17 Thread Michael Kent
You could also install Python 2.7 on that RedHat machine.  It can be done 
without interfering with the 2.5 that RedHat depends on.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Obtaining a full path name from file

2011-05-24 Thread Michael Kent
If a filename does not contain a path component, os.path.abspath will prepend 
the current directory path onto it.
-- 
http://mail.python.org/mailman/listinfo/python-list