Okay, I solved my problem with Python finding modules:
I put the following into a file in my home directory, on the good advice of
Andrea Crotti:
import sys
sys.path.append('/home/foo/mypath'
I named the file ~/pypath.py, so now, in idle:
import pypath
No errors.
I'm still getting a little
On 2/17/11 11:11 AM, Tim Hanson wrote:
import pypath
import intersect #the name of a file that contains the above short function.
intersect('spam','spmmer')
Traceback (most recent call last):
File pyshell#2, line 1, inmodule
intersect('spam','spmmer')
TypeError: 'module' object is not
On 17/02/2011 17:11, Tim Hanson wrote:
Okay, I solved my problem with Python finding modules:
I put the following into a file in my home directory, on the good advice of
Andrea Crotti:
import sys
sys.path.append('/home/foo/mypath'
I named the file ~/pypath.py, so now, in idle:
import pypath
now.. another problem..
when i type me = code2()
the error is here..
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: 'module' object is not callable
--
http://mail.python.org/mailman/listinfo/python-list
codefly wrote:
now.. another problem..
when i type me = code2()
the error is here..
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: 'module' object is not callable
By creating a new thread for each new question, you're forcing yourself
to repeat the code
On 2009-12-16, codefly coron...@gmail.com wrote:
now.. another problem..
Sorry to be so blunt, but your main problem is that you don't
know how to ask questions. Fix that, and everything else will
become much easier:
1) Read this: http://catb.org/~esr/faqs/smart-questions.html
2) Read
Am going through Chapter 9 - HTTP Web Services in dive into Python. It
uses the following:
data = urllib.urlopen('http://diveintomark.org/xml/atom.xml').read()
The page no longer exists, can anyone recommend an alternative page to
use?
Ben
--
Jeff Shannon wrote:
Judging from this, I think that os.environ['USERPROFILE'] seems like it
may do what you want, though os.environ['APPDATA'] might be useful as
well. Of course, if you're trying to get something to work
cross-platform, things may be more difficult -- but that's because
Hi everyone,
I have two problems:
1. How can I keep my changes in sys.path after closing the interpreter?
2. os.path.expanduser(~) always gives me C:\\ instead of my
homepath. I have tried to change my homepath in WinXP using set
homepath(in command line), and alsaw using the Environment
Amir Dekel [EMAIL PROTECTED] writes:
Hi everyone,
I have two problems:
1. How can I keep my changes in sys.path after closing the interpreter?
Just how flexible does this need to be? sys.path can easily be altered
at startup from within a sitecustomize module (section 3.28 -- site --
Jeff Shannon wrote:
Not only can one modify the environment variable PYTHONPATH, but one can
also use a .pth file. Under windows, when the interpreter starts up it
will search its default sys.path for any files with extension .pth; if
it finds any, then it will use each line of those files as
Amir Dekel wrote:
2. os.path.expanduser(~) always gives me C:\\ instead of my
homepath. I have tried to change my homepath in WinXP using set
homepath(in command line), and alsaw using the Environment Variables
in WinXP system properties, non helped. I really have to fix this
somehow.
Well,
Maybe, set environment variable PYTHONPATH. More details at
http://www.python.org/doc/current/tut/node8.html
/Jean Brouwers
In article [EMAIL PROTECTED], Lenard Lindstrom [EMAIL PROTECTED]
wrote:
Amir Dekel [EMAIL PROTECTED] writes:
Hi everyone,
I have two problems:
1. How
Lenard Lindstrom wrote:
Amir Dekel [EMAIL PROTECTED] writes:
Hi everyone,
I have two problems:
1. How can I keep my changes in sys.path after closing the interpreter?
Saving sys.path changes between interpreter runs would be more involved.
On Windows Python loads the initial module search
14 matches
Mail list logo