Re: Setting Pythonpath programmatic

2019-12-16 Thread Barry Scott
> On 14 Dec 2019, at 16:00, Prasad Rajassekaran > wrote: > > 0 > > > Aim:- > > I would want to set python path programmatic in my project. So that, all > other directories files can be imported without any issues. > > Problem statement:- > > I used to add all the folders & sub-folders i

Re: Setting Pythonpath programmatic

2019-12-15 Thread dieter
Prasad Rajassekaran writes: > I would want to set python path programmatic in my project. So that, all > other directories files can be imported without any issues. You can extend "sys.path" programmatically to control where Python looks for top level packages/modules (as you apparently have alr

Setting Pythonpath programmatic

2019-12-14 Thread Prasad Rajassekaran
0 Aim:- I would want to set python path programmatic in my project. So that, all other directories files can be imported without any issues. Problem statement:- I used to add all the folders & sub-folders in environment variables under PYTHONPATH but this has two constrains. 1, Any new fold

Re: Setting PYTHONPATH does not allow importing module

2015-03-04 Thread cl
fa...@vt.edu wrote: > I have the following directory /home/me/projects/modulename. > > I update PYTHONPATH using the following command: > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > It seems to have been added: > [me@machine ~]$ python -c "import sys; print(sys.path)" > ['',...

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread Zachary Ware
On Tue, Mar 3, 2015 at 9:47 PM, wrote: > On Tuesday, March 3, 2015 at 10:43:27 PM UTC-5, Zachary Ware wrote: >> Try adding /home/me/projects to PYTHONPATH instead of >> /home/me/projects/modulename. > > Ah, that worked! Yes, I see that the modulename must be visible. Thanks a lot! No problem, gl

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
On Tuesday, March 3, 2015 at 10:43:27 PM UTC-5, Zachary Ware wrote: > On Tue, Mar 3, 2015 at 9:25 PM, wrote: > > I have the following directory /home/me/projects/modulename. > > > > I update PYTHONPATH using the following command: > > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > >

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
On Tuesday, March 3, 2015 at 10:37:54 PM UTC-5, liuerfire Wang wrote: > Is there a file named __init__.py in the modulename dir? > > > > > > > > > Best regards > > > > > > On Wed, Mar 4, 2015 at 11:25 AM, wrote: > I have the following directory /home/me/projects/modulename. > > >

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
On Tuesday, March 3, 2015 at 10:37:54 PM UTC-5, liuerfire Wang wrote: > Is there a file named __init__.py in the modulename dir? > > > > > > > > > Best regards > > > > > > On Wed, Mar 4, 2015 at 11:25 AM, wrote: > I have the following directory /home/me/projects/modulename. > > >

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread Zachary Ware
On Tue, Mar 3, 2015 at 9:25 PM, wrote: > I have the following directory /home/me/projects/modulename. > > I update PYTHONPATH using the following command: > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > It seems to have been added: > [me@machine ~]$ python -c "import sys; print(s

Re: Setting PYTHONPATH does not allow importing module

2015-03-03 Thread liuerfire Wang
Is there a file named __init__.py in the modulename dir? Best regards On Wed, Mar 4, 2015 at 11:25 AM, wrote: > I have the following directory /home/me/projects/modulename. > > I update PYTHONPATH using the following command: > export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename > > It

Setting PYTHONPATH does not allow importing module

2015-03-03 Thread faruk
I have the following directory /home/me/projects/modulename. I update PYTHONPATH using the following command: export PYTHONPATH=$PYTHONPATH:/home/me/projects/modulename It seems to have been added: [me@machine ~]$ python -c "import sys; print(sys.path)" ['',... '/home/me', '/home/me/projects/modu

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread Carl Banks
On Feb 28, 9:18 pm, per wrote: > On Feb 28, 11:53 pm, per wrote: > > > > > On Feb 28, 11:24 pm, Carl Banks wrote: > > > > On Feb 28, 7:30 pm, per wrote: > > > > > hi all, > > > > > i recently installed a new version of a package using python setup.py > > > > install --prefix=/my/homedir on a sy

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
On Feb 28, 11:53 pm, per wrote: > On Feb 28, 11:24 pm, Carl Banks wrote: > > > > > On Feb 28, 7:30 pm, per wrote: > > > > hi all, > > > > i recently installed a new version of a package using python setup.py > > > install --prefix=/my/homedir on a system where i don't have root > > > access. the

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
On Feb 28, 11:24 pm, Carl Banks wrote: > On Feb 28, 7:30 pm, per wrote: > > > hi all, > > > i recently installed a new version of a package using python setup.py > > install --prefix=/my/homedir on a system where i don't have root > > access. the old package still resides in /usr/lib/python2.5/si

Re: setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread Carl Banks
On Feb 28, 7:30 pm, per wrote: > hi all, > > i recently installed a new version of a package using python setup.py > install --prefix=/my/homedir on a system where i don't have root > access. the old package still resides in /usr/lib/python2.5/site- > packages/ and i cannot erase it. > > i set my

setting PYTHONPATH to override system wide site-packages

2009-02-28 Thread per
hi all, i recently installed a new version of a package using python setup.py install --prefix=/my/homedir on a system where i don't have root access. the old package still resides in /usr/lib/python2.5/site- packages/ and i cannot erase it. i set my python path as follows in ~/.cshrc setenv PYT

Re: setting PYTHONPATH

2006-03-07 Thread Terry Hancock
On Sun, 5 Mar 2006 23:05:31 -0800 (PST) anushya beauty <[EMAIL PROTECTED]> wrote: > Anybody, please help me to set PYTHONPATH to import > my modules?. Where is sy.path set? > > In some python groups site, to import the user modules, > they explained to create one __init__.py fi

setting PYTHONPATH

2006-03-05 Thread anushya beauty
Hi,    Anybody, please help me to set PYTHONPATH to import my modules?. Where is sy.path set?In some python groups site, to import the user modules, they explained to  create one __init__.py file in my module directory (this file should include __all__ variable, which refer to the modules

Re: Setting PYTHONPATH from Makefile

2005-12-02 Thread Inyeol Lee
On Fri, Dec 02, 2005 at 08:10:41PM -0500, Mike Meyer wrote: > Inyeol Lee <[EMAIL PROTECTED]> writes: > > On Fri, Dec 02, 2005 at 07:33:20PM -0500, Mike Meyer wrote: > >> > The problem is that myscript.py and some modules that myscript.py > >> > imports are not in the current directory, but in anoth

Re: Setting PYTHONPATH from Makefile

2005-12-02 Thread Mike Meyer
Inyeol Lee <[EMAIL PROTECTED]> writes: > On Fri, Dec 02, 2005 at 07:33:20PM -0500, Mike Meyer wrote: >> > The problem is that myscript.py and some modules that myscript.py >> > imports are not in the current directory, but in another place in the >> > filesystem, say, /path/to/stuff. If this was a

Re: Setting PYTHONPATH from Makefile

2005-12-02 Thread Inyeol Lee
On Fri, Dec 02, 2005 at 07:33:20PM -0500, Mike Meyer wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > I have a Makefile target that uses a python script, like: > > > > %.abc: %.def > > python myscript.py > > > > The problem is that myscript.py and some modules that myscript.py >

Re: Setting PYTHONPATH from Makefile

2005-12-02 Thread Mike Meyer
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I have a Makefile target that uses a python script, like: > > %.abc: %.def > python myscript.py > > The problem is that myscript.py and some modules that myscript.py > imports are not in the current directory, but in another place in the > f

Re: Setting PYTHONPATH from Makefile

2005-12-02 Thread François Pinard
[EMAIL PROTECTED] > I have a Makefile target that uses a python script, like: > %.abc: %.def > python myscript.py > If this was a tcsh script, I would just do: >setenv PYTHONPATH /path/to/stuff >python myscript.py > but this cannot be done from a Makefile. Use: %.abc:

Setting PYTHONPATH from Makefile

2005-12-02 Thread [EMAIL PROTECTED]
I have a Makefile target that uses a python script, like: %.abc: %.def python myscript.py The problem is that myscript.py and some modules that myscript.py imports are not in the current directory, but in another place in the filesystem, say, /path/to/stuff. If this was a tcsh script, I w