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 <nramy...@gmail.com> 05/12/2010 10:51 AM To Dave Angel <da...@ieee.org> cc Sivapathasuntha Aruliah/S1/a...@amkor, "tutor@python.org" <tutor@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 <da...@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 <da...@ieee.org> 05/12/2010 09:50 AM To Sivapathasuntha Aruliah/S1/a...@amkor cc tutor@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@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
<<image/gif>>
<<image/gif>>
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor