473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Re: Files application architecture

En Fri, 05 Sep 2008 12:53:12 -0300, Benjamin Watine <wa****@cines.fr>
escribió:
I'm about to develop a small python application and I wonder how to
organize files in this application.
I'm familar to java, so I'm tempted to use the same convention : 1 file
per class and 1 folders per package.
You don't *have* to artificially restrict yourself to one class per file.
In Python it's common to place several related classes in the same module
(i.e., file). You don't have to write so much boilerplate code as in Java,
so classes tend to be smaller in size; you may even find classes with an
empty body.
I know that packages doesn't exists in python, they are modules instead.
Uh? Have you read the Python Tutorial?
http://docs.python.org/tut/node8.htm...00000000000000
So, what are best practices for organizing files and folders in a small
python project ?
I've found PEP8 (http://www.python.org/dev/peps/pep-0008/) that gives a
lot of good hints on coding convention, but nothing about files
organization.
A small application may consist of just a main entry point and some
imported modules, all residing in the same directory. It might not require
to define any package. Perhaps later, when some module grows too much, you
may want to refactor it, creating a package. But try to keep simple things
simple.

--
Gabriel Genellina

Sep 5 '08 #1
0 958

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sean | last post by:
Hi, I need to save data into a XML file using an existing schema (I have the ..xsd file) If the record exists then the data must be read from the DB in MS Access 2000 and saved into a XML...
0
by: Steve B. | last post by:
Hi all, I'm looking for a pretty way to globalize an ASP.Net application. I base on the Globalization Architecture for ASP.NET article from the MSDN Library. If I have a user control...
2
by: Raterus | last post by:
Hi, I'm after this setup, and I'm just wondering if this is even feasible. I'd like to store my asp.net project remotely, on a network drive (all the project files, everything), But I want to be...
4
by: Bennett Haselton | last post by:
If I add this to my web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /> </authentication> I can configure the...
5
by: Joseph Farmer | last post by:
I would like to understand how ASP.NET 1.1 detects changes to aspx files and then forces an unload of the application domain (forcing a recompilation) - can anyone give me a clue as to where I can...
0
by: jehugaleahsa | last post by:
On Jun 13, 3:09 pm, "Bob Powell " <b...@spamkillerbobpowell.net> wrote: I apologize for the size. I should have probably put this on a blog or something. I'm not interested in tools. I...
1
by: abhijitbkulkarni | last post by:
Hello, I am designing a .NET database application that uses 3 tier architecture. Starting initially, this application will be desktop application but I will convert it into a website later but...
2
by: Benjamin Watine | last post by:
Hi, I'm about to develop a small python application and I wonder how to organize files in this application. I'm familar to java, so I'm tempted to use the same convention : 1 file per class and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.