Stop Python from exiting upon error in Windows
Tom Plunket
tomas at fancy.org
Tue Jul 15 13:42:00 EDT 2003
John Roth wrote:
> You don't have to put in the full path to Python if you
> rig the command prompt you're using to add Python to
> the path as the initialization command. That trick should
> also let you set up PYTHONPATH for the project.
Alternatively, you just set up a file association (which has
probably already been done for you by the installer) and type in
the filename at the command line:
C:\MyProject> main.py
> I keep a command prompt instance in each project
> directory, pointing to the correct initialization for the
> project.
Wow, I just have a right-click context menu handler for
directories to open a command prompt "right here", and don't
require setup beyond what gets executed in the app. :)
> ...each test module.
Ugh, seperate tests that must be run by a person? Prefer one
test "app" that runs all tests.
> A mouse click to switch windows, three key strokes and voila! the
> test runs (or not, as the case may be.)
I just type "test.py" at the command prompt. :) Usually, I can
abbreviate this to one or two presses of the up-arrow key.
> It avoids any possible problem with PythonWin polluting itself by
> not refreshing everything on a retest.
PythonWin? Debuggers? Craziness. I haven't opened a debugger
for Python in over a month, and the last time I used one was
because I was too lazy to write proper test coverage. ;)
-tom!
--
There's really no reason to send a copy of your
followup to my email address, so please don't.
More information about the Python-list
mailing list