Re: PythonPath / sys.path

2023-05-15 Thread Thomas Passin
On 5/15/2023 3:26 AM, Barry wrote: On 15 May 2023, at 05:39, Thomas Passin wrote: On 5/14/2023 11:08 PM, Chris Angelico wrote: On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: Well, no, why would you assume that? I started to use Linux - in VMs - because I had to make sure that my cros

Re: PythonPath / sys.path

2023-05-15 Thread Chris Angelico
On Mon, 15 May 2023 at 14:38, Thomas Passin wrote: > > On 5/14/2023 11:08 PM, Chris Angelico wrote: > > On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: > >> Well, no, why would you assume that? I started to use Linux - in VMs - > >> because I had to make sure that my cross-platform java/jytho

Re: PythonPath / sys.path

2023-05-15 Thread Barry
> On 15 May 2023, at 05:39, Thomas Passin wrote: > > On 5/14/2023 11:08 PM, Chris Angelico wrote: >>> On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: >>> Well, no, why would you assume that? I started to use Linux - in VMs - >>> because I had to make sure that my cross-platform java/jytho

Re: PythonPath / sys.path

2023-05-14 Thread Thomas Passin
On 5/14/2023 11:08 PM, Chris Angelico wrote: On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: Well, no, why would you assume that? I started to use Linux - in VMs - because I had to make sure that my cross-platform java/jython Tomcat program would work right on Linux. Why, for example, woul

Re: PythonPath / sys.path

2023-05-14 Thread Chris Angelico
On Mon, 15 May 2023 at 12:07, Thomas Passin wrote: > Well, no, why would you assume that? I started to use Linux - in VMs - > because I had to make sure that my cross-platform java/jython Tomcat > program would work right on Linux. Why, for example, would I think to > install Idle from the packa

Re: PythonPath / sys.path

2023-05-14 Thread Thomas Passin
On 5/14/2023 7:28 PM, Chris Angelico wrote: On Mon, 15 May 2023 at 09:22, Thomas Passin wrote: You made a little slam against Windows, but you will find it harder to get things working on Linux. Ubuntu, like many other Linux distros, does not come with pip and Tk (needed for Idle) installed, a

Re: PythonPath / sys.path

2023-05-14 Thread Chris Angelico
On Mon, 15 May 2023 at 09:22, Thomas Passin wrote: > You made a little slam against Windows, but you will find it harder to > get things working on Linux. Ubuntu, like many other Linux distros, > does not come with pip and Tk (needed for Idle) installed, and it's not > so obvious how to install t

Re: PythonPath / sys.path

2023-05-14 Thread Thomas Passin
On 5/14/2023 3:00 PM, Grizzy Adams via Python-list wrote: Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote: Re: PythonPath / sys.path (at least in part) [snip] I have since moved up (a little) so only ~4 years old, I then updated pip from 9.x to 19.1 reason its an old version is it'

Re: PythonPath / sys.path

2023-05-14 Thread Eryk Sun
On 5/13/23, Grizzy Adams via Python-list wrote: > > I have tried adding my dir in registry to the existing PythonPath > > [HKEY_CURRENT_USER\Software\Python\PythonCore\3.4\PythonPath] > @="D:\\Shades\\Tools\\Python\\Lib;D:\\Shades\\Tools\\Python\\DLLs" > > that did not help, The default value of

Re: PythonPath / sys.path

2023-05-14 Thread Mats Wichmann
On 5/14/23 13:00, Grizzy Adams via Python-list wrote: Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote: Re: PythonPath / sys.path (at least in part) On 5/14/23 10:43, Barry wrote: I take it you have business reasons to use an obsolete version python. Where did you get your version of

Re: PythonPath / sys.path

2023-05-14 Thread Grizzy Adams via Python-list
Sunday, May 14, 2023 at 11:11, Mats Wichmann wrote: Re: PythonPath / sys.path (at least in part) >On 5/14/23 10:43, Barry wrote: >> I take it you have business reasons to use an obsolete version python. >> Where did you get your version of python from? >In fact, a *nine* y

Re: PythonPath / sys.path

