Browse Source

Appendix

pull/61/head
Jure Šorn 4 years ago
parent
commit
2c468379b1
2 changed files with 9 additions and 8 deletions
  1. 10
      README.md
  2. 7
      index.html

10
README.md

@ -3455,8 +3455,10 @@ cdef enum <enum_name>: <member_name_1>, <member_name_2>, ...
```
PyInstaller
-----------
Appendix
--------
### PyInstaller
```bash
$ pip3 install pyinstaller
$ pyinstaller script.py # Compiles into './dist/script' directory.
@ -3466,9 +3468,7 @@ $ pyinstaller script.py --add-data '<path>:.' # Adds file to the root of the ex
```
* **Paths of files have to be changed to `'os.path.join(sys._MEIPASS, "<path>")'`.**
Basic Script Template
---------------------
### Basic Script Template
```python
#!/usr/bin/env python3
#

7
index.html

@ -2930,17 +2930,18 @@ cdef &lt;type/void&gt; &lt;func_name&gt;(&lt;type&gt; &lt;arg_name_1&gt;, ...):
</code></pre>
<pre><code class="python language-python hljs">cdef enum &lt;enum_name&gt;: &lt;member_name_1&gt;, &lt;member_name_2&gt;, ...
</code></pre>
<div><h2 id="pyinstaller"><a href="#pyinstaller" name="pyinstaller">#</a>PyInstaller</h2><pre><code class="bash language-bash hljs">$ pip3 install pyinstaller
<div><h2 id="appendix"><a href="#appendix" name="appendix">#</a>Appendix</h2><div><h3 id="pyinstaller">PyInstaller</h3><pre><code class="bash language-bash hljs">$ pip3 install pyinstaller
$ pyinstaller script.py <span class="hljs-comment"># Compiles into './dist/script' directory.</span>
$ pyinstaller script.py --onefile <span class="hljs-comment"># Compiles into './dist/script' console app.</span>
$ pyinstaller script.py --windowed <span class="hljs-comment"># Compiles into './dist/script' windowed app.</span>
$ pyinstaller script.py --add-data <span class="hljs-string">'&lt;path&gt;:.'</span> <span class="hljs-comment"># Adds file to the root of the executable.</span>
</code></pre></div>
</code></pre></div></div>
<ul>
<li><strong>Paths of files have to be changed to <code class="python hljs"><span class="hljs-string">'os.path.join(sys._MEIPASS, "&lt;path&gt;")'</span></code>.</strong></li>
</ul>
<div><h2 id="basicscripttemplate"><a href="#basicscripttemplate" name="basicscripttemplate">#</a>Basic Script Template</h2><pre><code class="python language-python hljs"><span class="hljs-comment">#!/usr/bin/env python3</span>
<div><h3 id="basicscripttemplate">Basic Script Template</h3><pre><code class="python language-python hljs"><span class="hljs-comment">#!/usr/bin/env python3</span>
<span class="hljs-comment">#</span>
<span class="hljs-comment"># Usage: .py</span>
<span class="hljs-comment">#</span>

Loading…
Cancel
Save