[Tutor] Unable to run Programs on WINXP using Python3

Sivapathasuntha Aruliah Sivapathasuntha.Aruliah at amkor.com
Wed May 12 05:31:19 CEST 2010


Hi
I thank you for your prompt response. I am using WINXP.  Possibly programs 
written for Python 3 may not work in Python2 as informed by you due to 
syntax unmatch. However when I try programs written for Python3 in Python3 
it first comes out with a pop up message "C:\python31\python.exe is not a 
valid Win32 application"  When I click OK prompt on pop up message then on 
dos box it states   "Access is denied."  I tried various types such as 
python, python.exe and without these two also but same pop up message 
comes out. Please advice.







Regards,
Siva
Test Equipment Engineering
Amkor Technology (S) Pte Ltd
1 Kaki Bukit View
#03-28 TechView Building
Singapore 415941
Tel: (65) 6347 1131
Fax: (65) 6746 4815



ramya natarajan <nramya82 at gmail.com>


05/12/2010 10:51 AM


To
Dave Angel <davea at ieee.org>
cc
Sivapathasuntha Aruliah/S1/AAWW at Amkor, "tutor at python.org" 
<tutor at python.org>
Subject
Re: [Tutor] (no subject)








I really thank you all for  the quick response,   It was really helpful!!

On Tue, May 11, 2010 at 7:28 PM, Dave Angel <davea at ieee.org> wrote:
(1. Please don't top-post.  It gets everything out of sequence, and is the 
wrong convention for this forum
2. Be sure and do a reply-all, so that the message goes to the forum.  I'm 
not here to give private advice.
3. Use your editor's reply-quoting so that we can tell who wrote which 
parts.  Normally, you'll see that as either a leading ">" character or as 
a "!" character.  And one can tell which parts were written by whom by 
counting the number of those at the beginning of each line)

For my real response, see the end of the message, where it belongs.

Sivapathasuntha Aruliah wrote:
Dave
Thank you very much for your response. I think I have problem with both 
Python23 & Python31. Please help.

Python23 : The program works but programs written by Mark Summerfield in 
his book Programming in Python3 does not work.
Python 31: When I run this program it says in the pop up window "
C:\py3eg\csv2html1_ans.py is not a valid Win32 application" and on the the 
dos box it says Access is denied.
Below is the dos box contents


C:\>cd python31

C:\Python31>python C:\py3eg\quadratic.py
Access is denied.

C:\Python31>python C:\py3eg\quadratic.py
Access is denied.

C:\Python31>python C:\py3eg\hello.py
Access is denied.

C:\Python31>python.exe C:\py3eg\hello.py
Access is denied.

C:\Python31>cd..

C:\>cd python23

C:\Python23>python.exe C:\py3eg\hello.py
('Hello', 'World!')

C:\Python23>python.exe C:\py3eg\print_unicode.py
Traceback (most recent call last):
 File "C:\py3eg\print_unicode.py", line 30, in ?
   print_unicode_table(word)
NameError: name 'print_unicode_table' is not defined

C:\Python23>python.exe C:\py3eg\quadratic.py
 File "C:\py3eg\quadratic.py", line 14
   except ValueError as err:
                      ^
SyntaxError: invalid syntax




Regards,
Siva
Test Equipment Engineering
Amkor Technology (S) Pte Ltd
1 Kaki Bukit View
#03-28 TechView Building
Singapore 415941
Tel: (65) 6347 1131
Fax: (65) 6746 4815



Dave Angel <davea at ieee.org>


05/12/2010 09:50 AM


To
Sivapathasuntha Aruliah/S1/AAWW at Amkor
cc
tutor at python.org
Subject
Re: [Tutor] (no subject)








Sivapathasuntha Aruliah wrote:
 
Hi
I am learning Python. When I tried to run any of the program for example   
  

 
csv2html1_ans.py it displays the following message. This error is coming   
  

 
on both Python24 & Python 31. That is whether i give the any one of the 
following command

COMMAND GIVEN
1.C:\python24\python.exe C:\py3eg\quadratic.py
2.C:\python31\python.exe C:\py3eg\quadratic.py

A message below appears with the program name. Please advice me how to     

get   
over from this issue
ERROR MESSAGE
command  C:\py3eg\csv2html1_ans.py is not a valid Win32 application

Regards,
Siva
Test Equipment Engineering
Amkor Technology (S) Pte Ltd
1 Kaki Bukit View
#03-28 TechView Building
Singapore 415941
Tel: (65) 6347 1131
Fax: (65) 6746 4815

   
Please copy and paste the actual contents of your DOS box, rather than 
paraphrasing.  COMMAND hasn't been the normal shell name since Win95 days. 
 You can't use numbers in front of commands in any shell I've used.  The 
error message refers to a different file than anything you specified in 
your commands.

What OS are you using?

DaveA



 
Again, what OS are you using?

I have no idea what the pop up comes from, but I suspect you have some 
non-trivial code in that python program, perhaps that creates a gui.  Is 
there any tkinter stuff in it?

As for "Access is Denied", it usually means you tried to access a 
non-existent drive, or one which isn't currently mounted.  For example, 
referencing your CD drive with no platter in it.

I don't know why "print_unicode_table" is undefined, but apparently you're 
missing some code.


And the except clause changed between 2.x and 3.x, so you need to change 
the syntax to match the particular interpreter you're using.  They're not 
compatible, although there's a utility to convert from 2.x to 3.x, I don't 
think there's anything that reverses it.

I'd suggest picking one version, and using only books and references that 
are compatible with it till you're comfortable with the language.

DaveA

_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100512/4a0c800b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 12855 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20100512/4a0c800b/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 4196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20100512/4a0c800b/attachment-0003.gif>


More information about the Tutor mailing list