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

branch
eric7
changeset 9624
b47dfa7a137d
child 10358
957c9de01d42
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.SystemUtilities.PythonUtilities</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.SystemUtilities.PythonUtilities</h1>
10
11 <p>
12 Module implementing Python related utility functions.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22 <tr><td>None</td></tr>
23 </table>
24 <h3>Functions</h3>
25
26 <table>
27
28 <tr>
29 <td><a href="#determinePythonVersion">determinePythonVersion</a></td>
30 <td>Function to determine the python version of a given file.</td>
31 </tr>
32 <tr>
33 <td><a href="#getPythonExecutable">getPythonExecutable</a></td>
34 <td>Function to determine the path of the (non-windowed) Python executable.</td>
35 </tr>
36 <tr>
37 <td><a href="#getPythonLibPath">getPythonLibPath</a></td>
38 <td>Function to determine the path to Python's library.</td>
39 </tr>
40 <tr>
41 <td><a href="#getPythonLibraryDirectory">getPythonLibraryDirectory</a></td>
42 <td>Function to determine the path to Python's library directory.</td>
43 </tr>
44 <tr>
45 <td><a href="#getPythonScriptsDirectory">getPythonScriptsDirectory</a></td>
46 <td>Function to determine the path to Python's scripts directory.</td>
47 </tr>
48 <tr>
49 <td><a href="#getPythonVersion">getPythonVersion</a></td>
50 <td>Function to get the Python version (major, minor) as an integer value.</td>
51 </tr>
52 </table>
53 <hr />
54 <hr />
55 <a NAME="determinePythonVersion" ID="determinePythonVersion"></a>
56 <h2>determinePythonVersion</h2>
57 <b>determinePythonVersion</b>(<i>filename, source, editor=None</i>)
58
59 <p>
60 Function to determine the python version of a given file.
61 </p>
62 <dl>
63
64 <dt><i>filename</i></dt>
65 <dd>
66 name of the file with extension (str)
67 </dd>
68 <dt><i>source</i></dt>
69 <dd>
70 of the file (str)
71 </dd>
72 <dt><i>editor</i></dt>
73 <dd>
74 reference to the editor, if the file is opened
75 already (Editor object)
76 </dd>
77 </dl>
78 <dl>
79 <dt>Return:</dt>
80 <dd>
81 Python version if file is Python3 (int)
82 </dd>
83 </dl>
84 <div align="right"><a href="#top">Up</a></div>
85 <hr />
86 <hr />
87 <a NAME="getPythonExecutable" ID="getPythonExecutable"></a>
88 <h2>getPythonExecutable</h2>
89 <b>getPythonExecutable</b>(<i></i>)
90
91 <p>
92 Function to determine the path of the (non-windowed) Python executable.
93 </p>
94 <dl>
95 <dt>Return:</dt>
96 <dd>
97 path of the Python executable
98 </dd>
99 </dl>
100 <dl>
101 <dt>Return Type:</dt>
102 <dd>
103 str
104 </dd>
105 </dl>
106 <div align="right"><a href="#top">Up</a></div>
107 <hr />
108 <hr />
109 <a NAME="getPythonLibPath" ID="getPythonLibPath"></a>
110 <h2>getPythonLibPath</h2>
111 <b>getPythonLibPath</b>(<i></i>)
112
113 <p>
114 Function to determine the path to Python's library.
115 </p>
116 <dl>
117 <dt>Return:</dt>
118 <dd>
119 path to the Python library (string)
120 </dd>
121 </dl>
122 <div align="right"><a href="#top">Up</a></div>
123 <hr />
124 <hr />
125 <a NAME="getPythonLibraryDirectory" ID="getPythonLibraryDirectory"></a>
126 <h2>getPythonLibraryDirectory</h2>
127 <b>getPythonLibraryDirectory</b>(<i></i>)
128
129 <p>
130 Function to determine the path to Python's library directory.
131 </p>
132 <dl>
133 <dt>Return:</dt>
134 <dd>
135 path to the Python library directory
136 </dd>
137 </dl>
138 <dl>
139 <dt>Return Type:</dt>
140 <dd>
141 str
142 </dd>
143 </dl>
144 <div align="right"><a href="#top">Up</a></div>
145 <hr />
146 <hr />
147 <a NAME="getPythonScriptsDirectory" ID="getPythonScriptsDirectory"></a>
148 <h2>getPythonScriptsDirectory</h2>
149 <b>getPythonScriptsDirectory</b>(<i></i>)
150
151 <p>
152 Function to determine the path to Python's scripts directory.
153 </p>
154 <dl>
155 <dt>Return:</dt>
156 <dd>
157 path to the Python scripts directory
158 </dd>
159 </dl>
160 <dl>
161 <dt>Return Type:</dt>
162 <dd>
163 str
164 </dd>
165 </dl>
166 <div align="right"><a href="#top">Up</a></div>
167 <hr />
168 <hr />
169 <a NAME="getPythonVersion" ID="getPythonVersion"></a>
170 <h2>getPythonVersion</h2>
171 <b>getPythonVersion</b>(<i></i>)
172
173 <p>
174 Function to get the Python version (major, minor) as an integer value.
175 </p>
176 <dl>
177 <dt>Return:</dt>
178 <dd>
179 An integer representing major and minor version number (integer)
180 </dd>
181 </dl>
182 <div align="right"><a href="#top">Up</a></div>
183 <hr />
184 </body></html>

eric ide

mercurial