2023-05-14 Thread Mats Wichmann
On 5/14/23 10:43, Barry wrote: I take it you have business reasons to use an obsolete version python. Where did you get your version of python from? In fact, a *nine* year old version of Python that reached end-of-life four years ago. Just sayin' Python version shouldn't have anything to d

Re: PythonPath / sys.path

2023-05-14 Thread Barry
> On 14 May 2023, at 16:32, Grizzy Adams via Python-list > wrote: > > Hi All > > My first post (repeated) > > I am having a problem with PythonPath / sys.path > > I have a dir where I keep all my current work, but I can't seem to add it to > PythonPath / sys.path > > When I try to import

Re: PYTHONPATH vs Python Virtual Environment

2022-02-04 Thread Dieter Maurer
Sina Mobasheri wrote at 2022-2-4 15:55 +: >it's not good title defiantly and I don't mean to compare apples and oranges > >when I start using python virtual environment it was because isolation >proposes and everyone say about its benefits in isolation and working with >different versions of

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 20:13 CEST schreef Mark Lawrence: > On 23/05/2015 18:30, Cecil Westerhof wrote: >> >> I should have checked better. I think I found a bug that made it >> look like PYTHONPATH does not work. >> >> In bash I give: >> echo $PYTHONPATH >> this gives: >> .:/home/cecil/Python/Pyt

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 19:30 CEST schreef Cecil Westerhof: > I should have checked better. I think I found a bug that made it > look like PYTHONPATH does not work. > > In bash I give: > echo $PYTHONPATH > this gives: > .:/home/cecil/Python/PythonLibrary > > Then I start ipython3 and get/do the fo

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Mark Lawrence
On 23/05/2015 18:30, Cecil Westerhof wrote: I should have checked better. I think I found a bug that made it look like PYTHONPATH does not work. In bash I give: echo $PYTHONPATH this gives: .:/home/cecil/Python/PythonLibrary Then I start ipython3 and get/do the following: Python

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 18:09 CEST schreef Peter Otten: > Cecil Westerhof wrote: > >> Op Saturday 23 May 2015 15:25 CEST schreef Peter Otten: >> >>> Cecil Westerhof wrote: >>> Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: > On 22/05/2015 06:20, Cecil Westerhof wrote:

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Peter Otten
Cecil Westerhof wrote: > Op Saturday 23 May 2015 15:25 CEST schreef Peter Otten: > >> Cecil Westerhof wrote: >> >>> Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: >>> On 22/05/2015 06:20, Cecil Westerhof wrote: > I am looking into using ipython instead of bash. But when I call

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 17:00 CEST schreef Laura Creighton: > In a message of Sat, 23 May 2015 16:08:00 +0200, Cecil Westerhof > writes: >> That is not the problem: >> os.environ['PYTHONPATH'] >> gives: >> .:/home/cecil/Python' >> >> As I interpret it is that the very handy shell variable is not u

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Laura Creighton
In a message of Sat, 23 May 2015 16:08:00 +0200, Cecil Westerhof writes: >That is not the problem: >os.environ['PYTHONPATH'] >gives: >.:/home/cecil/Python' > >As I interpret it is that the very handy shell variable is not used in ipython. > >-- >Cecil Westerhof >Senior Software Engineer >L

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 15:25 CEST schreef Peter Otten: > Cecil Westerhof wrote: > >> Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: >> >>> On 22/05/2015 06:20, Cecil Westerhof wrote: I am looking into using ipython instead of bash. But when I call a python program from ipytho

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Peter Otten
Cecil Westerhof wrote: > Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: > >> On 22/05/2015 06:20, Cecil Westerhof wrote: >>> I am looking into using ipython instead of bash. But when I call a >>> python program from ipython PYTHONPATH is not set. So pythonscripts >>> that need a module

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Cecil Westerhof
Op Saturday 23 May 2015 11:12 CEST schreef Mark Lawrence: > On 22/05/2015 06:20, Cecil Westerhof wrote: >> I am looking into using ipython instead of bash. But when I call a >> python program from ipython PYTHONPATH is not set. So pythonscripts >> that need a module through PYTHONPATH will not wor

Re: PYTHONPATH when calling from ipython

