Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3985106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:51:01+00:00 2026-05-20T05:51:01+00:00

I am having a bit of troubles getting a grasp on how to structure

  • 0

I am having a bit of troubles getting a grasp on how to structure my Python projects. I have read jcalderone: Filesystem structure of a Python project and been looking at the source code of CouchApp, but I’m still feeling very puzzled.

I understand how the files should be structured, but I don’t understand why. I would love if somebody could hook me up with a detailed walk-through of this, or could explain it to me. Simply how to set up a basic python project, and how the files would interact with each other.

I think this is definitely something people coming from other languages like C, C++, Erlang … or people who have never been programming before, could benefit from.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:51:01+00:00Added an answer on May 20, 2026 at 5:51 am

    name the directory something related to your project. When you do releases, you should include a version number suffix: Twisted-2.5.

    Not sure why this is unclear. It seems obvious. It all has to be in one directory.

    Why do things have to be in one directory? Because everyone says so, that’s why.

    create a directory Twisted/bin and put your executables there.

    This is the way Linux works. Executables are in a bin directory. It makes it easy to put this specific directory in your PATH environment variable.

    If your project is expressable as a single Python source file, then put it into the directory and name it something related to your project. For example, Twisted/twisted.py.

    Right. You have /Twisted, /Twisted/bin and /Twisted/twisted.py with your actual, running code in it. Where else would you put it?

    There’s no “why” to this. Where else could you possibly put it?

    If you need multiple source files, create a package instead (Twisted/twisted/, with an empty Twisted/twisted/init.py) and place your source files in it. For example, Twisted/twisted/internet.py.

    This is just the way Python packages work. They’re directories with __init__.py files. The tutorial is pretty clear on this.

    put your unit tests in a sub-package of your package Twisted/twisted/test/.

    Where else would you put your tests? Seriously. There’s no “why?” to this. There’s no sensible alternative.

    add Twisted/README and Twisted/setup.py to explain and install your software, respectively

    Right. Where else would you put them? Again. There’s no “why?” They go in the top directory because — well — that’s what a directory is for. It contains files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a bit of trouble getting my program to read in data from
I'm having a bit of trouble getting a Python regex to work when matching
I've been having quite a bit of trouble getting an MVC2 web application to
Im having a bit of trouble getting my JSON to be recognised by my
I'm having a bit of trouble getting my form validation to work. As of
I'm having a bit of trouble getting my app to show up in the
I'm currently working with PowerPoint in VB.NET and having a bit of trouble getting
Having a bit of trouble using the List.Find with a custom predicate i have
I'm having a bit of trouble getting the right results from a query. At
I am having a bit of trouble getting my head around the following erlang

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.