-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more examples, updated presentation
- Loading branch information
Showing
13 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# hello world | ||
|
||
Simply prints *hello world* to the console, has no dependencies itself. | ||
|
||
## Setup | ||
|
||
``` | ||
virtualenv -p /usr/bin/python3 venv | ||
./venv/bin/pip install -r requirements.txt | ||
``` | ||
|
||
## Execution | ||
|
||
``` | ||
./venv/bin/pyinstaller hello_world.py | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pyinstaller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# With Dependencies | ||
|
||
Outputs a numpy matrix with random values. | ||
|
||
## Setup | ||
|
||
``` | ||
virtualenv -p /usr/bin/python3 venv | ||
./venv/bin/pip install -r requirements.txt | ||
``` | ||
|
||
## Execution | ||
|
||
``` | ||
./venv/bin/pyinstaller --hidden-import numpy --name with_dependencies runner.py | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pyinstaller | ||
numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# GTK | ||
|
||
GTK user interface constructed from code. | ||
|
||
## Setup | ||
|
||
``` | ||
virtualenv -p /usr/bin/python3 venv | ||
./venv/bin/pip install -r requirements.txt | ||
``` | ||
|
||
## Execution | ||
|
||
``` | ||
./venv/bin/pyinstaller gui.py | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import gi | ||
|
||
gi.require_version("Gtk", "3.0") | ||
from gi.repository import Gtk | ||
|
||
|
||
class MyWindow(Gtk.Window): | ||
def __init__(self): | ||
super().__init__(title="Hello World") | ||
|
||
self.button = Gtk.Button(label="Click Here") | ||
self.button.connect("clicked", self.on_button_clicked) | ||
self.add(self.button) | ||
|
||
def on_button_clicked(self, widget): | ||
print("Hello World") | ||
|
||
|
||
win = MyWindow() | ||
win.connect("destroy", Gtk.main_quit) | ||
win.show_all() | ||
Gtk.main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pyinstaller | ||
pygobject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# GTK | ||
|
||
GTK user interface constructed from Glade-generated XML file. | ||
|
||
## Setup | ||
|
||
``` | ||
virtualenv -p /usr/bin/python3 venv | ||
./venv/bin/pip install -r requirements.txt | ||
``` | ||
|
||
## Execution | ||
|
||
``` | ||
./venv/bin/pyinstaller --add-data glade_gui.glade:. glade_gui.py | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Generated with glade 3.22.2 --> | ||
<interface> | ||
<requires lib="gtk+" version="3.20"/> | ||
<object class="GtkWindow" id="window_main"> | ||
<property name="name">window_main</property> | ||
<property name="can_focus">False</property> | ||
<property name="default_width">440</property> | ||
<property name="default_height">250</property> | ||
<child type="titlebar"> | ||
<placeholder/> | ||
</child> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="margin_left">5</property> | ||
<property name="margin_right">5</property> | ||
<property name="margin_top">5</property> | ||
<property name="margin_bottom">5</property> | ||
<property name="orientation">vertical</property> | ||
<child> | ||
<object class="GtkImage" id="image"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="stock">gtk-dnd</property> | ||
</object> | ||
<packing> | ||
<property name="expand">True</property> | ||
<property name="fill">True</property> | ||
<property name="position">0</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
<property name="margin_top">5</property> | ||
<child> | ||
<object class="GtkLabel"> | ||
<property name="visible">True</property> | ||
<property name="can_focus">False</property> | ||
</object> | ||
<packing> | ||
<property name="expand">True</property> | ||
<property name="fill">True</property> | ||
<property name="position">0</property> | ||
</packing> | ||
</child> | ||
<child> | ||
<object class="GtkButton" id="button_exit"> | ||
<property name="label" translatable="yes">Exit</property> | ||
<property name="visible">True</property> | ||
<property name="can_focus">True</property> | ||
<property name="receives_default">True</property> | ||
<signal name="clicked" handler="gtk_main_quit" swapped="no"/> | ||
</object> | ||
<packing> | ||
<property name="expand">False</property> | ||
<property name="fill">True</property> | ||
<property name="position">1</property> | ||
</packing> | ||
</child> | ||
</object> | ||
<packing> | ||
<property name="expand">False</property> | ||
<property name="fill">True</property> | ||
<property name="position">1</property> | ||
</packing> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</interface> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import gi | ||
import os | ||
|
||
gi.require_version("Gtk", "3.0") | ||
from gi.repository import Gtk | ||
|
||
|
||
class MyWindow(Gtk.Window): | ||
def __init__(self, builder): | ||
super().__init__(title="Hello Glade") | ||
builder.connect_signals(self) | ||
window = builder.get_object("window_main") | ||
window.show_all() | ||
Gtk.main() | ||
|
||
def gtk_main_quit(self, *args): | ||
Gtk.main_quit(*args) | ||
|
||
|
||
builder = Gtk.Builder() | ||
builder.add_from_file(os.path.dirname(__file__) + "/glade_gui.glade") | ||
MyWindow(builder) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pyinstaller | ||
pygobject |
Binary file not shown.
Binary file not shown.