On 02/10/2012 04:00 PM, Peter Otten wrote:
Sorry, you didn't mention that in the post I responded to and I didn't
follow the thread closely.
I found a description for declare_namespace() at
http://peak.telecommunity.com/DevCenter/PkgResources
but the text explaining the function is completely u
Andrea Crotti wrote:
> On 02/10/2012 03:27 PM, Peter Otten wrote:
>> The package a will be either a.c/a/ or a.b/a/ depending on whether
>> a.c/ or a.b/ appears first in sys.path. If it's a.c/a, that does not
>> contain a c submodule or subpackage.
>
>
> I would agree if I didn't have this declar
Peter Otten wrote:
> If it's a.c/a, that does not contain a c submodule or subpackage.
Sorry, I meant a.b/a
--
http://mail.python.org/mailman/listinfo/python-list
On 02/10/2012 03:27 PM, Peter Otten wrote:
The package a will be either a.c/a/ or a.b/a/ depending on whether
a.c/ or a.b/ appears first in sys.path. If it's a.c/a, that does not
contain a c submodule or subpackage.
I would agree if I didn't have this declaration
__import__('pkg_resources').
Andrea Crotti wrote:
> Ok now it's getting really confusing, I tried a small example to see
> what is the real behaviour,
> so I created some package namespaces (where the __init__.py declare the
> namespace package).
>
>/home/andrea/test_ns:
>total used in directory 12 available 5655372
On 02/10/2012 03:06 PM, Dave Angel wrote:
Yes, you've got periods in your directory names. A period means
something special within python, and specifically within the import.
When you say from a.c import api
You're telling it:from package a get module c, and from there
impoort the sy
On 02/10/2012 09:51 AM, Andrea Crotti wrote:
Ok now it's getting really confusing, I tried a small example to see
what is the real behaviour,
so I created some package namespaces (where the __init__.py declare the
namespace package).
/home/andrea/test_ns:
total used in directory 12 available 565
Ok now it's getting really confusing, I tried a small example to see
what is the real behaviour,
so I created some package namespaces (where the __init__.py declare the
namespace package).
/home/andrea/test_ns:
total used in directory 12 available 5655372
drwxr-xr-x 3 andrea andrea 4096 F
On 02/10/2012 08:08 AM, Andrea Crotti wrote:
I think I finally located the issue with the sys.path extension.
The problem is that I have many namespace directories, for example
lib:
- sub1
- sub2
lib:
- sub3
- sub4
But to have everything working I had lib.sub3 in easy-install.pth.
Now i
I think I finally located the issue with the sys.path extension.
The problem is that I have many namespace directories, for example
lib:
- sub1
- sub2
lib:
- sub3
- sub4
But to have everything working I had lib.sub3 in easy-install.pth.
Now if I try to add something else to the path it d
On 2/1/2012 8:15 AM, Andrea Crotti wrote:
So suppose I want to modify the sys.path on the fly before running some
code
which imports from one of the modules added.
at run time I do
sys.path.extend(paths_to_add)
but it still doesn't work and I get an import error.
Do
import sys
fi
Andrea Crotti wrote:
>
>So suppose I want to modify the sys.path on the fly before running some code
>which imports from one of the modules added.
>
>at run time I do
>sys.path.extend(paths_to_add)
>
>but it still doesn't work and I get an import error.
Are you actually adding multiple paths? On
On 2 fév, 11:03, Andrea Crotti wrote:
> On 02/02/2012 12:51 AM, Steven D'Aprano wrote:
>
>
>
> > On Wed, 01 Feb 2012 17:47:22 +, Andrea Crotti wrote:
>
> >> Yes they are exactly the same, because in that file I just write exactly
> >> the same list,
> >> but when modifying it at run-time it do
On 02/02/2012 12:51 AM, Steven D'Aprano wrote:
On Wed, 01 Feb 2012 17:47:22 +, Andrea Crotti wrote:
Yes they are exactly the same, because in that file I just write exactly
the same list,
but when modifying it at run-time it doesn't work, while if at the
application start
there is this file
On Wed, 01 Feb 2012 17:47:22 +, Andrea Crotti wrote:
> Yes they are exactly the same, because in that file I just write exactly
> the same list,
> but when modifying it at run-time it doesn't work, while if at the
> application start
> there is this file everything works correctly...
>
> That
On 2 February 2012 04:47, Andrea Crotti wrote:
>
> Yes they are exactly the same, because in that file I just write exactly
> the same list,
> but when modifying it at run-time it doesn't work, while if at the
> application start
> there is this file everything works correctly...
>
> That's what r
On Feb 1, 10:15 am, Andrea Crotti wrote:
> So suppose I want to modify the sys.path on the fly before running some code
> which imports from one of the modules added.
>
> at run time I do
> sys.path.extend(paths_to_add)
>
> but it still doesn't work and I get an import error.
>
> If I take these p
On 02/01/2012 05:13 PM, Eric Snow wrote:
On Wed, Feb 1, 2012 at 9:15 AM, Andrea Crotti wrote:
So suppose I want to modify the sys.path on the fly before running some code
which imports from one of the modules added.
at run time I do
sys.path.extend(paths_to_add)
but it still doesn't work and
On 1 fév, 17:15, Andrea Crotti wrote:
> So suppose I want to modify the sys.path on the fly before running some code
> which imports from one of the modules added.
>
> at run time I do
> sys.path.extend(paths_to_add)
>
> but it still doesn't work and I get an import error.
>
> If I take these path
So suppose I want to modify the sys.path on the fly before running some code
which imports from one of the modules added.
at run time I do
sys.path.extend(paths_to_add)
but it still doesn't work and I get an import error.
If I take these paths and add them to site-packages/my_paths.pth
everythi
20 matches
Mail list logo