[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Ideal directory structure?

Hello everyone,

I've searched the archives of this list but haven't found a post about directory structure that I remember reading. So I'm going to ask the question again.

What is the best directory structure for a python application?

If I have a package called foo that installs a script called foo and a package called foo, this is what I would do:

    foo                            python script
    Foo/                          package

However, this is bad for two reasons:

1. It is against PEP 8:
Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.
2. This will not work on a case-insensitive filesystem, since Foo and foo are the same.

One alternative that I can think of is:


Here I don't understand how I could have the following line in my code:

    from foo include bar

How do you structure your folders?



Reply to: