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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:25:59+00:00 2026-06-09T05:25:59+00:00

There currently exists a socket library in Python: Reference : http://docs.python.org/library/socket.html However, this library

  • 0

There currently exists a socket library in Python:

Reference: http://docs.python.org/library/socket.html

However, this library does not include functionality for referencing an existing socket based off a file descriptor. I am currently developing Python bindings for a C++ library which opens up a socket first and need a way to reference this opened socket in Python after-the-fact. Keep in mind that this is on Windows (I am using a cross-platform layer of abstraction which neglects file handles).

The code is similar to this:

fd = connect(...) # file descriptor
os.read(fd, buffer)
os.close(fd)

I am looking to find a way to actually define a socket object based off the file descriptor without the by-value duplication found in os.dup and os.dup2.

Would anyone know a way to reference this?

  • 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-09T05:26:00+00:00Added an answer on June 9, 2026 at 5:26 am

    As it doesn’t appear that this question has been answered as of yet (for 1 week), I’ll state my solution.

    I implemented an internal binding for retrieving the socket information from within the library, converting the ctypes to pytuples. Because the application itself is wrapped in py2exe, this modification is unobtrusive to the end-user.

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

Sidebar

Related Questions

There is currently this Prototype code that does a PUT: new Ajax.Request(someUrl, { method:
I'm currently studying the malloc implementation for my homework. I know there exists some
I currently encounter a problem and wonder if there exists a better solution for
Currently, I'm maintaining an older ASP.NET website. In the solution, there exists 5 C#
I currently do this to check if one of two elements exists: if ($(.element1).length
Currently I'm working on open source project. There exists bunch of java classes which
Is there a way, how to get currently thrown exception (if exists)? I would
There exists an iframe plugin currently built into CKEditor that allows iframes to be
There Currently is a local debate as to which code is more readability We
Is there currently a way to generate XML files containing tables compatible with Microsoft

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.