[Python-Dev] C- Python on Windows

17 views
Skip to first unread message

Guenther Sohler

unread,
Jan 15, 2023, 1:32:44 PM1/15/23
to pytho...@python.org
Hi Group,

I have successfully used C-Python (3) in a software project in unix and its great stuff!
The environment was cmake using g++ in Linux

Now when i want to get my project compiled in windows, whats the easiest development chain ?
Is there something like a python.dll which i can link to my project and having an embedded python interpreter ?

Maybe the question is too simple, but i could not yet find the right place to read docs.
Thank you for your hints!


Stephen J. Turnbull

unread,
Jan 15, 2023, 2:42:43 PM1/15/23
to Guenther Sohler, pytho...@python.org
Guenther Sohler writes:

Hi, Guenther!

> I have successfully used C-Python (3) in a software project in unix and its
> great stuff!
> The environment was cmake using g++ in Linux

Congratulations!

> Now when i want to get my project compiled in windows, whats the easiest
> development chain ?

That depends. One option is one of the environments (MSYS or Cygwin)
based on the GNU compiler chain. There is a python DLL supplied in
the Windows environment. Mingwin (+ MSYS?) should work with that, I'm
not sure if Cygwin does. Cygwin is more Unix-like, Mingwin is just a
GNU compiler chain for Windows. The other is the standard (and I
believe free) Visual C compiler from Microsoft.

Try https://docs.python.org/3/ for the docs you want: "Extending and
Embedding" and "Python/C API".

By the way, this isn't the appropriate place for this question. This
list is for development discussion of Python itself, and in fact is
very close to being phased out in favor of forums on discuss.python.org.

For further discussion, you probably want the "pytho...@python.org"
mailing list, or the "python help" "discuss" channel for "development
*with* Python" questions.

_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/WWLI6KODY6PSVANNXI3V4JK7DUQ5U7GD/
Code of Conduct: http://python.org/psf/codeofconduct/

Steve Dower

unread,
Jan 18, 2023, 6:24:04 AM1/18/23
to Guenther Sohler, pytho...@python.org
On 15Jan2023 0922, Guenther Sohler wrote:
> Now when i want to get my project compiled in windows, whats the easiest
> development chain ?
> Is there something like a python.dll which i can link to my project and
> having an embedded python interpreter ?
>
> Maybe the question is too simple, but i could not yet find the right place
> to read docs.
> Thank you for your hints!

There's an overview of our embeddable package and some discussion of how
to use it at https://docs.python.org/3/using/windows.html#windows-embeddable

You'll likely also need a full install to get all the developer kit
pieces (such as the headers and libs files), but the embeddable package
is one you can include straight into your project and redistribute. The
binaries are the same, it's just laid out differently.

And yes, discuss.python.org is the best place to ask these days.

Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- pytho...@python.org
To unsubscribe send an email to python-d...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/pytho...@python.org/message/DHEON2LAXFWRH5NUYAOJSYVTDRH4EL4N/
Reply all
Reply to author
Forward
0 new messages