2015-05-23 Thread Mark Lawrence
On 22/05/2015 06:20, Cecil Westerhof wrote: I am looking into using ipython instead of bash. But when I call a python program from ipython PYTHONPATH is not set. So pythonscripts that need a module through PYTHONPATH will not work. I could do something like: !PYTHONPATH=~/Python/PythonLibra

Re: PYTHONPATH and module names

2013-07-02 Thread SpaghettiToastBook .
Relative imports only work with the "from ... import ..." form. — SpaghettiToastBook On Mon, Jul 1, 2013 at 3:54 PM, Tobiah wrote: >> Are you familiar with absolute and relative imports: >> http://docs.python.org/release/2.5/whatsnew/pep-328.html > > > Doesn't seem to work: > > Python 2.7.3 (de

Re: PYTHONPATH and module names

2013-07-01 Thread Lele Gaifax
Steven D'Aprano writes: > On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote: >> 2. The __future__ is not necessary in python 2.7 [Not necessary or not >> allowed I not know :-) ] > > Not necessary. IIRC that it is needed, to solve the OP problem: one thing is the syntax, which under Python 2.7 is e

Re: PYTHONPATH and module names

2013-07-01 Thread Fábio Santos
On 1 Jul 2013 20:58, "Tobiah" wrote: >> >> Are you familiar with absolute and relative imports: >> http://docs.python.org/release/2.5/whatsnew/pep-328.html > > > Doesn't seem to work: > > Python 2.7.3 (default, May 10 2012, 13:31:18) > [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 > Type "help", "

Re: PYTHONPATH and module names

2013-07-01 Thread Steven D'Aprano
On Mon, 01 Jul 2013 14:38:50 -0700, rusi wrote: > On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: >> > Are you familiar with absolute and relative imports: >> > http://docs.python.org/release/2.5/whatsnew/pep-328.html >> >> Doesn't seem to work: >> Python 2.7.3 (default, May 10 2012,

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Tuesday, July 2, 2013 1:24:30 AM UTC+5:30, Tobiah wrote: > > Are you familiar with absolute and relative imports: > > http://docs.python.org/release/2.5/whatsnew/pep-328.html > > Doesn't seem to work: > Python 2.7.3 (default, May 10 2012, 13:31:18) > [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux

Re: PYTHONPATH and module names

2013-07-01 Thread Tobiah
Are you familiar with absolute and relative imports: http://docs.python.org/release/2.5/whatsnew/pep-328.html Doesn't seem to work: Python 2.7.3 (default, May 10 2012, 13:31:18) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

Re: PYTHONPATH and module names

2013-07-01 Thread rusi
On Monday, July 1, 2013 11:59:35 PM UTC+5:30, Tobiah wrote: > So today, I created a file called 'formatter.py', > and my program broke. It turned out that I was > also import 'gluon' from web2py, which in turn, > somewhere, imported the regular python formatter.py > with which I was not familiar.

Re: PYTHONPATH: dev and prod

2013-06-13 Thread jacopo
On Wednesday, June 12, 2013 5:10:05 PM UTC+1, rusi wrote: > On Jun 12, 6:29 pm, jacopo wrote: > > > > 1. How you run -- 'launch' -- the code -- from py and from prod > > > > > > when I have to test I use "python any_script.py"  but in production there > > is a c++ program that is able to wrap

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 6:29 pm, jacopo wrote: > > 1. How you run -- 'launch' -- the code -- from py and from prod > > when I have to test I use "python any_script.py"  but in production there is > a c++ program that is able to wrap and run python code (the technical details > are a bit beyond my knowledge)

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
> 1. How you run -- 'launch' -- the code -- from py and from prod when I have to test I use "python any_script.py" but in production there is a c++ program that is able to wrap and run python code (the technical details are a bit beyond my knowledge) > 2. What error you get when I run as "pyt

Re: PYTHONPATH: dev and prod

2013-06-12 Thread rusi
On Jun 12, 4:10 pm, jacopo wrote: > this idea seemed perfect but it turned out that you have to execute the > module as a package > (python -m py.myscripts.any_script) otherwise I get an error on the relative > import. > Unfortunately I am working in a team and I do not have control on how the

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
this idea seemed perfect but it turned out that you have to execute the module as a package (python -m py.myscripts.any_script) otherwise I get an error on the relative import. Unfortunately I am working in a team and I do not have control on how the module is launched. On Tuesday, June 11, 2

