Skip to content

Commit 2ffcedf

Browse files
Merge pull request #240 from kuharan/master
Update README.md
2 parents f5eb9a2 + f22628a commit 2ffcedf

1 file changed

Lines changed: 54 additions & 53 deletions

File tree

README.md

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</p>
55

66
<p align="center" style="font-size:30px;">
7-
A Platform independent Python GUI library for your applications
7+
A Platform-independent Python GUI library for your applications
88
</p>
99

1010

@@ -29,12 +29,12 @@ instead of:
2929
widget.set_on_xxx_listerner(listener)
3030
```
3131

32-
And so, in order to register a listener for the *onclick* event you can do *button.onclick.connect(myapp.on_button_pressed)* .
32+
And so, in order to register a listener for the *onclick* event, you can do *button.onclick.connect(myapp.on_button_pressed)*.
3333

3434
The previous dialect is still compatible.
3535

3636

37-
The parameter host_name is now deprecated. The server automatically catch the address where to connect from the http request.
37+
The parameter host_name is now deprecated. The server automatically catches the address where to connect from the HTTP request.
3838

3939

4040
Getting Started
@@ -69,7 +69,7 @@ Platform independent Python GUI library. In less than 100 Kbytes of source code,
6969
<img src="https://raw.githubusercontent.com/dddomodossola/remi/development/remi/res/screenshot.png" title="Widgets overview">
7070
</p>
7171

72-
Remi enables developers to create platform independent GUI with Python. The entire GUI is converted to HTML and is rendered in your browser. **No HTML** is required, Remi automatically translates your Python code into HTML. When your app starts, it starts a webserver that will be accessible on your network.
72+
Remi enables developers to create platform independent GUI with Python. The entire GUI is converted to HTML and is rendered in your browser. **No HTML** is required, Remi automatically translates your Python code into HTML. When your app starts, it starts a web server that will be accessible on your network.
7373

7474
A basic application appears like this:
7575

@@ -101,32 +101,32 @@ class MyApp(App):
101101
self.lbl.set_text('Button pressed!')
102102
self.bt.set_text('Hi!')
103103

104-
# starts the webserver
104+
# starts the web server
105105
start(MyApp)
106106
```
107107

108108
In order to see the user interface, open your preferred browser and type "http://127.0.0.1:8081".
109-
You can change the url address by specific **kwargs at `start` function call. This will be discussed later.
109+
You can change the URL address by specific **kwargs at `start` function call. This will be discussed later.
110110

111111
Tested on Android, Linux, Windows.
112-
Useful on Raspberry Pi for Python script development. It allows to interact with your Raspberry Pi remotely from your mobile device.
112+
Useful on Raspberry Pi for Python script development. It allows interacting with your Raspberry Pi remotely from your mobile device.
113113

114114

115115
FAQ
116116
===
117117
- **Why another GUI lib?**
118-
Kivy, PyQT and PyGObject all require native code for the host operating system, which means installing or compiling large dependencies. Remi needs only a web browser to show your GUI.
118+
Kivy, PyQT, and PyGObject all require native code for the host operating system, which means installing or compiling large dependencies. Remi needs only a web browser to show your GUI.
119119

120120
- **Do I need to know HTML?**
121121
NO, It is not required, you have to code only in Python.
122122

123123
- **Which browsers can I use this with?**
124-
Tested on Chrome Firefox and Edge (on Windows, Linux and Android) and haven't tested it elsewhere. It will probably work fine elsewhere though!
124+
Tested on Chrome Firefox and Edge (on Windows, Linux, and Android) and haven't tested it elsewhere. It will probably work fine elsewhere though!
125125

126126
- **Is it open source?**
127127
For sure! Remi is released under the Apache License. See the ``LICENSE`` file for more details.
128128

129-
- **Do I need some kind of webserver?**
129+
- **Do I need some kind of web server?**
130130
No, it's included.
131131

132132

@@ -143,24 +143,24 @@ Subclass the `App` class and declare a `main` function that will be the entry po
143143

144144
```py
145145
class MyApp( App ):
146-
def __init__( self, *args ):
147-
super( MyApp, self ).__init__( *args )
148-
149-
def main( self ):
150-
lbl = gui.Label( "Hello world!", width=100, height=30 )
151-
152-
#return of the root widget
153-
return lbl
146+
def __init__( self, *args ):
147+
super( MyApp, self ).__init__( *args )
148+
149+
def main( self ):
150+
lbl = gui.Label( "Hello world!", width=100, height=30 )
151+
152+
#return of the root widget
153+
return lbl
154154
```
155155

156156
Outside the main class start the application calling the function `start` passing as parameter the name of the class you declared previously.
157157

158158
```py
159-
#starts the webserver
159+
#starts the webserver
160160
start( MyApp )
161161
```
162162

