472,986 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How does IPython modify the sys.path?

Hello all:

I installed IPython on my XP machine today and find that my sys.path
has been changed
as follows:
>import sys
print sys.path
['',
'C:\\Program Files\\Python24\\scripts',
'C:\\WINDOWS\\system32\\python24.zip',
'C:\\Documents and Settings\\Daniel\\Desktop',
'C:\\Program Files\\Python24\\DLLs',
'C:\\Program Files\\Python24\\lib',
'C:\\Program Files\\Python24\\lib\\plat-win',
'C:\\Program Files\\Python24\\lib\\lib-tk',
'C:\\Program Files\\Python24',
'C:\\Program Files\\Python24\\lib\\site-packages',
'C:\\Program Files\\Python24\\lib\\site-packages\\PIL',
'C:\\Program Files\\Python24\\lib\\site-packages\\win32',
'C:\\Program Files\\Python24\\lib\\site-packages\\win32\\lib',
'C:\\Program Files\\Python24\\lib\\site-packages\\Pythonwin',
'C:\\Program Files\\Python24\\lib\\site-packages\\wx-2.6-msw-ansi',
'C:\\Program Files\\Python24\\lib\\site-packages\\reportlab_2_0',
'C:\\Program Files\\Python24\\lib\\site-packages\\IPython/Extensions',
'C:\\Documents and Settings\\Daniel\\_ipython']
Obviously, IPython changed my sys.path and added an entry in the end as
"C:\\Documents and Settings\\Daniel\\_ipython'"
However, I cannot figure out how IPython can change my sys.path.

I refer to all the following sources
1http://www.python.org/doc/current/inst/search-path.html Installing
Python Modules
2KEY_LOCAL_MACHINE\Software\Python\PythonCore\2.4\ PythonPath
3My machine has no environment variable "PYTHONPATH"
4There is no *.pth file under
C:\Program Files\Python24\Lib\site-packages
that contains that information (i.e. C:\\Documents and
Settings\\Daniel\\_ipython)
So how dos IPython modify my sys.path without trace???

Thank you very much!
-Daniel

Sep 22 '06 #1
2 4743
Daniel Mark wrote:
So how dos IPython modify my sys.path without trace???
sys.path.append()

Specifically, line 321 of ipmaker.py

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Sep 22 '06 #2
Daniel Mark wrote:
However, I cannot figure out how IPython can change my sys.path.

I refer to all the following sources
1http://www.python.org/doc/current/inst/search-path.html Installing
Python Modules
2KEY_LOCAL_MACHINE\Software\Python\PythonCore\2.4\ PythonPath
3My machine has no environment variable "PYTHONPATH"
4There is no *.pth file under
C:\Program Files\Python24\Lib\site-packages
that contains that information (i.e. C:\\Documents and
Settings\\Daniel\\_ipython)
did you look up sys.path in the documentation ?

A list of strings that specifies the search path for modules.
Initialized from the environment variable PYTHONPATH, plus an
installation-dependent default. /.../

A program is free to modify this list for its own purposes.

http://pyref.infogami.com/sys.path

</F>

Sep 22 '06 #3

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

Similar topics

1
by: Yaroslav Bulatov | last post by:
> Hi, > > Equis Uno wrote: > > > I use meta-x shell to start a shell and then once I see a shell > > prompt I enter the python command and I get a well-behaved python > > shell inside of emacs....
1
by: Ismael Herrera | last post by:
Hi,i wonder if there is an editor or ide that has similar dinamic instrospection features as ipython? ,since i have failed to find one, i spend more time coding in ipython than in my editor. ...
0
by: Fernando Perez | last post by:
Hi all, The IPython team is happy to release version 0.7.2, with a lot of new enhancements, as well as many bug fixes. We hope you all enjoy it, and please report any problems as usual. ...
4
by: Daniel Mark | last post by:
Hello all: I have found a useful module in IPython, named 'from IPython.ipstruct import Struct". So I can use it as follows: #################################### from IPython.ipstruct...
5
by: Lou Pecora | last post by:
I installed the SciPy superpackage and have pylab, matplotlib, scipy, and numpy apparently running well. But I want to use matplotlib/pylab interactively. The instructions suggest doing this in...
0
by: Ville Vainio | last post by:
Hi all, The IPython team is happy to release version 0.7.3, with a lot of new enhancements, as well as many bug fixes (including full Python 2.5 support). We hope you all enjoy it, and please...
1
by: Karlo Lozovina | last post by:
Based on the idea from 'Open Command Window Here' utility from MS - add a context menu item, which allows you to open IPython in selected directory. ---cut-here--- Windows Registry Editor...
0
by: Marko Bozikovic | last post by:
Hi all, I have a small problem with IPython shell on Windows. If I run 'python C:\python\scripts\ipython -p pysh' from cmd.exe or directly from Run dialog, I don't get any output from 'shell'...
2
by: David Sanders | last post by:
Hi, I have a script with function definitions which I load into ipython for interactive use. These functions modify a global numpy array, whose size I need to be able to change interactively. ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.