Re: PYTHONPATH: dev and prod

2013-06-12 Thread jacopo
this idea seemed perfect but it turned out that you have to execute the module as a package (python -m scripts.myscript) otherwise I get an error on the relative import. Unfortunately I am working in a team and I do not have control on how the module is launched. On Tuesday, June 11, 2013 6:1

Re: PYTHONPATH: dev and prod

2013-06-11 Thread rusi
On Jun 11, 9:28 pm, jacopo wrote: > I am developing my code in the path: > /py/myscripts > /py/mylib > In order to "import mylib", I need to add /py/mylib to PYTHONPATH. > > Now I want to save a snapshot of the current code in the production > directory, I will copy all in: > /prod/myscripts > /p

Re: PYTHONPATH

2011-04-18 Thread MRAB
On 18/04/2011 05:37, harrismh777 wrote: [snip] In retrospect, in many ways this is why I am relatively patient with the Python3 development direction. While I think its non-compatibility may hurt in the short term, the long term goal of stream-lining the language will make for a much better Pytho

Re: PYTHONPATH

2011-04-17 Thread harrismh777
Steven D'Aprano wrote: In my opinion, a better explanation for the difficulty faced by Windows users is that this is a side-effect of Windows starting life as a single-user operating system. Yes, that is my opinion as well. Windows for better or worse is plagued by "cruft" that dates back to t

Re: PYTHONPATH

2011-04-17 Thread Steven D'Aprano
On Sun, 17 Apr 2011 01:14:54 -0500, harrismh777 wrote: > Its just technically difficult to > setup easily configured concurrent environments on the Windows platform, > primarily due to the way the platform was designed--- closed and > proprietary--- with little to no community input. I believe th

Re: PYTHONPATH

2011-04-16 Thread harrismh777
jmfauth wrote: I belong to those who are very happy with the Python installations on Windows platform . . . I do not see any mess here. Sorry, I was speaking of a technical mess, not a user's mess. What I was alluding to specifically is explained very well in PEP 394. The technical reasoning

Re: PYTHONPATH

2011-04-16 Thread Algis Kabaila
On Saturday 16 April 2011 20:03:22 jmfauth wrote: > On 16 avr, 06:16, harrismh777 wrote: > > By default the sys.path always shows the directory python > > was opened in, usually the users home directory. With > > .profile you can set the path any way you want... most > > useful for setting up sp

Re: PYTHONPATH

2011-04-16 Thread jmfauth
On 16 avr, 06:16, harrismh777 wrote: > By default the sys.path always shows the directory python was opened in, > usually the users home directory. With  .profile  you can set the path > any way you want... most useful for setting up special test directories > ahead of the "real" code, or for se

Re: PYTHONPATH

2011-04-16 Thread Algis Kabaila
On Saturday 16 April 2011 14:16:59 harrismh777 wrote: > Algis Kabaila wrote: > > Is PYTHONPATH a system variable that sets the > > path for several sessions and if so, where in the system is > > it? Do I need to create one for setting python path for > > several sessions? > >snip... > Of course t

Re: PYTHONPATH

2011-04-15 Thread harrismh777
Algis Kabaila wrote: Is PYTHONPATH a system variable that sets the path for several sessions and if so, where in the system is it? Do I need to create one for setting python path for several sessions? It can be, and there are lots of ways to accomplish what you want, some of which depends on t

Re: PYTHONPATH

2011-04-15 Thread Algis Kabaila
On Friday 15 April 2011 19:21:12 Chris Rebert wrote: > On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila wrote: > > Hi, > > >>snip.. > It is an environment variable: > http://en.wikipedia.org/wiki/Environment_variable > > Alternatively, you can use a .pth file to add directories to > the module se

Re: PYTHONPATH

2011-04-15 Thread Gabriel Genellina
En Fri, 15 Apr 2011 05:33:18 -0300, Algis Kabaila escribió: An elementary question that is bugging me, regarding sys.path values.sys.path can be altered easily, but the changes last for the current session only. I would like the changes to stay for several sessions. Is PYTHONPATH a system va

Re: PYTHONPATH

