Environment variable set up is the most confusing part for me all the
time. Please help me with the following questions:
When I install python in a new system, I will go to environment
variables (system variables) and set "path" pointing to C:\Python25
and thats all I do.
I type python from "cmd" window and its converting to python window
for python execution. All fine up to this point.
Now, I want to drag and drop python (.py) files to this window and
execute it. My python files are located in different directories
inside C: and outside C:. When I do that, I get errors and the file is
not found and its not imported. ALso, inside the .py file, if I have a
command to open a different file, it doesnt see that either. How do I
overcome these basic difficulties in python. I wish I can open any
file and work on that using python.
Thanks for your help!
Krishna 4 2315
On Apr 25, 8:07*am, Krishna <manthra.mo...@gmail.comwrote:
Environment variable set up is the most confusing part for me all the
time. Please help me with the following questions:
When I install python in a new system, I will go to environment
variables (system variables) and set "path" pointing to C:\Python25
and thats all I do.
I type python from "cmd" window and its converting to python window
for python execution. All fine up to this point.
Now, I want to drag and drop python (.py) files to this window and
execute it. My python files are located in different directories
inside C: and outside C:. When I do that, I get errors and the file is
not found and its not imported. ALso, inside the .py file, if I have a
command to open a different file, it doesnt see that either. How do I
overcome these basic difficulties in python. I wish I can open any
file and work on that using python.
Thanks for your help!
Krishna
I'm pretty sure you can't do that in a command window. I tried it on
my Windows XP machine and all I get in my instance of IDLE is the path
to the file. It DOES work with PythonWin, which is the ActiveState
version of Python. The only difference is that it include the win32
modules and has a more advanced editor.
You can probably get this to work in other more advanced editors, like
WingIDE or PyDev too.
Mike
On Apr 25, 9:17*am, Mike Driscoll <kyoso...@gmail.comwrote:
On Apr 25, 8:07*am, Krishna <manthra.mo...@gmail.comwrote:
Environment variable set up is the most confusing part for me all the
time. Please help me with the following questions:
When I install python in a new system, I will go to environment
variables (system variables) and set "path" pointing to C:\Python25
and thats all I do.
I type python from "cmd" window and its converting to python window
for python execution. All fine up to this point.
Now, I want to drag and drop python (.py) files to this window and
execute it. My python files are located in different directories
inside C: and outside C:. When I do that, I get errors and the file is
not found and its not imported. ALso, inside the .py file, if I have a
command to open a different file, it doesnt see that either. How do I
overcome these basic difficulties in python. I wish I can open any
file and work on that using python.
Thanks for your help!
Krishna
I'm pretty sure you can't do that in a command window. I tried it on
my Windows XP machine and all I get in my instance of IDLE is the path
to the file. It DOES work with PythonWin, which is the ActiveState
version of Python. The only difference is that it include the win32
modules and has a more advanced editor.
You can probably get this to work in other more advanced editors, like
WingIDE or PyDev too.
Mike- Hide quoted text -
- Show quoted text -
So, how do I get the win32 module and what to do with that? Just
install it?
Thanks,
Krishna
Krishna wrote:
Environment variable set up is the most confusing part for me all the
time. Please help me with the following questions:
When I install python in a new system, I will go to environment
variables (system variables) and set "path" pointing to C:\Python25
and thats all I do.
I type python from "cmd" window and its converting to python window
for python execution. All fine up to this point.
Now, I want to drag and drop python (.py) files to this window and
execute it. My python files are located in different directories
inside C: and outside C:. When I do that, I get errors and the file is
not found and its not imported. ALso, inside the .py file, if I have a
command to open a different file, it doesnt see that either. How do I
overcome these basic difficulties in python. I wish I can open any
file and work on that using python. http://www.python.org/doc/faq/window...-under-windows
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
On Apr 25, 8:26*am, Krishna <manthra.mo...@gmail.comwrote:
On Apr 25, 9:17*am, Mike Driscoll <kyoso...@gmail.comwrote:
On Apr 25, 8:07*am, Krishna <manthra.mo...@gmail.comwrote:
Environment variable set up is the most confusing part for me all the
time. Please help me with the following questions:
When I install python in a new system, I will go to environment
variables (system variables) and set "path" pointing to C:\Python25
and thats all I do.
I type python from "cmd" window and its converting to python window
for python execution. All fine up to this point.
Now, I want to drag and drop python (.py) files to this window and
execute it. My python files are located in different directories
inside C: and outside C:. When I do that, I get errors and the file is
not found and its not imported. ALso, inside the .py file, if I have a
command to open a different file, it doesnt see that either. How do I
overcome these basic difficulties in python. I wish I can open any
file and work on that using python.
Thanks for your help!
Krishna
I'm pretty sure you can't do that in a command window. I tried it on
my Windows XP machine and all I get in my instance of IDLE is the path
to the file. It DOES work with PythonWin, which is the ActiveState
version of Python. The only difference is that it include the win32
modules and has a more advanced editor.
You can probably get this to work in other more advanced editors, like
WingIDE or PyDev too.
Mike- Hide quoted text -
- Show quoted text -
So, how do I get the win32 module and what to do with that? Just
install it?
Thanks,
Krishna
ActivePython can be found on the ActiveState website: http://www.activestate.com/Products/activepython/?_x=1
This will basically just add whatever modules needed if Python is
already installed and it will also install another editor called
pythonwin, which you should be able to find in your start menu.
But be sure to check out that link that Steve gave you. That might
work for you too.
Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg Lindstrom |
last post by:
Hello-
I am running python 2.3. on an HP-9000 box running Unix and have a POSIX
script that sets up my production environment. I would like to run the
script from inside a python routine and...
|
by: Christian |
last post by:
Another question from a not even newbie:
In Unix you can set an environment variable with the command
export PYTHONPATH
but I would like to set the variable from at .py script.
So my question...
|
by: Bill Davidson |
last post by:
All:
I've found the 'Environment.GetEnvironmentVariable()' method; but how do I
create and/or set an environment variable?
Thanks,
Bill
|
by: Ron Clarke |
last post by:
I have an application that starts other processes. The app needs to
create/set a few environment variables when a process starts, let the
process run, then remove the environment variables when the...
|
by: Fuzzyman |
last post by:
Hello all,
I would like to set a Windows Environment variable for another
(non-child) process.
This means that the following *doesn't* work : ::
os.environ = value
In the ``win32api``...
|
by: pagates |
last post by:
Hi All,
What's the "best" way to get System Environment Variables (VS2003)?
Environment.GetEnvironmentVariable("xxx") only gets user Environment
variables.
Thanks,
pagates
|
by: ANarula |
last post by:
I am running into a strange problem. I have perl script which reads the
"APPDATA" environment variable, and does some work on that directory.
When I a launch this script from Command Prompt, it...
|
by: Tristan |
last post by:
Hello community:
I post this because I could not find satisfactory answers in the posts
generated by this nice group.
I work on winXP. I have many little python applications in different
folders,...
|
by: smitty1e |
last post by:
Just a fun exercise to unify some of the major input methods for a
script into a single dictionary.
Here is the output, given a gr.conf file in the same directory with
the contents stated below:
...
|
by: Stephen Cattaneo |
last post by:
Hello all,
I am attempting to execute an automated test (written in Python) via
cron. I have to check the HOSTNAME variable as part of the test, oddly
under cron the HOSTNAME environment...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |