mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	Updated, and added a very terse description of PyMac_SetConsoleHandler().
This commit is contained in:
		
							parent
							
								
									893b0ab988
								
							
						
					
					
						commit
						e67dab3d3f
					
				
					 1 changed files with 8 additions and 10 deletions
				
			
		| 
						 | 
					@ -6,9 +6,8 @@
 | 
				
			||||||
<H1>Embedding Python on the Mac</H1>
 | 
					<H1>Embedding Python on the Mac</H1>
 | 
				
			||||||
<HR>
 | 
					<HR>
 | 
				
			||||||
<B>Note</B>: if you have a binary-only release of MacPython you will not
 | 
					<B>Note</B>: 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 go to
 | 
					have this demo installed. Install the developer option (in the standard installer) or 
 | 
				
			||||||
<a href="http://www.cwi.nl/~jack/macpython.html">Jack's MacPython Page</a>
 | 
					a source release if you want to embed
 | 
				
			||||||
to download either a source release if you want to embed
 | 
					 | 
				
			||||||
Python in other applications. <p>
 | 
					Python in other applications. <p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Embedding Python on the mac is pretty similar to embedding it on other
 | 
					Embedding Python on the mac is pretty similar to embedding it on other
 | 
				
			||||||
| 
						 | 
					@ -23,8 +22,8 @@ resource files and calls Py_Initialize.
 | 
				
			||||||
<LI> You have to be consequent in your use of GUSI. If the library uses
 | 
					<LI> You have to be consequent in your use of GUSI. If the library uses
 | 
				
			||||||
it so should your program and vice versa.
 | 
					it so should your program and vice versa.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<LI> The console-behaviour (close-on-exit, etc) is controlled by Python,
 | 
					<LI> The console-behaviour (close-on-exit, etc) is controlled by Python
 | 
				
			||||||
but you are of course free to change that after calling PyMac_Initialize().
 | 
					but you can overwrite this with <code>PyMac_SetConsoleHandler()</code>.
 | 
				
			||||||
</UL>
 | 
					</UL>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The Python environment is started with a dummy argc and argv, and initial
 | 
					The Python environment is started with a dummy argc and argv, and initial
 | 
				
			||||||
| 
						 | 
					@ -37,10 +36,9 @@ The most logical way to embed Python is to link it against the shared
 | 
				
			||||||
library <code>PythonCore</code>. An example project and source can be
 | 
					library <code>PythonCore</code>. An example project and source can be
 | 
				
			||||||
found in the <a href="embed">embed</a> folder. <p>
 | 
					found in the <a href="embed">embed</a> folder. <p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<b>Note</b>: you may think that you do not have the project file
 | 
					This example code also shows how to override the console: if you pass the
 | 
				
			||||||
<code>PythonCore</code> but actually you do: the standard installation
 | 
					<code>-q</code> argument in the argument box output is thrown away. If you
 | 
				
			||||||
process deposits it in the <code>Extensions</code> folder in the system
 | 
					pass the <code>-d</code> option the output is sent to <code>DebugStr</code>
 | 
				
			||||||
folder under the name <code>PythonCore <i>version</i></code>. Add that file
 | 
					(so be sure to use this only when running the example under a debugger).
 | 
				
			||||||
to the project replacing <code>PythonCore</code>. <p>
 | 
					 | 
				
			||||||
</BODY>
 | 
					</BODY>
 | 
				
			||||||
</HTML>
 | 
					</HTML>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue