Lines Matching refs:Python
6 Python on Windows FAQ
13 How do I run a Python program under Windows?
20 .. sidebar:: |Python Development on XP|_
21 :subtitle: `Python Development on XP`_
23 This series of screencasts aims to get you up and running with Python on
25 and running with the right Python distribution, coding in your choice of IDE,
28 .. |Python Development on XP| image:: python-video-icon.png
29 .. _`Python Development on XP`:
45 D:\YourName\Projects\Python>
49 running Python programs.
51 You need to realize that your Python scripts have to be processed by another
52 program called the Python *interpreter*. The interpreter reads your script,
54 program. So, how do you arrange for the interpreter to handle your Python?
65 Python 2.7.3 (default, Apr 10 2012, 22.71:26) [MSC v.1500 32 bit (Intel)] on win32
70 Python statements or expressions interactively and have them executed or
71 evaluated while you wait. This is one of Python's strongest features. Check it
80 calculator. When you want to end your interactive Python session, hold the :kbd:`Ctrl`
85 --> Programs --> Python 2.7 --> Python (command line)` that results in you
95 .. sidebar:: |Adding Python to DOS Path|_
96 :subtitle: `Adding Python to DOS Path`_
98 Python is not added to the DOS path by default. This screencast will walk
100 Python to be executed from the command-line by all users.
102 .. |Adding Python to DOS Path| image:: python-video-icon.png
103 .. _`Adding Python to DOS Path`:
111 then you need to make sure that your computer knows where to find the Python
115 You should arrange for Python's installation directory to be added to the PATH
116 of every command window as it starts. If you installed Python fairly recently
124 button and look for "python.exe". Supposing you discover that Python is
132 add it to the system path to make it easier to start Python by just running
137 :ref:`Using Python on Windows <setting-envvars>` page.
139 How do I make Python scripts executable?
142 On Windows, the standard Python installer already associates the .py
143 extension with a file type (Python.File) and gives that file type an open
144 command that runs the interpreter (``D:\Program Files\Python\python.exe "%1"
149 Why does Python sometimes take so long to start?
152 Usually Python starts very quickly on Windows, but occasionally there are bug
153 reports that Python suddenly begins to take a long time to start up. This is
154 made even more puzzling because Python will work fine on other Windows systems
166 How do I make an executable from a Python script?
170 to create console and GUI executables from Python code.
179 write Python "import foo", and Python will search for foo.pyd (as well as
192 How can I embed Python into a Windows application?
195 Embedding the Python interpreter in a Windows app can be summarized as follows:
197 1. Do _not_ build Python into your .exe file directly. On Windows, Python must
200 typically installed in ``C:\Windows\System``. *NN* is the Python version, a
201 number such as "27" for Python 2.7.
203 You can link to Python in two different ways. Load-time linking means
212 in :file:`python{NN}.dll` (that is, Python's C API's) using pointers obtained
214 pointers transparent to any C code that calls routines in Python's C API.
221 2. If you use SWIG, it is easy to create a Python "extension module" that will
222 make the app's data and methods available to Python. SWIG will handle just
235 into Python! (This is the second key undocumented fact.)
237 4. In short, you can use the following code to initialize the Python interpreter
244 Py_Initialize(); // Initialize Python.
248 5. There are two problems with Python's C API which will become apparent if you
277 6. Using a Python shell script to put up a Python interpreter window from inside
281 window to the Python interpreter. You can redirect Python's i/o to _any_
282 object that supports read and write, so all you need is a Python object
285 How do I keep editors from inserting tabs into my Python source?
288 The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`,
289 recommends 4 spaces for distributed Python code; this is also the Emacs
298 run Python with the :option:`-t` switch or run the :mod:`tabnanny` module to
313 Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:`ctypes`::