Python 3.3.2 help

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Sep 10 14:15:49 CEST 2014


Hello,

My response is below, interleaved with your comments.

D Moorcroft wrote:

>> Hi,
>> 
>> We are running Python 3.3.2 but pupils are unable to print as they
>> cannot use the command prompt.

What operating system are you using? Windows, Linux, Mac? Something else?

Is it ALL pupils who are unable to print or just some of them?

Which command prompt are they using? Can you reproduce the failure to print?
If so, please tell us the detailed steps you (and the pupils) go through.
E.g. something like this:

"On Windows XP, choose Run from the Start Menu. Type cmd.exe and press
Enter. When the terminal window opens, type print 'Hello World' and Enter."

It will help if you can tell us whether your pupils are using IDLE, IPython,
or the default Python interactive interpreter.

If you can answer these questions, which should have a better chance of
diagnosing the problem.

Further responses below.


>> An error comes up saying printing failed (exit status Oxff).

Based on this, my guess is that your students are accidentally running the
DOS "print" command at the DOS prompt, not Python at all. Perhaps they are
forgetting to run the "python" command first to launch the Python
interpreter, and are running directly in the DOS prompt?

You can check this by reading the command prompt. If it looks like three
greater-than signs >>> then you are running in Python's default
interpreter. If it looks something like this:

C:\Documents and Settings\user\>

or perhaps like this:

C:\>

then you are still inside the DOS command prompt.

Unfortunately, I am not very experienced with Windows, so I cannot tell you
the right method to start Python. I would expect there to be a Start menu
command, perhaps called "IDLE", or "Python", but I'm not sure.


>> Is there any way that we can get users who can't see the command
>> prompt to be able to print?

I'm not entirely sure I understand this question. Can you explain in more
detail?

By the way, as you know there are two meanings of "print" in computing.
There is printing to the screen, and printing to sheets of paper with an
actual printer. Which are you intending?


Regards,



-- 
Steven




More information about the Python-list mailing list