On 12/6/2012 11:50 AM, Matt wrote:
It works now. Steven and Alex, thanks for your help!
I ended up leaving sample.py and foo.py and bar.p the way they were, and in
__init__.py putting:
from foo import *
from bar import *
So my mistake was not importing the foo and bar modules into
sub_one/__
It works now. Steven and Alex, thanks for your help!
I ended up leaving sample.py and foo.py and bar.p the way they were, and in
__init__.py putting:
from foo import *
from bar import *
So my mistake was not importing the foo and bar modules into
sub_one/__init__.py.
I also see how the __all_
On Wed, 05 Dec 2012 20:58:46 -0800, Matt wrote:
> I have a directory structure that looks like this:
>
> sample.py
> sub_one/
> __init__.py # defines only the list __all__ = ['foo', 'bar']
> foo.py # defines the function in_foo()
> bar.py # defines the function in_bar()
On 6 Dec, 14:58, Matt wrote:
> I have a directory structure that looks like this:
>
> sample.py
> sub_one/
> __init__.py # defines only the list __all__ = ['foo', 'bar']
> foo.py # defines the function in_foo()
> bar.py # defines the function in_bar()
>
On Thu, Dec 6, 2012 at 3:58 PM, Matt wrote:
> I have about 30 modules in my package (foos and bars) and I don't want 30
> lines at the top of each file that uses this package. What am I doing wrong?
Not necessarily wrong, but definitely something to query: WHY do you
have thirty modules in your
I have a directory structure that looks like this:
sample.py
sub_one/
__init__.py # defines only the list__all__ = ['foo', 'bar']
foo.py # defines the function in_foo()
bar.py # defines the function in_bar()
In sample.py, I have this command at the
d If I do include the tests in the library.zip, it works with
> the tests that I have now, but then I still can't add any new ones
> without the attribute error unless I regenerate the exe every time.
>
> Basically, it seems like it comes down to importing a package outside
> t
the attribute error unless I regenerate the exe every time.
Basically, it seems like it comes down to importing a package outside
the library.zip. So, is there any way to do this with py2exe? Or
even another exe creating application?
Thanks,
MyPetSlug
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have to work with matrices on python and for that i need a package
> NUMPY. I downloaded it and saved it in the same folder as the program
> which imports it. But on running the program it gives an error
> "ImportError: No module named numpy". Do we need to save the fi
I have to work with matrices on python and for that i need a package
NUMPY. I downloaded it and saved it in the same folder as the program
which imports it. But on running the program it gives an error
"ImportError: No module named numpy". Do we need to save the file
required to be imported in a sp
Damjan wrote:
>>Indeed, when i do this, then it works
>>import sys
>>sys.path.append('package')
>>
>>However, why is it that package isn't added automatically to the pad?
>
>
> When you execute a python program the directory where the program is is
> automatically added to sys.path. No other dire
> Indeed, when i do this, then it works
> import sys
> sys.path.append('package')
>
> However, why is it that package isn't added automatically to the pad?
When you execute a python program the directory where the program is is
automatically added to sys.path. No other directory is added to the d
Damjan wrote:
>>I developed a package with a structure like this
>>src/
>>tesfile.py
>>dir1/
>>__init__.py
>>file1.py
>>dir2/
>>__init__.py
>>file2.py
>
>
> Importing dir2/file2 from dir1/file1.py works here, because when yuo started
> the testfile scri
> I developed a package with a structure like this
> src/
> tesfile.py
> dir1/
> __init__.py
> file1.py
> dir2/
> __init__.py
> file2.py
Importing dir2/file2 from dir1/file1.py works here, because when yuo started
the testfile script the src/ directory w
Hi,
I developed a package with a structure like this
src/
tesfile.py
dir1/
__init__.py
file1.py
dir2/
__init__.py
file2.py
The testfile is meant to try the code out that is specified in file1.py
and file2.py
Now i have another project where i want to
15 matches
Mail list logo