2011-04-15 Thread Chris Rebert
On Fri, Apr 15, 2011 at 1:33 AM, Algis Kabaila wrote: > Hi, > > An elementary question that is bugging me, regarding sys.path > values.sys.path can be altered easily, but the changes last for > the current session only. I would like the changes to stay for > several sessions.  Is PYTHONPATH a syst

Re: PYTHONPATH and eggs

2010-03-04 Thread geoffbache
On Mar 4, 3:24 am, David Cournapeau wrote: > On Wed, Mar 3, 2010 at 7:14 PM, geoffbache wrote: > > Unfortunately, the location from PYTHONPATH ends up after the eggs in > > sys.path so I can't persuade Python to import my version. The only way > > I've found to fix it is to copy the main script

Re: PYTHONPATH and eggs

2010-03-03 Thread David Cournapeau
On Wed, Mar 3, 2010 at 7:14 PM, geoffbache wrote: > Unfortunately, the location from PYTHONPATH ends up after the eggs in > sys.path so I can't persuade Python to import my version. The only way > I've found to fix it is to copy the main script and manually hack > sys.path at the start of it whic

Re: PYTHONPATH and eggs

2010-03-03 Thread Jonathan Gardner
On Wed, Mar 3, 2010 at 2:14 AM, geoffbache wrote: > > I have a very simple problem that seems to have no simple solution. > > I have a module which is installed centrally and lives in a Python > egg. I have experimented with some minor changes to it and would like > to set my PYTHONPATH to pick up

Re: pythonpath

