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

  • Home
  • SEARCH
  • 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 6721585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:20:49+00:00 2026-05-26T09:20:49+00:00

I recently came upon a new project with Python as the code-base. I have

  • 0

I recently came upon a new project with Python as the code-base. I have never done Python before – coming from the C/C++ world of compiled code. I am running into some issues understanding my current codebase.

When we write code, we have our libraries (components that are more general than other code), and our application code (code that applies the library), right? In the projects that I’ve worked on before, I would keep both my library code and application in contained folders in one project folder. In C/C++ land, there would be a makefile (or some make system) that hooks everything together so that the includes all work appropriately.

    Project/
           Library/
                   Utilities.cpp
           Application/
                   Main.cpp
           makefile

The project that I am coming onto right now has its own library in the site-packages folder, which itself is located in the IronPython/Python system folder. That library code is ours, and is still “hot” and being worked on. The application code is elsewhere on the system.

This seems like it’s bad design, but my peers insist that this is “just how Python works”. Python supports including/importing. Shouldn’t everything just be self-containedr? It seems odd to scatter code like that.

Thanks!

  • 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-26T09:20:50+00:00Added an answer on May 26, 2026 at 9:20 am

    Python libraries are usually installed via distutils or setuptools. Those utilties install the libraries in python’s site-packages folder, which is where python knows to look for libs when an import x statement is encountered.

    Developing code directly in the site-packages folder seems a little odd, although there’s technically nothing wrong with it. Normally, you’d have something like this:

    ./app1.py
    ./lib1/__init__.py
    ./lib1/lib1.py
    ./lib2/__init__.py
    ./lib2/lib2.py
    ...etc
    

    And then when you were ready to package the libraries up, you can use one of the above mentioned utils to do so (which would then install the libs into site-packages).

    So, to answer your question: there’s no hard and fast rule. I think most python developers would frown on developing directly in site-packages.

    *Setuptools also has a command called develop that installs a link to your development library in site-packages. I’ve used that a few times with good results.

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

Sidebar

Related Questions

I recently came upon a Microsoft article that touted new defensive enhancements of Windows
I recently came upon the need to have compile-time assertions in C++ to check
Question So I've recently came up with some new possible projects that would have
I was recently looking at some vp8 sample decoder code when I came upon
I have recently came upon odd situation; HTML formatted text in my Swing components
I recently came upon the scary idea that Integer.count loops in Ruby start from
I recently came upon some old code which I didn't write. It uses WWW::Facebook::API
I recently came upon something called Rpoku which is a spoken computer language. I
I recently came across this in some code - basically someone trying to create
I came across some code recently that used a custom error handler to turn

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.