U
U
unixwz2016-02-19 17:49:34
Python
unixwz, 2016-02-19 17:49:34

How to properly organize project structure (Python)?

Hello. I am interested in such a question as how to properly organize the structure of their projects?
Under the structure, I mean the division of the project into folders and separate files, for example, files containing certain classes in one package, files with forms in another, and so on.
To make it more clear what I'm talking about, I'll talk a little about what I'm doing now and why I had such a question. I am developing a "not very small" Python application in conjunction with the Urwid graphics library (console UI) in my project I have the following files - a file with widget classes that are often used, files with "forms" for example, there is a main window, there is a search box etc.Here the first question already arises, is it right to split forms into classes - a class with the form of the main window, search box, etc. or not? .
The second question is the organization of files in the project, is it worth putting everything into folders so that there are forms in one folder and files with classes in another?
ps I've been doing web development for a long time and folders were just adopted there, how are things going with these on the desktop?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2016-02-19
@sim3x

in python it is customary to think of "modules"
If you have isolated functionality, then it is placed in a module
And if you are close to the web, then copy the django structure and do not suffer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question