I am using a python package that has a required command line option I am
suppose to use when I invoke my script if I am using their library. Kind of
weird, I know, I love required options! I want to load my class from the
python interpreter for testing purposes. Is there a way to specify options
from the python interpreter? I know that __main__ is run from the command
line, so I should be able to add stuff in an if statement that checks to
see if __main__ was called, and before I run the method start(), which
loads their stuff, but not sure what. I also know that they are using
optparse to check the options.

This is for unit testing, so alternatively if there is a sensible way to
unit test scripts with command line options, that would work, but that
seems trickier. And honestly, the way this package is set up, not sure how
far I'm really going to get with unit testing, at all. :-(

And no, in case you are wondering, I'm not excited about using this
package, but I don't have a choice in the matter. For the curious, here is
the package.

http://memory.psych.upenn.edu/PandaEPL

Thanks,
Maria

Reply via email to