File tree 1 file changed +39
-1
lines changed
1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change 1
1
# python-electron
2
- Make desktop app with html5 and JS using python and pytron
2
+ ### Make desktop app with html5 and JS using python and pytron
3
+ Electron is a technology developed by [ Github] ( https://www.github.com ) . Which you can use
4
+ to render html5 and javascript as a desktop app . But it uses node js . I have used
5
+ PyQt5 for the shell and it is written with pure python so enjoy .
6
+
7
+ # Note
8
+ The code is beta and the idea is new . The project will be continuous . Please report issue .
9
+
10
+ # Install
11
+ Installing pytron is very easy .
12
+ ## Windows
13
+ Open your cmd as administrator and type the following
14
+ <code > pip install pytron </code >
15
+ <hr >
16
+ ## Linux
17
+ Open your terminal with <code > Ctrl + Alt + T </code > and then
18
+ <code > sudo pip install pytron </code >
19
+
20
+ # Docs
21
+ Pytron was mainly built in order to serve html5 file with a simple pyqt shell that acts like a desktop application
22
+ ``` python
23
+ import os
24
+ import pytron as pt
25
+
26
+ # setting the title via predefined variable
27
+ pt.TITLE = ' App'
28
+
29
+ # htmlFile name can be saved via the variable htmlFile . os.path.join() is used for absolute file path
30
+ pt.htmlFile = pt.handler + os.path.join(' index.html' )
31
+
32
+ window = pt.BrowserWindow()
33
+ window.show() # show or execute the main Window
34
+
35
+ # Finally execute the file
36
+ if __name__ == ' __main__' :
37
+ pt.app.exec_()
38
+ ```
39
+
40
+
You can’t perform that action at this time.
0 commit comments