On 01/11/2012 03:45 PM, Antoon Pardon wrote:
On 01/11/2012 02:57 PM, Peter Otten wrote:
Antoon Pardon wrote:
I have an import problem I can't figure out.
I am using python 2.6.6 on a debian box
In one directory (pylib) I have a file misc.py and
the file testutil.py.
from misc import Rec
On 01/11/2012 02:57 PM, Peter Otten wrote:
Antoon Pardon wrote:
I have an import problem I can't figure out.
I am using python 2.6.6 on a debian box
In one directory (pylib) I have a file misc.py and
the file testutil.py.
from misc import Rec
ImportError: cannot import nam
Antoon Pardon wrote:
> I have an import problem I can't figure out.
> I am using python 2.6.6 on a debian box
>
> In one directory (pylib) I have a file misc.py and
> the file testutil.py.
> from misc import Rec
> ImportError: cannot import name Rec
>
> Why can I import Rec from misc in te
On 01/11/2012 08:21 AM, Antoon Pardon wrote:
I have an import problem I can't figure out.
I am using python 2.6.6 on a debian box
In one directory (pylib) I have a file misc.py and
the file testutil.py.
testutil.py --
print "in", __name__
from misc imp
Bill Jackson wrote:
> Once again, I am having issues with imports...
>
> Until now, I thought the general guidelines were to rarely use 'from x
> import y' syntax, except when you really want to copy names over.
No, the guideline is to not use "from x import *" except at the interactive
prompt
Bill Jackson wrote the following on 04/27/2007 12:49 PM:
> # importtest/test2/__init__.py
> from someclass import *
> from test2 import *
Sorry typo here:
# importtest/test2/__init__.py
from someclass import *
from mytest import *
--
http://mail.python.org/mailman/listinfo/python-list
Stéphane Ninin wrote:
> Also sprach Stéphane Ninin :
Sollte es denn möglich sein! Dieser alte Heilige hat in seinem Walde noch
Nichts davon gehört... that intra-package import takes precedence over
absolute import!
> Here is the basic structure of the code (I have reduced it first).
And nicely
Stéphane Ninin wrote:
> Traceback (most recent call last):
> File "main.py", line 8, in ?
> main()
> File "main.py", line 5, in main
> handler = HandlerFactory().makeHandler(command)
> File "c:\ROOT\Handlers\HandlerFactory.py", line 6, in HandlerFactory
> import Handlers.Default.H
Also sprach Stéphane Ninin :
>
>
> ... when I start main.py, I get:
>
> Traceback (most recent call last):
> File "main.py", line 8, in ?
> main()
> File "main.py", line 5, in main
> handler = HandlerFactory().makeHandler(command)
> File "c:\ROOT\Handlers\HandlerFactory.py", line
Grig Gheorghiu wrote:
In my experience (as a tester), it is easier to deal with PYTHONPATH
than to add the my.pth file to the site-packages directory. The main
reason is that I have my custom packages and modules in a directory
tree that I deploy on many clients/servers/platforms/OS versions, some
In my experience (as a tester), it is easier to deal with PYTHONPATH
than to add the my.pth file to the site-packages directory. The main
reason is that I have my custom packages and modules in a directory
tree that I deploy on many clients/servers/platforms/OS versions, some
running different vers
Thanks for your help Steve and F. Petitjean. Sorry for taking so long
to get back, I was away from my lab for a few days.
The path to my directory was not included in the sys.path list. Adding
a my.pth file to the site-packages directory fixed the import problem.
F. Petitjean, I originally edited
F. Petitjean wrote:
Le 13 Jan 2005 21:58:36 -0800, mike kreiner a écrit :
I am having trouble importing a module I created. I'm running PythonWin
on Windows XP if that helps. I saved my module in a folder called
my_scripts in the site-packages directory. I edited the python path to
include the my_s
Le 13 Jan 2005 21:58:36 -0800, mike kreiner a écrit :
> I am having trouble importing a module I created. I'm running PythonWin
> on Windows XP if that helps. I saved my module in a folder called
> my_scripts in the site-packages directory. I edited the python path to
> include the my_scripts folde
14 matches
Mail list logo