473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to run Python script on WindowXP

Dear Sir/Madam,

I'm doing my PhD in APAF and I installed Python 2.2 interpreter in
WindowNT before and it worked OK on my old computer. However, our
company has upgraded the systems to WindowXP recently. I installed
Python2.2.3, which includes IDLE (Python GUI), Module Docs, Python
(command line) and Python Manuals, on my new computer. I can open my
Python code from IDLE (Python GUI), but I don't know how to run it. If
you could please tell me whether the Python interpreter compatible to
WindowXP and how to run the Python script on WindowXP, I'll be much
appreciated. Thank you very much again.

Best regards,

Yunxian Mak
Jul 18 '05 #1
2 27510
How to run Python script on WindowXPFunny, I works for me. There are two
parts to
the solution. First, check if the Python library is in your path. If
it isn't, you'll get an error that says something like "not an executable
or script."

Go to Control Panel -> System -> Advanced -> Environment Variables,
and you'll be able to set the path properly.

Outside of that, your command needs to be: "python <yourscript>.py
<parameters>"
(without the quotes, obviously.) For example:

python froznitz.py foobar galoshes

I find that a command file (.cmd) to set the
python path first helps. Python, for some reason, does not assume the .py,
you
have to specify it.

John Roth

[original post]
"Yunxian Mak" <yu*****@proteome.org.au> wrote in message
news:ma**********************************@python.o rg...
Dear Sir/Madam,
I'm doing my PhD in APAF and I installed Python 2.2 interpreter in WindowNT
before and it worked OK on my old computer. However, our company has
upgraded the systems to WindowXP recently. I installed Python2.2.3, which
includes IDLE (Python GUI), Module Docs, Python (command line) and Python
Manuals, on my new computer. I can open my Python code from IDLE (Python
GUI), but I don't know how to run it. If you could please tell me whether
the Python interpreter compatible to WindowXP and how to run the Python
script on WindowXP, I'll be much appreciated. Thank you very much again.
Best regards,
Yunxian Mak
Jul 18 '05 #2
How to run Python script on WindowXPHI,

make a .bat or .cmd file with following lines:
REM START of FILE
assoc .py=Python.File
assoc .pyc=Python.CompiledFile
assoc .pyw=Python.NoConFile

ftype Python.File=C:\Python23\python.exe "%%1" %%*
ftype Python.CompiledFile=C:\Python23\python.exe "%%1" %%*
ftype Python.NoConFile=C:\Python23\pythonw.exe "%%1" %%*

rem this should be done in the system settings
set PATHEXT=%PATHEXT%;.py;.pyc;.pyw
rem END of FILE

greetings Leopold

"Yunxian Mak" <yu*****@proteome.org.au> wrote in message news:ma**********************************@python.o rg...
Dear Sir/Madam,

I'm doing my PhD in APAF and I installed Python 2.2 interpreter in WindowNT before and it worked OK on my old computer. However, our company has upgraded the systems to WindowXP recently. I installed Python2.2.3, which includes IDLE (Python GUI), Module Docs, Python (command line) and Python Manuals, on my new computer. I can open my Python code from IDLE (Python GUI), but I don't know how to run it. If you could please tell me whether the Python interpreter compatible to WindowXP and how to run the Python script on WindowXP, I'll be much appreciated. Thank you very much again.

Best regards,

Yunxian Mak

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Erik Johnson | last post by:
This is somewhat a NEWBIE question... My company maintains a small RDBS driven website. We currently generate HTML using PHP. I've hacked a bit in Python, and generally think it is a rather...
2
by: DeepBleu | last post by:
When one is using an HTML form via a web broswer, the user submits the form contents and these are passed to a CGI Python script on the web server. I need to write a client script that connects to...
8
by: Will | last post by:
I just discovered Python and looked briefly at one of the tutorials for beginners... It looks a lot like the old Command line Basic... I'm sure it does much more but... 1 - Can you create...
52
by: Olivier Scalbert | last post by:
Hello , What is the python way of doing this : perl -pi -e 's/string1/string2/' file ? Thanks Olivier
17
by: Paul Rubin | last post by:
Dumb question from a Windows ignoramus: I find myself needing to write a Python app (call it myapp.py) that uses tkinter, which as it happens has to be used under (ugh) Windows. That's Windows...
9
by: TPJ | last post by:
First I have to admit that my English isn't good enough. I'm still studying and sometimes I just can't express what I want to express. A few weeks ago I've written 'Python Builder' - a bash...
3
by: krzychu | last post by:
Hi, I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone 2.0.5, OS Debian 1:3.3.6-2. After import a old Plone site from the following platform Zope-2-7-4, Python 2.3.3, Plone...
6
by: manatlan | last post by:
I've got a trouble, and i think that anybody there can help me I've got a python script which i distribute in somes packages for *nix. This script is full of python and need python 2.4 ! And i'd...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.