I'm having problems with my PythonPath on windows XP, and I'm wondering if I'm doing something wrong.
Say that I have a project (created with Pydev) that has an src directory. Under src I have a single package, named common, and in it a single class module, named service.py with a class name Service
Say now that I have another project ...
I thought
import sys
sys.path.append("/home/me/mydir")
is appending a dir to my pythonpath
if I print sys.path my dir is in there.
Then I open a new command and it is not there anymore.
But somehow Python cant import modules I saved in that dir.
What Am I doing wrong?
I read .profile or .bash_profile will do the trick.
Do I hav...
Whenever I use sys.path.append, the new directory will be added. However, once I close python, the list will revert to the previous (default?) values. How do I permanently add a directory to PYTHONPATH?
Using Windows.
...
Where is my pythonpath stored?
When I write
import sys
sys.path
Where does python get that data?
...
Hi there,
I have a third party program that I use for remotely calling my own application and uses python 2.4. My Application is written with python 2.6. So this is the call hierarchy:
3rd party app -> calling my app by Python24 -> my app
Now when calling my application via "C:\Python26\python.exe " contains a python26.zip file and all...
I am kind of annoyed by the installation of modules in python and had a lot of trouble with it, so it would be fantastic to find a good solution for it. Heres my issues:
PYTHONPATH: How can I tell easy_install/Python where to install my packages?
Eventhough I put:
/Library/Python/2.6/site-packages
in my .bash_profile
With:
PYTHO...
Ok a short question:
Is there any SIMPLE software with a GUI, that lets me manage my pythonpath, path python version in mac?
So I could set my Python, pythonpath and python version i want to use.
Thanks!
@ katrielalex and S.Lott :
I had a very nightmare with installing modules in python and as pointed out correctly in another questi...
I am trying to switch from using Python 2.6.5 to using Python 3.2a2.
I am using OSX 10.6.4.
However, when I open Idle in the Python 3.2a2 folder it cannot import any of the modules I installed to Python 2.6.5.
Is there a way that I can share the same folders on Python 3.2a2 ?
...
Hi There,
I have a directory which hosts all my django app.
*"C:\My_Projects".*
I want to add this directory to my pythonpath so I can call the apps directly.
I have *right clicked My Computer > Properties > Advanced System Settings > Environmental Variables. Then I added C:\My_Projects\; to my Path variable* but it still doesn't read ...
I would like to see what is best way to determine current script directory in python?
I discovered that two to the many ways of calling python code, it is hard to find a good solution.
Here are some problems:
__file__ is not defined if the script is executed with exec, execfile
__module__ is defined only in modules
Use cases:
./...
When developing a Django application, what is sys.path supposed to contain? The directory which contains the project, or the directory of the project, or both?
...
I'm developing a Python utility module to help with file downloads, archives, etc. I have a project set up in a virtual environment along with my unit tests. When I want to use this module on the same computer (essentially as "Production"), I move the files to the mymodule directory in the ~/dev/modules/mymodule
I keep all 3rd-party mod...
I have a series of unit tests that I'm running with nose. For some of my tests, I'd like to remove a module's path from the sys.path so there is no conflict with what I am testing.
sys.path.remove('/path/to/remove/from/sys/path')
If I run the Python interpreter and call sys.path, the '/path/to/remove/from/sys/path' is there in the li...
Hello,
I am trying to use this python module HTML.py but GAE gives me ImportError: No module named HTML
According to IDLE path browser the path is here:
C:\Python26\lib\site-packages\HTML.py
Can anyone help me to fix this problem?
Thank you
...
I downloaded html 1.13 package from Python site and as per instructions I doubleclicked on install.bat and installed it. I also added the directory C:\Python26\HTML.py-0.04 to PYTHONPATH. But when I try to import the module with
>>> from html import HTML
I still get ImportError: No module named html Can someone help me understand w...