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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:19:27+00:00 2026-05-28T07:19:27+00:00

Before simply answering use SWIG or just write it to a file on disk

  • 0

Before simply answering “use SWIG” or “just write it to a file on disk” read this:

I have a C++ client/server program. The client requests data from the server.

The server generates data and calls various routines to check the data.
If all the data is correct, it sends the data via socket to the client.

What I’d like to do is take this raw data (say it was a String type data) and replace
my “various routines” with python programs.

To do this, the raw data will be passed to the python programs to be parsed and checked, then they will need to return a pass/fail value to the C++ server.

Any ideas?

  • 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-28T07:19:28+00:00Added an answer on May 28, 2026 at 7:19 am

    That’s quite backwards from the normal way of doing things, isn’t it!

    You have two main options:

    1. Keep the Python scripts as they are, run them using fork()/exec() or whatever is appropriate to your platform, and parse their output in C++;
    2. Use CPython’s well-documented API to embed it in your C++ program, and invoke the scripts that way.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this must have been answered before here, but I simply can't find
Before moving on to use SVN, I used to manage my project by simply
What are the technical questions I simply must have answers for before I approach
I have a simple xml file and I want to remove everything before the
Before you answer this I have never developed anything popular enough to attain high
For user's password entered in a form before post, I simply just do <?php
Before reading please note that I've googled this and read a ton of articles
Before answering this question, understand that I am not asking how to create my
This has been asked before and people have given very good instructions on how
I am simply baffled by this. It worked before, and I look today and

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.