A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://svn.python.org/projects/python/branches/r23a2-branch/Mac/Demo/embed.html below:

Embedding Python on the Mac

Embedding Python on the Mac Note: if you have a binary-only release of MacPython you will not have this demo installed. Install the developer option (in the standard installer) or a source release if you want to embed Python in other applications.

Embedding Python on the mac is pretty similar to embedding it on other platforms, but a few points need mentioning:

The Python environment is started with a dummy argc and argv, and initial startup options are obtained through the usual means, except that the user pression the option-key will not result in an interactive dialog. You can, however, set startup options on your program in the same way as you do for applets, by dragging your application to EditPythonPrefs.

The most logical way to embed Python is to link it against the shared library PythonCore. An example project and source can be found in the embed folder.

This example code also shows how to override the console: if you pass the -q argument in the argument box output is thrown away. If you pass the -d option the output is sent to DebugStr (so be sure to use this only when running the example under a debugger).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4