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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:35:34+00:00 2026-06-12T15:35:34+00:00

I have several compiled python modules; they are put into a single .so (to

  • 0

I have several compiled python modules; they are put into a single .so (to avoid runtime linking, there are cross-module symbol dependencies), but a number of symlinks points to this .so:

foo.so -> liball.so
bar.so -> liball.so
liball.so

This way, I can do import foo (Python will call initfoo() defined in liball.so) or import bar (calls initbar()).

I am wondering if this approach will work on Windows?

  • 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-12T15:35:35+00:00Added an answer on June 12, 2026 at 3:35 pm

    Probably not, but you could achieve your goal with

    import sys
    import liball
    sys.modules['foo'] = liball
    sys.modules['bar'] = liball
    

    if you need to import them at several places, or with

    import liball as foo, libalb as bar, liball
    

    if you need that only at one place.

    It might be, however, that the distinction between initfoo() and initbar() cannot be held and that both must be done so that the module effectively contains everything to be contained in both modules.

    If foo partially contains the same symbols as bar, but with a different meaning, this approach won’t work. But then you can just copy the file. This will occupy more disk space than needed, but that doesn’t hurt so much, IMHO.

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

Sidebar

Related Questions

I have several python modules (organized into packages), which depend on each other .
I have several resources in my iPhone app and when they get compiled they
I have a python-based GTK application that loads several modules. It is run from
I have a C# website. It references several compiled dlls. My dlls need to
I have a project A linked to a project B. B is compiled into
At work we have several Solaris servers. Each server runs apache which we compiled
I have several large embedded bitmap files in my resource project. The compiled exe
I have written several program and found out that when compiled in 64bit, the
I have several serializable classes that were compiled without specifying a serialVersionUID. I now
I have several files which is causing a compile error, can the following be

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.