2010-03-01 Thread Albert Hopkins
On Mon, 2010-03-01 at 02:48 -0800, luca72 wrote: > Sorry for my stupid question if i have to load module from a folder i > have to append it to the sys path the folder? > ex: > if my folder module is /home/lucak904/Scrivania/Luca/enigma2 > i do this : > import sys > sys.path.append('/home/lucak90

Re: pythonpath

2010-03-01 Thread 刘宇辉
>Sorry for my stupid question if i have to load module >from a folder ihave to append it to the sys path the >folder? >ex: >if my folder module is /home/lucak904/Scrivania/Luca/enigma2 >i do this : >import sys >sys.path.append('/home/lucak904/Scrivania/Luca/enigma2') >If this is correct why when

Re: pythonpath

2009-11-21 Thread Dave Angel
Ray Holt wrote: Is there a way to make python point to a different directory for modules. I don't like to keep my modules in the program directory, but I can't figure out from the shell how to get the program to look in another directory. I am using XP Pro as an operating system and python2.6

Re: PYTHONPATH issue with sibling package names

2009-09-10 Thread Stuart Moffatt
On Sep 10, 10:12 am, "Diez B. Roggisch" wrote: > Stuart Moffatt wrote: > > Environment: Eclipse 3.4.2, Windows XP Pro SP2, Pydev 1.4.4, python > > 2.6 > > > When I work in eclipse with java, I like to break up my client and > > server packages, like this: > > > client-project/src/org/me/client > >

Re: PYTHONPATH issue with sibling package names

2009-09-10 Thread Diez B. Roggisch
Stuart Moffatt wrote: > Environment: Eclipse 3.4.2, Windows XP Pro SP2, Pydev 1.4.4, python > 2.6 > > When I work in eclipse with java, I like to break up my client and > server packages, like this: > > client-project/src/org/me/client > > server-project/src/org/me/api > server-project/src/org/

Re: PYTHONPATH and multiple python versions

2009-06-05 Thread Javier Collado
Hello, I think that virtualenv could also do the job. Best regards, Javier 2009/6/5 Red Forks : > maybe a shell script to switch PYTHONPATH, like: > start-python-2.5 > start-python-2.4 ... > On Fri, Jun 5, 2009 at 4:56 PM, David Cournapeau wrote: >> >> Hi, >> >> As I don't have admin privil

Re: PYTHONPATH and multiple python versions

2009-06-05 Thread Red Forks
maybe a shell script to switch PYTHONPATH, like: start-python-2.5 start-python-2.4 ... On Fri, Jun 5, 2009 at 4:56 PM, David Cournapeau wrote: > Hi, > > As I don't have admin privileges on my main dev machine, I install a > good deal of python modules somewhere in my $HOME, using PYTHONPATH to >

Re: PYTHONPATH var

2009-05-29 Thread Dave Angel
Sergey Dikovitsky wrote: Hi guys. I have a question regarding runtime definition of the variable PYTHONPATH. Do you know how without modifying of source code change the value for this var. Value stores in the system var sys.path, but the first item of this list, path[0], is the directory containi

Re: PYTHONPATH var

2009-05-29 Thread Steven D'Aprano
On Fri, 29 May 2009 03:50:54 -0700, insfor wrote: > Hi guys. I have a question regarding runtime definition of the variable > PYTHONPATH. Do you know how without modifying of source code change the > value for this var. "Syntax error: sentence seems to be a question, but is missing a question m

Re: PYTHONPATH on Windows XP module load problem

2009-05-21 Thread Andreas Otto
Hi, I solved the problem ... thank you for your help mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
Hi, I setup the PYTHONPATH environment variable too does windows use this variable ? mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Scott David Daniels
Andreas Otto wrote: I have done additional research. 1. setup a "setup.py" script 2. compiled the extension 3. copy the extension to the test directory -> cp ../pymsgque/build/lib.win32-3.0-pydebug/pymsgque.pyd . This doesn't work. Windows is beseiged by trojan writers.

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
Hi, after we know how your "bathroom" looks like ... I have done additional research. 1. setup a "setup.py" script 2. compiled the extension 3. copy the extension to the test directory -> cp ../pymsgque/build/lib.win32-3.0-pydebug/pymsgque.pyd .

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
Hi, I try to use "distutils" and "setup.py" to create an C extension Now a list of problems: 1. I'm using automake, autoconf to setup the build-environment for example CPPFLAGS -> how can I transport the CPPFLAGS on the commandline to setup.py I c

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Scott David Daniels
Andreas Otto wrote: Does this help? http://pyfaq.infogami.com/is-a-pyd-file-the-same-as-a-dll this link is nice but I'm still confused ... 1. on LINUX I create a "pymsgque.so" and I can load this library with "import pymsgque" And my bathroom is covered in wallpaper. 2. in WIN

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Christian Heimes
Andreas Otto wrote: > 1. on LINUX I create a "pymsgque.so" and I can load this library > with "import pymsgque" > > 2. in WINDOWS, I expect to create a "pymsgque.dll" and do the > same as on unix "import pymgque" > > -> is this behaviour is supported or not ??? > >

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
MRAB wrote: > Andreas Otto wrote: >> Hi, >> >> I have the following problem using python on windows. >> I crated a binary extension called >> >> pymsgque.dll >> >> on windows. The same extension works fine on UNIX/Linux. >> >> The problem is on Windows. The build is no problem

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread MRAB
Andreas Otto wrote: Hi, I have the following problem using python on windows. I crated a binary extension called pymsgque.dll on windows. The same extension works fine on UNIX/Linux. The problem is on Windows. The build is no problem but python is not able to load this exte

Re: PYTHONPATH on Mac 10.5

2009-02-25 Thread Python Nutter
+1 for site packages and standard shebang, still lets you launch with python first followed by .py file or followed by .py file also for some clues, just open up a terminal in your Mac OS X computer and check out your exports your PATH will be different depending on all the software and developme

Re: PYTHONPATH on Mac 10.5

2009-02-25 Thread Philip Semanchuk
On Feb 25, 2009, at 3:20 PM, Vincent Davis wrote: I have looked around for a good howto setup PYTHONPATH on Mac os x 10.5 Although I get many results I am not sure which is correct. I am not sure if it is different for 10.5 over previous versions. Does anyone know of a well documented set

Re: PYTHONPATH in Windows

2008-11-29 Thread Martin v. Löwis
> But no PYTHONPATH variable shows up in my environment settings. To answer a long question with a single sentence: just add the variable, and be done with it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH in Windows

2008-11-29 Thread waltbrad
On Nov 29, 1:39 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > waltbrad schrieb: > > > > > PYTHONPATH is a concept I've never been able to get straight.  I can't > > see the difference between this and just setting paths in the Windows > > environment variables. So, for the longest time I just

Re: PYTHONPATH in Windows

2008-11-29 Thread Diez B. Roggisch
waltbrad schrieb: PYTHONPATH is a concept I've never been able to get straight. I can't see the difference between this and just setting paths in the Windows environment variables. So, for the longest time I just never worried about it. Now, I'm going through James Bennett's "Practical Django P

Re: PYTHONPATH and modules

2008-08-28 Thread Bruno Desthuilliers
Juan a écrit : Hi I am programming a little script that makes use of a module I developed before. The utils are inside the directory src of the directory utils, and the package is nutum.utils. The script is in the directory src inside the directory sysinfo, and the package is nutum.sysinfo. Wo

Re: PYTHONPATH breaks MySQLdb

2008-04-25 Thread Diez B. Roggisch
Aljosa Mohorovic schrieb: i have a working MySQLdb module (/usr/lib/python2.4/site-packages/ MySQL_python-1.2.2-py2.4-linux-i686.egg), using it without problems. "clean shell" after login: python -c "import MySQLdb" reports no errors if i export PYTHONPATH: export PYTHONPATH=/var/www/projects/u

Re: PYTHONPATH and PYTHON_PATH

2007-12-04 Thread Christian Heimes
loial wrote: > Is there any difference? > > Does it matter which I use? Yes, it does matter. The former is interpreted by Python, the latter isn't. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on OS X

2007-10-11 Thread mhearne808[insert-at-sign-here]gmail[insert-dot-here]com
On Oct 10, 4:59 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Oct 11, 8:00 am, "mhearne808[insert-at-sign-here]gmail[insert-dot- > > > > here]com" <[EMAIL PROTECTED]> wrote: > > I'm missing something major here. I'm trying to add a directory to my > > python path using the PYTHONPATH enviro

Re: PYTHONPATH on OS X

2007-10-10 Thread Graham Dumpleton
On Oct 11, 8:00 am, "mhearne808[insert-at-sign-here]gmail[insert-dot- here]com" <[EMAIL PROTECTED]> wrote: > I'm missing something major here. I'm trying to add a directory to my > python path using the PYTHONPATH environment variable, and it's being > ignored by the Python interactive shell. > >

Re: PYTHONPATH on OS X

2007-10-10 Thread Anthony
On Oct 10, 11:00 pm, "mhearne808[insert-at-sign-here]gmail[insert-dot- here]com" <[EMAIL PROTECTED]> wrote: > I'm missing something major here. I'm trying to add a directory to my > python path using the PYTHONPATH environment variable, and it's being > ignored by the Python interactive shell. > >

Re: PYTHONPATH on OS X

2007-10-10 Thread Diez B. Roggisch
mhearne808[insert-at-sign-here]gmail[insert-dot-here]com schrieb: > I'm missing something major here. I'm trying to add a directory to my > python path using the PYTHONPATH environment variable, and it's being > ignored by the Python interactive shell. > > Below is a capture of what I did. Note

Re: PYTHONPATH, opensuse10.2, gtk not working

2007-10-05 Thread Silfheed
On Oct 5, 1:04 pm, Silfheed <[EMAIL PROTECTED]> wrote: > On Oct 4, 8:31 pm, Silfheed <[EMAIL PROTECTED]> wrote: > > > > > On Oct 4, 7:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > > > > Silfheed wrote: > > > > Heyas > > > > > So I'm trying to do two things, install a little gnome taskbar applet

Re: PYTHONPATH, opensuse10.2, gtk not working

2007-10-05 Thread Silfheed
On Oct 4, 8:31 pm, Silfheed <[EMAIL PROTECTED]> wrote: > On Oct 4, 7:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > > > > > Silfheed wrote: > > > Heyas > > > > So I'm trying to do two things, install a little gnome taskbar applet > > > (timer-applet) that was written in python and experiment with

Re: PYTHONPATH, opensuse10.2, gtk not working

2007-10-04 Thread Silfheed
On Oct 4, 7:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Silfheed wrote: > > Heyas > > > So I'm trying to do two things, install a little gnome taskbar applet > > (timer-applet) that was written in python and experiment with writing > > python gtk apps. I've installed (through yast) gtk, gtk2,

Re: PYTHONPATH, opensuse10.2, gtk not working

2007-10-04 Thread Steve Holden
Silfheed wrote: > Heyas > > So I'm trying to do two things, install a little gnome taskbar applet > (timer-applet) that was written in python and experiment with writing > python gtk apps. I've installed (through yast) gtk, gtk2, gtk2-devel, > python-gtk, python-gtk-devl, python-gtk-doc but I sti

Re: PYTHONPATH not working on Windows XP (?)

2007-09-03 Thread Sergio Correia
Thanks! It worked straightforward, and it's easier than messing with the enviromental variables or the registry. BTW, I'm still wondering how did Autohotkey got included in sys.path (there are no other .pht files on my PC) Regards, Sergio On 9/3/07, olivier <[EMAIL PROTECTED]> wrote: > Hi, > >

Re: PYTHONPATH not working on Windows XP (?)

2007-09-03 Thread olivier
Hi, > Any suggestions for adding my path to sys.path permanently? You can write a file in Lib/site-packages with a 'pth' extension (the name itself doesn't matter) containing the path you want to add. Example: MyCustomLib.pth: C:/docs/utils And be careful with path separator on win32. It should

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-05 Thread Gabriel Genellina
En Sat, 03 Feb 2007 14:25:31 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: > Is it possible to change the searchpath for modules on the flight, > under winXP ? > Most preferred is some command to extend the searchpath. > (the environment variable PYTHONPATH needs a reboot) PYTHONPATH is use

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
> Just a note, If you run the module from different location, it may not > always work. > > The '..' is relative to the location you are running the module from, > the current directory, and not relative to the location of the module is > at. thanks for the tip Ron, I didn't realized ".." was

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Ron Adam
Stef Mientki wrote: >> Do you mean something like that? >> > import some_module >> Traceback (most recent call last): >> File "", line 1, in ? >> ImportError: No module named some_module > import sys > sys.path.append("..") > import some_module > Rob, > thank you very much, > that

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
Inca wrote: >> Through "My computer" | properties | advanced | Environment Variables" >> you have to reboot. > > The best overall solution is the one where you modify sys.path to add > your own custom paths, I agree, specially in my situation that is the best solution. however Jussi is right in

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Inca
> Through "My computer" | properties | advanced | Environment Variables" > you have to reboot. The best overall solution is the one where you modify sys.path to add your own custom paths, however Jussi is right in that you do not need to reboot. You have to restart any applications that relies on

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
Jussi Salmela wrote: > Stef Mientki kirjoitti: >> Is it possible to change the searchpath for modules on the flight, >> under winXP ? > What do you mean by *on the flight*: inside IDLE? using the command line? No, I run Python, embedded from within a Delphi program. >> Most preferred is some comm

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Jussi Salmela
Stef Mientki kirjoitti: > Is it possible to change the searchpath for modules on the flight, > under winXP ? What do you mean by *on the flight*: inside IDLE? using the command line? > Most preferred is some command to extend the searchpath. > (the environment variable PYTHONPATH needs a reboot) >

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Stef Mientki
> Do you mean something like that? > import some_module > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named some_module import sys sys.path.append("..") import some_module Rob, thank you very much, that's exactly what I want. (Why is th

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-04 Thread Rob Wolfe
Stef Mientki <[EMAIL PROTECTED]> writes: > Is it possible to change the searchpath for modules on the flight, > under winXP ? > Most preferred is some command to extend the searchpath. > (the environment variable PYTHONPATH needs a reboot) Do you mean something like that? >>> import some_module

Re: PYTHONPATH or any other way to set seachpath (winXP) ?

2007-02-03 Thread Sick Monkey
If you need to extend your PATH variable, I have used this in the past. ~~ def AddSysPath(new_path): new_path = os.path.abspath(new_path) do = -1 if os.path.exists(new_path): do = 1 # check against all paths currently available

Re: PYTHONPATH vs PATH?

2006-05-08 Thread Rene Pijlman
Fredrik Lundh: >PATH is used by the operating system to find executables, and PYTHONPATH >is used by Python to find Python modules. Yes, but Python also finds modules in its own installation. So changing PATH may cause another installation of Python to be run, which may have some other set of inst

  1   2   >