[Tutor] pylab Failure
alan.gauld at btinternet.com
Mon Oct 13 09:45:42 CEST 2008
"Wayne Watson" <sierra_mtnview at sbcglobal.net> wrote
> Yes (below), command lines are surprisingly baffling.
> I've used the Win Run cmd lines before, but once one gets
> into using them like DOS, it's a bit weird.
For this kind of thing you want to eliminate as many
variables as posssible so its best to just start up a
basic CMD window with a DOS prompt and run the
program by hand.
To do that start a new DOS session via Start->Run CMD.
- use CD to navigate to the folder with your script.
C:\MyFolder> python myscript.py
That should show any error messages.
- To copy and paste the content of the window go to the
CMD icon at the top left corner and click on it.
- Select the Edit->Mark menu item and use the mouse
to highlight the error text.
- Then Select Edit->Copy to copy it to the clipboard
- Paste it into an email as usual and send to the list.
> Apparently, command line operation means something
> a bit different in python
There are two separate concepts:
1) The OS command line - thats the "DOS prompt"
2) The Python commandline - thats the >>> python
Most IDEs provide a simulation of the python command
prompt but it will behave slightly differently - usually
with added extras. Thats why its best when debugging
strange errors to go back to the vanilla python interpreter
since thats the one that will ultimately run your code
when you double click in Explorer etc.
There are a lot of tweaks that you can do to the XP/Vista
CMD prompt to make it more user friendly (command history,
completion, enhanced editing, cut n paste etc etc) But
they can wait till later.
> bookmarked. I changed the misleading title (Windows FAQ) so that I
> can find it later.
The title is OK - it's the FAQ for Python windows users.
This is one of the FAQs... :-)
More information about the Tutor