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 8831543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:20:00+00:00 2026-06-14T08:20:00+00:00

I developed a program consisting of a package which is executable (i.e. two files

  • 0

I developed a program consisting of a package which is executable (i.e. two files x/__init__.py and x/__main__.py), so I can execute it using python -m x, if the package resides in the python path.

I never tried to distribute Python packages/modules and I don’t have any experience in that field (yet)… I already noticed that there are many different systems and now I have three questions:

  1. Which system is appropiate for a Python 3(.2) program? distribute? distutils? setuptools?

  2. How can I add kind of a “wrapper script” to the distribution that executes the module directly without the hassle with python -m … so that the user can just type x (of course the actual name is a bit more unique 🙂 on the shell.

  3. How can I do 2. in a platfom-independent way?

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-06-14T08:20:02+00:00Added an answer on June 14, 2026 at 8:20 am
    1. Use either distribute or setuptools, the former is a fork of the latter, with some improvements and better documentation. Either one is a big step up from distutils, which is part of the python standard library.

    2. You want a console script, for which you define an entry point:

      entry_points = {
          'console_scripts': [
              'foo = my_package.some_module:main_func',
              'bar = other_module:some_func',
          ],
      

      where foo and bar would be scripts that you can call on the command line. The indicated function will be called with sys.argv[1:] as the first and only argument.

    3. Let the installation tools take care of that; it works fine on Windows. 🙂

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

Sidebar

Related Questions

I developed a program which after every two minutes call db to check new
I've developed a C# program which I'm using as a child process of a
I have developed a program (C#) which creates a SQL database using this code:
I had a program developed in Python (2.7 & 3.2) that reads three files
I developed a command-line (non GUI) C program on Linux using QT Creator, which
i developed client server program using c++,so i want to receive more than 500kb
I have developed a Java program that will count the number of files in
i have recently developed a list program in android in which there is an
I have a binary program developed for Linux which reads lines from a server's
I developed a C++ program which utilises an .exe file through the following code:

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.