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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:00:21+00:00 2026-06-13T00:00:21+00:00

I have a python file generated by swig (no experience with this). It contains

  • 0

I have a python file generated by swig (no experience with this). It contains this at the top:

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

and contains class definitions. Is it possible to generate C# classes from this to represent the ‘data structure’, which has to be hydrated from some proprietary database?

At the end of the day I have to talk to Python from C#. I am currently doing this by writing python files and then invoking Python from C#.

Any feedback would be very much appreciated. 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-13T00:00:22+00:00Added an answer on June 13, 2026 at 12:00 am

    SWIG is for wrapping C or C++ so it can interface with other languages? e.g. you might use swig to wrap some C so you can call it from python or C# – but not to wrap some C# so you can call it from python (or vice-versa).

    Potentially ironpython could be useful in this instance?

    sounds to me what your doing already is the right solution, i.e. invoking python from C#. SWIG is irrelevant as you don’t have any C code to wrap.

    some links that may be helpful are:

    • Call Python from .NET

    • Build Python scripts and call methods from C#

    • Calling python code(.py files) from C#

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

Sidebar

Related Questions

I have a python file that will not correctly perform an import. If I
We have a C++/Fortran software project with a Python front-end generated with SWIG. We
I have a graphviz file generated in Python as follows: strict graph G {
Say I have generated the following binary file: # generate file: python -c 'import
I have an HTML page which is completely generated from a Python file. I
I have to generate an executable (.exe) file from my python program. I would
I have a python file testHTTPAuth.py which uses module deliciousapi and is kept in
I have a Python file with as content: import re import urllib class A(object):
I have a python program/file that I want to run repeatedly and calculate the
I have a Visual Studio project which uses nmake to call a Python file

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.