src/eric7/Documentation/Source/eric7.SystemUtilities.PythonUtilities.html

branch
eric7
changeset 10836
dc7f25f2f7e4
parent 10479
856476537696
equal deleted inserted replaced
10835:9117c08e4707 10836:dc7f25f2f7e4
30 <tr> 30 <tr>
31 <td><a href="#__searchInterpreters_Windows">__searchInterpreters_Windows</a></td> 31 <td><a href="#__searchInterpreters_Windows">__searchInterpreters_Windows</a></td>
32 <td>Function to determine a list of all Python interpreters available via the executable search path (i.e.</td> 32 <td>Function to determine a list of all Python interpreters available via the executable search path (i.e.</td>
33 </tr> 33 </tr>
34 <tr> 34 <tr>
35 <td><a href="#determinePythonVersion">determinePythonVersion</a></td>
36 <td>Function to determine the python version of a given file.</td>
37 </tr>
38 <tr>
39 <td><a href="#getExePath">getExePath</a></td> 35 <td><a href="#getExePath">getExePath</a></td>
40 <td></td> 36 <td></td>
41 </tr> 37 </tr>
42 <tr> 38 <tr>
43 <td><a href="#getPythonExecutable">getPythonExecutable</a></td> 39 <td><a href="#getPythonExecutable">getPythonExecutable</a></td>
56 <td>Function to determine the path to Python's scripts directory.</td> 52 <td>Function to determine the path to Python's scripts directory.</td>
57 </tr> 53 </tr>
58 <tr> 54 <tr>
59 <td><a href="#getPythonVersion">getPythonVersion</a></td> 55 <td><a href="#getPythonVersion">getPythonVersion</a></td>
60 <td>Function to get the Python version (major, minor) as an integer value.</td> 56 <td>Function to get the Python version (major, minor) as an integer value.</td>
57 </tr>
58 <tr>
59 <td><a href="#isPythonSource">isPythonSource</a></td>
60 <td>Function to check for a Python source code file.</td>
61 </tr> 61 </tr>
62 <tr> 62 <tr>
63 <td><a href="#searchInterpreters">searchInterpreters</a></td> 63 <td><a href="#searchInterpreters">searchInterpreters</a></td>
64 <td>Function to determine a list of all Python interpreters available via the executable search path (i.e.</td> 64 <td>Function to determine a list of all Python interpreters available via the executable search path (i.e.</td>
65 </tr> 65 </tr>
127 </dd> 127 </dd>
128 </dl> 128 </dl>
129 <div align="right"><a href="#top">Up</a></div> 129 <div align="right"><a href="#top">Up</a></div>
130 <hr /> 130 <hr />
131 <hr /> 131 <hr />
132 <a NAME="determinePythonVersion" ID="determinePythonVersion"></a>
133 <h2>determinePythonVersion</h2>
134 <b>determinePythonVersion</b>(<i>filename, source, editor=None</i>)
135 <p>
136 Function to determine the python version of a given file.
137 </p>
138
139 <dl>
140
141 <dt><i>filename</i> (str)</dt>
142 <dd>
143 name of the file with extension
144 </dd>
145 <dt><i>source</i> (str)</dt>
146 <dd>
147 of the file
148 </dd>
149 <dt><i>editor</i> (Editor)</dt>
150 <dd>
151 reference to the editor, if the file is opened already
152 </dd>
153 </dl>
154 <dl>
155 <dt>Return:</dt>
156 <dd>
157 Python version if file is Python3
158 </dd>
159 </dl>
160 <dl>
161 <dt>Return Type:</dt>
162 <dd>
163 int
164 </dd>
165 </dl>
166 <div align="right"><a href="#top">Up</a></div>
167 <hr />
168 <hr />
169 <a NAME="getExePath" ID="getExePath"></a> 132 <a NAME="getExePath" ID="getExePath"></a>
170 <h2>getExePath</h2> 133 <h2>getExePath</h2>
171 <b>getExePath</b>(<i>branch, access, versionStr</i>) 134 <b>getExePath</b>(<i>branch, access, versionStr</i>)
172 135
173 <div align="right"><a href="#top">Up</a></div> 136 <div align="right"><a href="#top">Up</a></div>
281 </dd> 244 </dd>
282 </dl> 245 </dl>
283 <div align="right"><a href="#top">Up</a></div> 246 <div align="right"><a href="#top">Up</a></div>
284 <hr /> 247 <hr />
285 <hr /> 248 <hr />
249 <a NAME="isPythonSource" ID="isPythonSource"></a>
250 <h2>isPythonSource</h2>
251 <b>isPythonSource</b>(<i>filename, source, editor=None</i>)
252 <p>
253 Function to check for a Python source code file.
254 </p>
255
256 <dl>
257
258 <dt><i>filename</i> (str)</dt>
259 <dd>
260 name of the file with extension
261 </dd>
262 <dt><i>source</i> (str)</dt>
263 <dd>
264 of the file
265 </dd>
266 <dt><i>editor</i> (Editor (optional))</dt>
267 <dd>
268 reference to the editor, if the file is opened already
269 (defaults to None)
270 </dd>
271 </dl>
272 <dl>
273 <dt>Return:</dt>
274 <dd>
275 flag indicating Python source code
276 </dd>
277 </dl>
278 <dl>
279 <dt>Return Type:</dt>
280 <dd>
281 bool
282 </dd>
283 </dl>
284 <div align="right"><a href="#top">Up</a></div>
285 <hr />
286 <hr />
286 <a NAME="searchInterpreters" ID="searchInterpreters"></a> 287 <a NAME="searchInterpreters" ID="searchInterpreters"></a>
287 <h2>searchInterpreters</h2> 288 <h2>searchInterpreters</h2>
288 <b>searchInterpreters</b>(<i>environments=None</i>) 289 <b>searchInterpreters</b>(<i>environments=None</i>)
289 <p> 290 <p>
290 Function to determine a list of all Python interpreters available via the 291 Function to determine a list of all Python interpreters available via the

eric ide

mercurial