On Oct 19, Jarek Zgoda wrote:
> Micah Elliott napisał(a):
>
> >>How to install this structure eg. on Linux? What layout do you
> >>recommend? It's tempting to use /opt hierarchy for installation
> >>target (as it gives relatively much freedom within application
> >>directory), but many administrat
Jarek Zgoda wrote:
> How to install this structure eg. on Linux? What layout do you
> recommend? It's tempting to use /opt hierarchy for installation target
> (as it gives relatively much freedom within application directory),
> but
> many administrators are reluctant to use this hierarchy and pre
Micah Elliott napisał(a):
>>How to install this structure eg. on Linux? What layout do you
>>recommend? It's tempting to use /opt hierarchy for installation
>>target (as it gives relatively much freedom within application
>>directory), but many administrators are reluctant to use this
>>hierarchy
On Oct 19, Jarek Zgoda wrote:
> How to install this structure eg. on Linux? What layout do you
> recommend? It's tempting to use /opt hierarchy for installation
> target (as it gives relatively much freedom within application
> directory), but many administrators are reluctant to use this
> hierarc
Giovanni Bajo napisał(a):
> Remember that the directory where you start the toplevel script is always
> included in the sys.path. This means that you can have your structure like
> this:
>
> main.py
>|
>| - - pkg1
>| - - pkg2
>| - - pkg3
>
> Files in any package can import other
I, too have often come up against the inconvenience of creating
libraries that I want to reuse but that do not want to incorporate into
the Python library. I came up with this Python library addition to
automagically add the directory of where a module resides that I want
to import to the system
Hello again,
Actually, I found a (pretty ugly) workaround to my problem: In every
__init__.py of the subdirectories I created, I add the following lines:
import os.path,sys
for directory,sub_dir,files in os.walk(os.path.normpath(os.path.join(os.path.dirname(__file__),".."))):
sys.path.append(
Maybe looking at the todays thread ["dynamical" importing] can be helpful
also here.
Claudio
P.S. Below a copy of one of the responses:
:
Joerg Schuster wrote:
> I need to import modules from user defined paths. I.e. I want to do
> something like:
>
> module_dir = sys.argv[1]
>
> my_path = os.pa
If I understand you right you need a concept in which you can put the files
of your project where you want, i.e. restructure the nesting of directories
storing your scripts without the problem of breaking the import statements.
This will give you not a solution to any problem you maybe have with
ma
TokiDoki wrote:
> At first, I had all of my files in one single directory, but now, with
> the increasing number of files, it is becoming hard to browse my
> directory. So, I would want to be able to divide the files between 8
> directory, according to their purpose. The problem is that it breaks
I have this problem myself, and as I am a recent Python convert my
aproach may not be conventional - but as it is working for me I thought
I would share.
First off you need to split your code into logical objects. In my case
I have an obvious client and server object, But within each I have
indi
Hello there,
I have been programming python for a little while, now. But as I am
beginning to do more complex stuff, I am running into small organization
problems.
It is possible that what I want to obtain is not possible, but I would
like the advice of more experienced python programmers.
I a
Hello there,
I have been programming python for a little while, now. But as I am
beginning to do more complex stuff, I am running into small
organization problems.
It is possible that what I want to obtain is not possible, but I would
appreciate the advice of more experienced python programmers.
13 matches
Mail list logo