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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:19:35+00:00 2026-05-11T14:19:35+00:00

Is there any way to call an installed python egg from python code? I

  • 0

Is there any way to call an installed python egg from python code? I need to cal a sphinx documentation generator from within a python code, and currently i’m doing it like this:

os.system( 'sphinx-build.exe -b html c:\\src c:\\dst' )

This works, but requires some additional configuration: ‘scripts’ folder inside a python installation folder need to be added to a system PATH ( i’m on Windows ). Is it any better, native way to call an installed python egg?

  • 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. 2026-05-11T14:19:36+00:00Added an answer on May 11, 2026 at 2:19 pm

    So basically, you want to use Sphinx as a library?

    Here is what sphinx-build does:

    from pkg_resources import load_entry_point  load_entry_point('Sphinx==0.5.1', 'console_scripts', 'sphinx-build')() 

    Looking at entry-points.txt in the EGG-INFO directory, notice that the sphinx-build entry point is the sphinx.main function (located in __init__.py).

    Have a look at that and duplicate what it does, and you can use sphinx as a library. I have not looked at the code in detail, but it seems that the bulk of the sphinx-build-command is done by the build method on a Sphinx object.

    In your code, you would have to do something like:

    from sphinx.application import Sphinx s = Sphinx(...) s.build(...) 

    You need to have a look at the Sphinx source code to figure out the parameters to Sphinx.__init__() and Sphinx.build()

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

Sidebar

Ask A Question

Stats

  • Questions 134k
  • Answers 135k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Short version: Controls the JVMs which may be picked with… May 12, 2026 at 6:54 am
  • Editorial Team
    Editorial Team added an answer The most efficient way is to create an array and… May 12, 2026 at 6:54 am
  • Editorial Team
    Editorial Team added an answer IMO, it is better to use separate listeners for Actions.… May 12, 2026 at 6:54 am

Related Questions

I develop a critical application used by a multi-national company. Users in offices all
We have an advanced webpage (ASP.NET, C#), and a application which needs to be
I have an ASP.NET 2.0 application under IIS that has the functionnality of exporting
Is there a way to detect whether IIS is enabled or not? I know

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.