@@ -20,7 +20,7 @@ Every email will contain many variables, but these are the most important ones:
| 日期 | 日期 |
| 学科 | 电子邮件主题。 |
## 阅读电子邮件示例
## 读取电子邮件示例
You can request messages directly from a mail server using the Post Office Protocol (protocol). You do not have to worry about the internal protocol because you can use the poplib module.
Now that you have the basics right we can add Python to the code. To run Python in the browser you have several options including Brython and emcascripten. We decided to give Brython a try. We will run the Brython script from a server. Change popup.html to:
There are several tools to compile Python to Javascript. [Rapydscript](http://www.rapydscript.com/) works fine, [Pyjs](http://pyjs.org/) does not work well with chrome (requires special parameter on start).
Install Rapydscript with:
...
...
@@ -185,4 +185,3 @@ console.log('hello from python')
Chrome plugins are created using HTML, JavaScript and CSS. We can use Python to create normal Chrome extensions using a Python to Javascript compiler (Rapydscript).
[Pyttsx](https://pypi.python.org/pypi/pyTTS/3.0) is a cross-platform speech (Mac OSX, Windows, and Linux) library. You can set voice metadata such as age, gender, id, language and name. Thee speech engine comes with a large amount of voices.
文字转语音样本:
<audiocontrols="">Your browser does not support the audio element.</audio>
@@ -42,7 +42,7 @@ The second icon (Editor) will start the Python IDE. It has syntax highlighting a
QPython IDE
## 口译员
## 解释器
You can use the Python interpreter directly on your Android device. This is similar to starting the Python interpreter on Windows or Linux. While useful at times, you probably prefer using the IDE.