163-
Run the script. If all it's OK the gui will be opened automatically in your browser, otherwise you have to type in the address bar "http://127.0.0.1:8081".
163+
Run the script. If all it's OK the GUI will be opened automatically in your browser, otherwise, you have to type in the address bar "http://127.0.0.1:8081".
164164

165165
You can customize optional parameters in the `start` call like.
166166

@@ -169,29 +169,29 @@ start(MyApp,address='127.0.0.1', port=8081, multiple_instance=False, enable_file
169169
```
170170

171171
Parameters:
172-
- address: network interface ip
172+
- address: network interface IP
173173
- port: listen port
174-
- multiple_instance: boolean, if True multiple clients that connects to your script has different App instances (identified by unique cookie session identifier)
174+
- multiple_instance: boolean, if True multiple clients that connect to your script has different App instances (identified by unique cookie session identifier)
175175
- enable_file_cache: boolean, if True enable resource caching
176-
- update_interval: gui update interval in seconds. If zero, the update happens at each change. If zero, the App.idle method is not called.
176+
- update_interval: GUI update interval in seconds. If zero, the update happens at each change. If zero, the App.idle method is not called.
177177
- start_browser: boolean that defines if the browser should be opened automatically at startup
178-
- standalone: boolean, indicates where to run the application as standard Desktop application with its own window. If False, the interface is shown in a browser webpage.
178+
- standalone: boolean, indicates where to run the application as a standard Desktop application with its own window. If False, the interface is shown in a browser webpage.
179179

180180
Additional Parameters:
181-
- username: for a basic http authentication
182-
- password: for a basic http authentication
183-
- certfile: ssl certificate filename
184-
- keyfile: ssl key file
185-
- ssl_version: authentication version (i.e. ssl.PROTOCOL_TLSv1_2). If None, disables ssl encription
181+
- username: for a basic HTTP authentication
182+
- password: for a basic HTTP authentication
183+
- certfile: SSL certificate filename
184+
- keyfile: SSL key file
185+
- ssl_version: authentication version (i.e. ssl.PROTOCOL_TLSv1_2). If None disables SSL encryption
186186

187-
All widgets constructors accepts two standard **kwargs that are:
188-
- width: can be expressed as int (and is interpreted as pixel) or as str (and you can specify the measure unit like '10%')
189-
- height: can be expressed as int (and is interpreted as pixel) or as str (and you can specify the measure unit like '10%')
187+
All widgets constructors accept two standards**kwargs that are:
188+
- width: can be expressed as int (and is interpreted as a pixel) or as str (and you can specify the measuring unit like '10%')
189+
- height: can be expressed as int (and is interpreted as a pixel) or as str (and you can specify the measuring unit like '10%')
190190

191191

192192
Events and callbacks
193193
===
194-
Widgets exposes a set of events that happens during user interaction.
194+
Widgets expose a set of events that happen during user interaction.
195195
Such events are a convenient way to define the application behavior.
196196
Each widget has its own callbacks, depending on the type of user interaction it allows.
197197
The specific callbacks for the widgets will be illustrated later.
@@ -227,7 +227,7 @@ class MyApp(App):
227227
self.lbl.set_text('Button pressed!')
228228
self.bt.set_text('Hi!')
229229

230-
# starts the webserver
230+
# starts the web server
231231
start(MyApp)
232232
```
233233

@@ -237,7 +237,7 @@ Simple, easy.
237237
Listener's callbacks will receive the emitter's instance firstly, then all other parameters provided by the specific event.
238238

239239

240-
Beside the standard event registration (as aforementioned), it is possible to pass user parameters to listener functions. This can be achieves appending parameters to the *connect* function call.
240+
Besides the standard event registration (as aforementioned), it is possible to pass user parameters to listener functions. This can be achieves appending parameters to the *connect* function call.
241241

242242
```py
243243
import remi.gui as gui
@@ -270,26 +270,26 @@ class MyApp(App):
270270
self.lbl.set_text('Button pressed!')
271271
widget.set_text('Hello ' + name + ' ' + surname)
272272

273-
# starts the webserver
273+
# starts the web server
274274
start(MyApp)
275275
```
276276

277-
This allows great flexibility, getting different behaviours with the same event listener definition.
277+
This allows great flexibility, getting different behaviors with the same event listener definition.
278278

279279

280280
HTML Attribute accessibility
281281
===
282-
Sometimes could be required to access Widget's HTML representation in order to manipulate html attributes.
283-
The library allows to access these information easily.
282+
Sometimes could be required to access Widget's HTML representation in order to manipulate HTML attributes.
283+
The library allows accessing this information easily.
284284

285-
A simple example: It is the case where you would like to add an hover text to a widget. This can be achieved by the *title* attribute of an html tag.
285+
A simple example: It is the case where you would like to add a hover text to a widget. This can be achieved by the *title* attribute of an HTML tag.
286286
In order to do this:
287287

288288
```py
289289
widget_instance.attributes['title'] = 'Your title content'
290290
```
291291

292-
A special case of html attribute is the *style*.
292+
A special case of HTML attribute is the *style*.
293293
The style attributes can be altered in this way:
294294

295295
```py
@@ -298,9 +298,9 @@ The style attributes can be altered in this way:
298298

299299
The assignment of a new attribute automatically creates it.
300300

301-
For a reference list of html attributes you can refer to https://www.w3schools.com/tags/ref_attributes.asp
301+
For a reference list of HTML attributes, you can refer to https://www.w3schools.com/tags/ref_attributes.asp
302302

303-
For a reference list of style attributes you can refer to https://www.w3schools.com/cssref/default.asp
303+
For a reference list of style attributes, you can refer to https://www.w3schools.com/cssref/default.asp
304304

305305
Take care about internally used attributes. These are:
306306
- **class**: It is used to store the Widget class name for styling purpose
@@ -310,7 +310,7 @@ Take care about internally used attributes. These are:
310310
Remote access
311311
===
312312
If you are using your REMI app remotely, with a DNS and behind a firewall, you can specify special parameters in the `start` call:
313-
- **port**: http server port. Don't forget to NAT this port on your router;
313+
- **port**: HTTP server port. Don't forget to NAT this port on your router;
314314

315315
```py
316316
start(MyApp, address='0.0.0.0', port=8081)
@@ -319,18 +319,18 @@ start(MyApp, address='0.0.0.0', port=8081)
319319

320320
Standalone Execution
321321
===
322-
I suggest to use the browser as standard interface window.
322+
I suggest using the browser as a standard interface window.
323323

324324
However, you can avoid using the browser.
325325
This can be simply obtained joining REMI and [PyWebView](https://github.com/r0x0r/pywebview).
326326
Here is an example about this [standalone_app.py](https://github.com/dddomodossola/remi/blob/development/examples/standalone_app.py).
327327

328-
**Be aware that PyWebView uses qt, gtk and so on to create the window. An outdated version of these libraries can cause ui problems. If you experience ui issues, update these libraries, or better avoid standalone execution.**
328+
**Be aware that PyWebView uses qt, gtk and so on to create the window. An outdated version of these libraries can cause UI problems. If you experience UI issues, update these libraries, or better avoid standalone execution.**
329329

330330

331331
Authentication
332332
===
333-
In order to limit the remote access to your interface you can define a username and password. It consists in a simple authentication process.
333+
In order to limit the remote access to your interface, you can define a username and password. It consists of a simple authentication process.
334334
Just define the parameters **username** and **password** in the start call:
335335
```py
336336
start(MyApp, username='myusername', password='mypassword')
@@ -339,7 +339,7 @@ start(MyApp, username='myusername', password='mypassword')
339339

340340
Styling
341341
===
342-
In order to define a new style for your app you have to do the following.
342+
In order to define a new style for your app, you have to do the following.
343343
Create a *res* folder and pass it to your App class constructor:
344344
```python
345345
class MyApp(App):
@@ -354,12 +354,12 @@ This way the standard *style.css* file gets overridden by the one you created.
354354

355355
Compatibility
356356
===
357-
Remi is made to be compatible from Python2.7 to Python3.X . Please notify compatibility issues.
357+
Remi is made to be compatible from Python2.7 to Python3.X. Please notify compatibility issues.
358358

359359

360360
Security
361361
===
362-
Remi should be intended as a standard desktop gui framework.
362+
Remi should be intended as a standard desktop GUI framework.
363363
The library itself doesn't implement security strategies, and so it is advised to not expose its access to unsafe public networks.
364364

365365
When loading data from external sources, consider protecting the application from potential javascript injection before displaying the content directly.
@@ -374,14 +374,15 @@ That's a brilliant way to support this project.
374374

375375
**[SUPPORT Remi now](https://patreon.com/remigui)**
376376

377-
Also a small amount is really welcome.
377+
Also, a small amount is really welcome.
378378

379379

380380
Contributors
381381
===
382382
Thank you for collaborating with us to make Remi better!
383-
The real power of opensource are contributors. Please feel free to participate to this project, and consider to add yourself to the following list.
384-
Yes I know that github already provides a list of contributors, but I feel that I must mention who helps.
383+
384+
The real power of opensource is contributors. Please feel free to participate in this project, and consider to add yourself to the following list.
385+
Yes, I know that GitHub already provides a list of contributors, but I feel that I must mention who helps.
385386

386387
[Davide Rosa](https://github.com/dddomodossola)
387388

0 commit comments

Comments
 (0)