1
0
mirror of https://github.com/naruxde/revpipycontrol.git synced 2025-11-08 15:43:52 +01:00

Buxfix: mkstemp Umstellung

R?ckmeldungen bei piCtory Konfiguration detailierter
Info-Fenster eingebunden
This commit is contained in:
2017-06-30 21:06:06 +02:00
parent 1fec478e3f
commit 256a95aa8b
13 changed files with 568 additions and 122 deletions

59
doc/mytools.html Normal file
View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html><head>
<title>mytools</title>
<meta charset="UTF-8">
</head>
<body style="background-color:#FFFFFF;color:#000000"><a NAME="top" ID="top"></a>
<h1 style="background-color:#FFFFFF;color:#0000FF">
mytools</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Functions</h3>
<table>
<tr>
<td><a style="color:#0000FF" href="#addroot">addroot</a></td>
<td>H&#228;ngt root-dir der Anwendung vor Dateinamen.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#gettrans">gettrans</a></td>
<td></td>
</tr>
</table>
<hr /><hr />
<a NAME="addroot" ID="addroot"></a>
<h2 style="background-color:#FFFFFF;color:#0000FF">addroot</h2>
<b>addroot</b>(<i>filename</i>)
<p>
H&#228;ngt root-dir der Anwendung vor Dateinamen.
</p><p>
Je nach Ausf&#252;hrungsart der Anwendung muss das root-dir &#252;ber
andere Arten abgerufen werden.
</p><dl>
<dt><i>filename:</i></dt>
<dd>
Datei oder Ordnername
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
root dir
</dd>
</dl>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr /><hr />
<a NAME="gettrans" ID="gettrans"></a>
<h2 style="background-color:#FFFFFF;color:#0000FF">gettrans</h2>
<b>gettrans</b>(<i>proglang=None</i>)
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr />
</body></html>

99
doc/revpiinfo.html Normal file
View File

@@ -0,0 +1,99 @@
<!DOCTYPE html>
<html><head>
<title>revpiinfo</title>
<meta charset="UTF-8">
</head>
<body style="background-color:#FFFFFF;color:#000000"><a NAME="top" ID="top"></a>
<h1 style="background-color:#FFFFFF;color:#0000FF">
revpiinfo</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3>
<table>
<tr><td>_</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3>
<table>
<tr>
<td><a style="color:#0000FF" href="#RevPiInfo">RevPiInfo</a></td>
<td></td>
</tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="RevPiInfo" ID="RevPiInfo"></a>
<h2 style="background-color:#FFFFFF;color:#0000FF">RevPiInfo</h2>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Derived from</h3>
tkinter.Frame
<h3 style="background-color:#FFFFFF;color:#FF0000">
Class Attributes</h3>
<table>
<tr><td>app</td></tr><tr><td>cli</td></tr><tr><td>root</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Methods</h3>
<table>
<tr>
<td><a style="color:#0000FF" href="#RevPiInfo.__init__">RevPiInfo</a></td>
<td>Init RevPiLogfile-Class.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiInfo._checkclose">_checkclose</a></td>
<td>Pr&#252;ft ob Fenster beendet werden soll.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiInfo._createwidgets">_createwidgets</a></td>
<td>Erstellt alle Widgets.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiInfo.visitwebsite">visitwebsite</a></td>
<td>&#214;ffnet auf dem System einen Webbrowser zur Projektseite.</td>
</tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="RevPiInfo.__init__" ID="RevPiInfo.__init__"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiInfo (Constructor)</h3>
<b>RevPiInfo</b>(<i>master, xmlcli, version</i>)
<p>
Init RevPiLogfile-Class.
</p><a NAME="RevPiInfo._checkclose" ID="RevPiInfo._checkclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiInfo._checkclose</h3>
<b>_checkclose</b>(<i>event=None</i>)
<p>
Pr&#252;ft ob Fenster beendet werden soll.
</p><dl>
<dt><i>event:</i></dt>
<dd>
tkinter-Event
</dd>
</dl><a NAME="RevPiInfo._createwidgets" ID="RevPiInfo._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiInfo._createwidgets</h3>
<b>_createwidgets</b>(<i>extended=False</i>)
<p>
Erstellt alle Widgets.
</p><a NAME="RevPiInfo.visitwebsite" ID="RevPiInfo.visitwebsite"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiInfo.visitwebsite</h3>
<b>visitwebsite</b>(<i>event=None</i>)
<p>
&#214;ffnet auf dem System einen Webbrowser zur Projektseite.
</p>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr />
</body></html>

View File

@@ -49,8 +49,8 @@ Methods</h3>
<td><a style="color:#0000FF" href="#RevPiLogfile.__init__">RevPiLogfile</a></td>
<td>Init RevPiLogfile-Class.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile._closewin">_closewin</a></td>
<td></td>
<td><a style="color:#0000FF" href="#RevPiLogfile._checkclose">_checkclose</a></td>
<td>Pr&#252;ft ob Fenster beendet werden soll.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiLogfile._createwidgets">_createwidgets</a></td>
<td>Erstellt alle Widgets.</td>
@@ -82,11 +82,18 @@ RevPiLogfile (Constructor)</h3>
<b>RevPiLogfile</b>(<i>master, xmlcli</i>)
<p>
Init RevPiLogfile-Class.
</p><a NAME="RevPiLogfile._closewin" ID="RevPiLogfile._closewin"></a>
</p><a NAME="RevPiLogfile._checkclose" ID="RevPiLogfile._checkclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile._closewin</h3>
<b>_closewin</b>(<i>event</i>)
<a NAME="RevPiLogfile._createwidgets" ID="RevPiLogfile._createwidgets"></a>
RevPiLogfile._checkclose</h3>
<b>_checkclose</b>(<i>event=None</i>)
<p>
Pr&#252;ft ob Fenster beendet werden soll.
</p><dl>
<dt><i>event:</i></dt>
<dd>
tkinter-Event
</dd>
</dl><a NAME="RevPiLogfile._createwidgets" ID="RevPiLogfile._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiLogfile._createwidgets</h3>
<b>_createwidgets</b>(<i></i>)

View File

@@ -25,7 +25,7 @@ Functions</h3>
<table>
<tr>
<td><a style="color:#0000FF" href="#get_connections">get_connections</a></td>
<td></td>
<td>Verbindungen aus Datei laden.</td>
</tr>
</table>
<hr /><hr />
@@ -50,22 +50,19 @@ Methods</h3>
<table>
<tr>
<td><a style="color:#0000FF" href="#RevPiPlcList.__init__">RevPiPlcList</a></td>
<td></td>
<td>Init RevPiPlcList-class.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList._checkclose">_checkclose</a></td>
<td></td>
<td>Pr&#252;ft ob Fenster beendet werden soll.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList._createwidgets">_createwidgets</a></td>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList._loadappdata">_loadappdata</a></td>
<td></td>
<td>Erstellt alle Widgets.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList._saveappdata">_saveappdata</a></td>
<td></td>
<td>Speichert Verbindungen im home Dir.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList.build_listconn">build_listconn</a></td>
<td></td>
<td>F&#252;llt Verbindungsliste.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPlcList.evt_btnadd">evt_btnadd</a></td>
<td></td>
@@ -95,27 +92,43 @@ Static Methods</h3>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList (Constructor)</h3>
<b>RevPiPlcList</b>(<i>master</i>)
<a NAME="RevPiPlcList._checkclose" ID="RevPiPlcList._checkclose"></a>
<p>
Init RevPiPlcList-class.
</p><dl>
<dt><i>master:</i></dt>
<dd>
tkinter master
</dd>
</dl><a NAME="RevPiPlcList._checkclose" ID="RevPiPlcList._checkclose"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList._checkclose</h3>
<b>_checkclose</b>(<i>event=None</i>)
<a NAME="RevPiPlcList._createwidgets" ID="RevPiPlcList._createwidgets"></a>
<p>
Pr&#252;ft ob Fenster beendet werden soll.
</p><dl>
<dt><i>event:</i></dt>
<dd>
tkinter-Event
</dd>
</dl><a NAME="RevPiPlcList._createwidgets" ID="RevPiPlcList._createwidgets"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList._createwidgets</h3>
<b>_createwidgets</b>(<i></i>)
<a NAME="RevPiPlcList._loadappdata" ID="RevPiPlcList._loadappdata"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList._loadappdata</h3>
<b>_loadappdata</b>(<i></i>)
<a NAME="RevPiPlcList._saveappdata" ID="RevPiPlcList._saveappdata"></a>
<p>
Erstellt alle Widgets.
</p><a NAME="RevPiPlcList._saveappdata" ID="RevPiPlcList._saveappdata"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList._saveappdata</h3>
<b>_saveappdata</b>(<i></i>)
<a NAME="RevPiPlcList.build_listconn" ID="RevPiPlcList.build_listconn"></a>
<p>
Speichert Verbindungen im home Dir.
</p><a NAME="RevPiPlcList.build_listconn" ID="RevPiPlcList.build_listconn"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList.build_listconn</h3>
<b>build_listconn</b>(<i></i>)
<a NAME="RevPiPlcList.evt_btnadd" ID="RevPiPlcList.evt_btnadd"></a>
<p>
F&#252;llt Verbindungsliste.
</p><a NAME="RevPiPlcList.evt_btnadd" ID="RevPiPlcList.evt_btnadd"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPlcList.evt_btnadd</h3>
<b>evt_btnadd</b>(<i></i>)
@@ -145,7 +158,9 @@ RevPiPlcList.evt_listconn</h3>
<a NAME="get_connections" ID="get_connections"></a>
<h2 style="background-color:#FFFFFF;color:#0000FF">get_connections</h2>
<b>get_connections</b>(<i></i>)
<p>
Verbindungen aus Datei laden.
</p>
<div align="right"><a style="color:#0000FF" href="#top">Up</a></div>
<hr />
</body></html>

View File

@@ -10,7 +10,7 @@ revpipycontrol</h1>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Global Attributes</h3>
<table>
<tr><td>_</td></tr>
<tr><td>_</td></tr><tr><td>pycontrolversion</td></tr>
</table>
<h3 style="background-color:#FFFFFF;color:#FF0000">
Classes</h3>
@@ -71,7 +71,7 @@ Methods</h3>
<td></td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.infowindow">infowindow</a></td>
<td>&#214;ffnet das Fenster f&#252;r die Verbindungen.</td>
<td>&#214;ffnet das Fenster f&#252;r die Info.</td>
</tr><tr>
<td><a style="color:#0000FF" href="#RevPiPyControl.plcdebug">plcdebug</a></td>
<td>Baut den Debugframe und packt ihn.</td>
@@ -176,7 +176,7 @@ RevPiPyControl._opt_conn</h3>
RevPiPyControl.infowindow</h3>
<b>infowindow</b>(<i></i>)
<p>
&#214;ffnet das Fenster f&#252;r die Verbindungen.
&#214;ffnet das Fenster f&#252;r die Info.
</p><a NAME="RevPiPyControl.plcdebug" ID="RevPiPyControl.plcdebug"></a>
<h3 style="background-color:#FFFFFF;color:#FF0000">
RevPiPyControl.plcdebug</h3>

View File

@@ -19,13 +19,15 @@ revpicheckclient.RevPiCheckClient.validatereturn?4(returnlist)
revpicheckclient.RevPiCheckClient.writevalues?4()
revpicheckclient.RevPiCheckClient?1(master, xmlcli, xmlmode=0)
revpicheckclient._?8
revpiinfo.RevPiInfo._closewin?5(event=None)
revpiinfo.RevPiInfo._createwidgets?5()
revpiinfo.RevPiInfo._checkclose?5(event=None)
revpiinfo.RevPiInfo._createwidgets?5(extended=False)
revpiinfo.RevPiInfo.app?7
revpiinfo.RevPiInfo.cli?7
revpiinfo.RevPiInfo.root?7
revpiinfo.RevPiInfo?1(master)
revpiinfo.RevPiInfo.visitwebsite?4(event=None)
revpiinfo.RevPiInfo?1(master, xmlcli, version)
revpiinfo._?8
revpilogfile.RevPiLogfile._closewin?5(event)
revpilogfile.RevPiLogfile._checkclose?5(event=None)
revpilogfile.RevPiLogfile._createwidgets?5()
revpilogfile.RevPiLogfile._load_log?5(textwidget, xmlcall, startposition, full)
revpilogfile.RevPiLogfile.btn_clearapp?4()
@@ -45,7 +47,6 @@ revpioption.RevPiOption?1(master, xmlcli, xmlmode)
revpioption._?8
revpiplclist.RevPiPlcList._checkclose?5(event=None)
revpiplclist.RevPiPlcList._createwidgets?5()
revpiplclist.RevPiPlcList._loadappdata?5()
revpiplclist.RevPiPlcList._saveappdata?5()
revpiplclist.RevPiPlcList.build_listconn?4()
revpiplclist.RevPiPlcList.evt_btnadd?4()
@@ -101,3 +102,4 @@ revpipycontrol.RevPiPyControl.tmr_plcrunning?4()
revpipycontrol.RevPiPyControl.visitwebsite?4()
revpipycontrol.RevPiPyControl?1(master=None)
revpipycontrol._?8
revpipycontrol.pycontrolversion?7

View File

@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: RevPiPyControl 0.4.0\n"
"POT-Creation-Date: 2017-06-30 13:50+0200\n"
"PO-Revision-Date: 2017-06-30 13:50+0200\n"
"POT-Creation-Date: 2017-06-30 21:05+0200\n"
"PO-Revision-Date: 2017-06-30 21:05+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: de\n"
@@ -16,11 +16,12 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
#: revpicheckclient.py:103 revpicheckclient.py:395 revpioption.py:288
#: revpiplclist.py:198 revpiprogram.py:306 revpiprogram.py:337
#: revpiprogram.py:400 revpiprogram.py:433 revpiprogram.py:515
#: revpiprogram.py:587 revpiprogram.py:618 revpiprogram.py:631
#: revpiprogram.py:686 revpiprogram.py:706 revpiprogram.py:714
#: revpipycontrol.py:342
#: revpiplclist.py:199 revpiprogram.py:306 revpiprogram.py:337
#: revpiprogram.py:401 revpiprogram.py:407 revpiprogram.py:413
#: revpiprogram.py:421 revpiprogram.py:427 revpiprogram.py:460
#: revpiprogram.py:544 revpiprogram.py:616 revpiprogram.py:647
#: revpiprogram.py:660 revpiprogram.py:715 revpiprogram.py:735
#: revpiprogram.py:743 revpipycontrol.py:342
msgid "Error"
msgstr "Fehler"
@@ -60,7 +61,7 @@ msgstr "Aktualisiere automatisch"
msgid "Write values to RevPi"
msgstr "Schreibe Werte auf RevPi"
#: revpicheckclient.py:276 revpiprogram.py:407 revpipycontrol.py:228
#: revpicheckclient.py:276 revpiprogram.py:434 revpipycontrol.py:228
#: revpipycontrol.py:267 revpipycontrol.py:285 revpipycontrol.py:303
msgid "Warning"
msgstr "Warnung"
@@ -81,32 +82,79 @@ msgstr ""
msgid "Error set value of device '{}' Output '{}': {} \n"
msgstr "Fehler beim Setzen auf Device '{}' bei Output '{}': {}\n"
#: revpilogfile.py:37
#: revpiinfo.py:38
msgid "RevPi Python PLC info"
msgstr "RevPi Python PLC Information"
#: revpiinfo.py:51
msgid "RevPi Python PLC - Control"
msgstr "RevPi Python PLC - Kontrollcenter"
#: revpiinfo.py:55
msgid "Version: {}"
msgstr "Version: {}"
#: revpiinfo.py:78
msgid "RevPiPyLoad version on RevPi:"
msgstr "RevPiPyLoad Version am RevPi:"
#: revpiinfo.py:83
msgid "not conn."
msgstr "nicht verb."
#: revpiinfo.py:91
msgid ""
"\n"
"RevPiModIO, RevPiPyLoad and RevPiPyControl\n"
"are community driven projects. They are all\n"
"free and open source software.\n"
"All of them comes with ABSOLUTELY NO\n"
"WARRANTY, to the extent permitted by \n"
"applicable law.\n"
"\n"
"\n"
"(c) Sven Sager, License: LGPLv3"
msgstr ""
"\n"
"RevPiModIO, RevPiPyLoad und RevPiPyControl\n"
"sind gemeinschaftsorientierte Projekte. Sie sind\n"
"alle frei und Open Source Software.\n"
"Alle kommen mit ABSOLUT KEINER\n"
"GARANTIE, soweit gesetzlich zulässig.\n"
"\n"
"\n"
"(c) Sven Sager, Lizenz: LGPLv3"
#: revpiinfo.py:136 revpioption.py:225 revpiplclist.py:133
msgid "Close"
msgstr "Schließen"
#: revpilogfile.py:39
msgid "RevPi Python PLC Logs"
msgstr "RevPi Python PLC Logdaten"
#: revpilogfile.py:50
#: revpilogfile.py:52
msgid "RevPiPyLoad - Logfile"
msgstr "RevPiPyLoad - Logdatei"
#: revpilogfile.py:54 revpilogfile.py:69
#: revpilogfile.py:56 revpilogfile.py:71
msgid "Clear screen"
msgstr "Leere Ansicht"
#: revpilogfile.py:65
#: revpilogfile.py:67
msgid "Python PLC program - Logfile"
msgstr "Python PLC Programm - Logdatei"
#: revpilogfile.py:145
#: revpilogfile.py:147
msgid "Can not access log file on the RevPi"
msgstr "RevPi kann auf Logdatei nicht zugreifen"
#: revpioption.py:61 revpioption.py:273 revpioption.py:298 revpiplclist.py:58
#: revpiplclist.py:175 revpiprogram.py:370 revpiprogram.py:418
#: revpioption.py:61 revpioption.py:273 revpioption.py:298 revpiplclist.py:62
#: revpiplclist.py:176 revpiprogram.py:370 revpiprogram.py:445
msgid "Question"
msgstr "Frage"
#: revpioption.py:62 revpiplclist.py:59
#: revpioption.py:62 revpiplclist.py:63
msgid ""
"Do you really want to quit? \n"
"Unsaved changes will be lost"
@@ -194,14 +242,10 @@ msgstr ""
msgid "XML-RPC server port"
msgstr "XML-RPC Serverport"
#: revpioption.py:220 revpiplclist.py:125
#: revpioption.py:220 revpiplclist.py:130
msgid "Save"
msgstr "Speichern"
#: revpioption.py:225 revpiplclist.py:128
msgid "Close"
msgstr "Schließen"
#: revpioption.py:274
msgid ""
"The settings are now saved on the Revolution Pi. \n"
@@ -214,7 +258,7 @@ msgstr ""
"Sollen die neuen Einstellungen sofort in Kraft treten?\n"
"Dies bedeutet einen Neustart des Dienstes und des laufenden PLC-Programms!"
#: revpioption.py:282 revpiplclist.py:190 revpiprogram.py:65
#: revpioption.py:282 revpiplclist.py:191 revpiprogram.py:65
msgid "Information"
msgstr "Information"
@@ -236,39 +280,39 @@ msgstr ""
"Soll der XML-RPC Server wirklich beendet werden? Sie können dann NICHT mehr "
"mit diesem Programm auf den Revolution Pi zugreifen."
#: revpiplclist.py:68
#: revpiplclist.py:73
msgid "RevPi Python PLC connections"
msgstr "RevPi Python PLC Verbindungen"
#: revpiplclist.py:88
#: revpiplclist.py:93
msgid "Name"
msgstr "Name"
#: revpiplclist.py:95
#: revpiplclist.py:100
msgid "IP address"
msgstr "IP Adresse"
#: revpiplclist.py:103
#: revpiplclist.py:108
msgid "Port"
msgstr "Port"
#: revpiplclist.py:112
#: revpiplclist.py:117
msgid "New"
msgstr "Neu"
#: revpiplclist.py:115
#: revpiplclist.py:120
msgid "Apply"
msgstr "Übernehmen"
#: revpiplclist.py:119
#: revpiplclist.py:124
msgid "Remove"
msgstr "Entfernen"
#: revpiplclist.py:176
#: revpiplclist.py:177
msgid "Do you really want to delete the selected connection '{}'"
msgstr "Wollen Sie die ausgewählte Verbindung '{}' wirklich löschen?"
#: revpiplclist.py:191
#: revpiplclist.py:192
msgid ""
"Successfully saved. \n"
"Do you want to close this window?"
@@ -276,7 +320,7 @@ msgstr ""
"Verbindungen erfolgreich gespeichert. \n"
"Möchten Sie dieses Fenster jetzt schließen?"
#: revpiplclist.py:199
#: revpiplclist.py:200
msgid "Failed to save connections"
msgstr "Verbindungen konnten nicht gespeichert werden"
@@ -301,13 +345,13 @@ msgstr "PLC Python Programm"
msgid "Files"
msgstr "Dateien"
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:465
#: revpiprogram.py:571
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:492
#: revpiprogram.py:600
msgid "Zip archive"
msgstr "Zip Archiv"
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:478
#: revpiprogram.py:601
#: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:505
#: revpiprogram.py:630
msgid "TGZ archive"
msgstr "TGZ Archiv"
@@ -379,8 +423,8 @@ msgstr "ausführen"
msgid "Exit"
msgstr "Beenden"
#: revpiprogram.py:296 revpiprogram.py:327 revpiprogram.py:461
#: revpiprogram.py:474
#: revpiprogram.py:296 revpiprogram.py:327 revpiprogram.py:488
#: revpiprogram.py:501
msgid "Save as..."
msgstr "Speichern unter..."
@@ -389,22 +433,22 @@ msgid "piCtory config"
msgstr "piCtory Konfiguration"
#: revpiprogram.py:299 revpiprogram.py:330 revpiprogram.py:362
#: revpiprogram.py:465 revpiprogram.py:478 revpiprogram.py:546
#: revpiprogram.py:571 revpiprogram.py:601
#: revpiprogram.py:492 revpiprogram.py:505 revpiprogram.py:575
#: revpiprogram.py:600 revpiprogram.py:630
msgid "All files"
msgstr "Alle Dateien"
#: revpiprogram.py:307 revpiprogram.py:338 revpiprogram.py:516
#: revpiprogram.py:307 revpiprogram.py:338 revpiprogram.py:545
msgid "Could not load and save file!"
msgstr "Datei konnte nicht geladen und gespeichert werden!"
#: revpiprogram.py:312 revpiprogram.py:343 revpiprogram.py:381
#: revpiprogram.py:389 revpiprogram.py:427 revpiprogram.py:521
#: revpiprogram.py:676
#: revpiprogram.py:312 revpiprogram.py:343 revpiprogram.py:382
#: revpiprogram.py:390 revpiprogram.py:454 revpiprogram.py:550
#: revpiprogram.py:705
msgid "Success"
msgstr "Erfolgreich"
#: revpiprogram.py:313 revpiprogram.py:344 revpiprogram.py:522
#: revpiprogram.py:313 revpiprogram.py:344 revpiprogram.py:551
msgid "File successfully loaded and saved."
msgstr "Dateien erfolgreich übertragen und gespeichert."
@@ -424,25 +468,46 @@ msgstr ""
"Soll nach dem Hochladen der piCtory Konfiguration ein Reset am piControl "
"Treiber durchgeführt werden?"
#: revpiprogram.py:382
#: revpiprogram.py:383
msgid ""
"The transfer of the piCtory configuration and the reset of piControl have "
"been successfully executed"
"been successfully executed."
msgstr ""
"Die Übertragung der piCtory Konfiguration und der Reset von piControl wurden "
"erfolgreich ausgeführt"
"erfolgreich ausgeführt."
#: revpiprogram.py:390
msgid "The piCtory configuration was successfully transferred"
msgstr "Die Übertragung der piCtory Konfiguration wurde erfolgreich ausgeführt"
#: revpiprogram.py:391
msgid "The piCtory configuration was successfully transferred."
msgstr ""
"Die Übertragung der piCtory Konfiguration wurde erfolgreich ausgeführt."
#: revpiprogram.py:401
#: revpiprogram.py:402
msgid "Can not process the transferred file."
msgstr "Kann die übertragene Datei nicht verarbeiten."
#: revpiprogram.py:408
msgid "Can not find main elements in piCtory file."
msgstr "Kann Hauptelemente in datei nicht finden."
#: revpiprogram.py:414
msgid ""
"Contained devices could not be found on Revolution Pi. The configuration may "
"be from a newer piCtory version!"
msgstr ""
"Enthaltene Geräte konnten auf dem Revolution Pi nicht gefunden werden. "
"Möglicherweise stammt die Konfiguration von einer neueren piCtory Version."
#: revpiprogram.py:422
msgid "Could not load RAP catalog on Revolution Pi."
msgstr "Konnte Katalog auf nicht laden."
#: revpiprogram.py:428
msgid "The piCtory configuration could not be written on the Revolution Pi."
msgstr ""
"Die piCtory Konfiguration konnte auf dem Revolution Pi nicht geschrieben "
"werden."
#: revpiprogram.py:408
#: revpiprogram.py:435
msgid ""
"The piCtroy configuration has been saved successfully. \n"
"An error occurred on piControl reset!"
@@ -450,7 +515,7 @@ msgstr ""
"Die piCtroy Konfiguration wurde erfolgreich gespeichert. \n"
"Beim piControl Reset trat allerdings ein Fehler auf!"
#: revpiprogram.py:419
#: revpiprogram.py:446
msgid ""
"Are you sure to reset piControl? \n"
"The process image and the piBridge are interrupted !!!"
@@ -458,56 +523,56 @@ msgstr ""
"Soll piControlReset wirklich durchgeführt werden? \n"
"Das Prozessabbild und die Steuerung werden dann unterbrochen!!!"
#: revpiprogram.py:428
#: revpiprogram.py:455
msgid "piControlReset executed successfully"
msgstr "piControl Reset war erfolgreich"
#: revpiprogram.py:434
#: revpiprogram.py:461
msgid "piControl reset could not be executed successfully"
msgstr "piControl Reset konnte nicht erfolgreich durchgeführt werden"
#: revpiprogram.py:448
#: revpiprogram.py:475
msgid "Directory to save"
msgstr "Verzeichnis zum Ablegen"
#: revpiprogram.py:556
#: revpiprogram.py:585
msgid "Folder to upload"
msgstr "Verzeichnis zum Hochladen"
#: revpiprogram.py:567
#: revpiprogram.py:596
msgid "Upload Zip archive..."
msgstr "Zip Archiv hochladen..."
#: revpiprogram.py:588
#: revpiprogram.py:617
msgid "The specified file is not a ZIP archive."
msgstr "Die angegebene Datei ist kein ZIP Archiv"
#: revpiprogram.py:597
#: revpiprogram.py:626
msgid "Upload TarGz archiv..."
msgstr "TarGz Archiv hochladen..."
#: revpiprogram.py:619
#: revpiprogram.py:648
msgid "The specified file is not a TAR archive."
msgstr "Die angegebene Datei ist kein TAR Archiv."
#: revpiprogram.py:632
#: revpiprogram.py:661
msgid "There was an error deleting the files on the Revolution Pi."
msgstr ""
"Beim Löschen der Dateien auf dem Revolution Pi ist ein Fehler aufgetreten."
#: revpiprogram.py:677
msgid "The transfer was successful."
msgstr "Die Übertragung war erfolgreich."
#: revpiprogram.py:706
msgid "The PLC program was transferred successfully."
msgstr "Das PLC Programm wurde erfolgreich übertragen."
#: revpiprogram.py:687
#: revpiprogram.py:716
msgid "There is no piCtory configuration in this archive."
msgstr "Es wurde keine piCtory Konfiguration im Archiv gefunden."
#: revpiprogram.py:707
#: revpiprogram.py:736
msgid "The Revolution Pi could not process some parts of the transmission."
msgstr "Der Revoluton Pi konnte Teile der Übertragung nicht verarbeiten."
#: revpiprogram.py:715
#: revpiprogram.py:744
msgid "Errors occurred during transmission"
msgstr "Bei der Übertragung traten Fehler auf"
@@ -599,6 +664,23 @@ msgstr ""
msgid "Can not reach server!"
msgstr "Server ist nicht erreichbar!"
#~ msgid "Quit"
#~ msgstr "Beenden"
#~ msgid "The transfer was successful."
#~ msgstr "Die Übertragung war erfolgreich."
#~ msgid ""
#~ "The transfer of the piCtory configuration and the reset of piControl have "
#~ "been successfully executed"
#~ msgstr ""
#~ "Die Übertragung der piCtory Konfiguration und der Reset von piControl "
#~ "wurden erfolgreich ausgeführt"
#~ msgid "The piCtory configuration was successfully transferred"
#~ msgstr ""
#~ "Die Übertragung der piCtory Konfiguration wurde erfolgreich ausgeführt"
#~ msgid "Given value for Output '{}' is not valid! Reset to '{}'"
#~ msgstr ""
#~ "Angegebener Wert bei Output '{}' ist nicht gültig! Setze auf '{}' zurück"

View File

@@ -12,7 +12,7 @@ import tkinter
import tkinter.messagebox as tkmsg
from mytools import gettrans
from threading import Lock
from xmlrpc.client import ServerProxy, MultiCall
from xmlrpc.client import MultiCall
# Übersetzung laden
_ = gettrans()

150
revpipycontrol/revpiinfo.py Normal file
View File

@@ -0,0 +1,150 @@
#
# RevPiPyControl
#
# Webpage: https://revpimodio.org/revpipyplc/
# (c) Sven Sager, License: LGPLv3
#
# -*- coding: utf-8 -*-
import tkinter
import tkinter.font as tkf
import webbrowser
from mytools import gettrans
# Übersetzung laden
_ = gettrans()
class RevPiInfo(tkinter.Frame):
def __init__(self, master, xmlcli, version):
u"""Init RevPiLogfile-Class."""
self.master = master
self.xmlcli = xmlcli
# Systemvariablen
self.version = version
# Fenster bauen
self._createwidgets()
def _checkclose(self, event=None):
u"""Prüft ob Fenster beendet werden soll.
@param event: tkinter-Event"""
self.master.destroy()
def _createwidgets(self, extended=False):
u"""Erstellt alle Widgets."""
super().__init__(self.master)
self.master.wm_title(_("RevPi Python PLC info"))
self.master.bind("<KeyPress-Escape>", self._checkclose)
self.master.resizable(False, False)
self.pack(fill="both", expand=True)
# Fonts laden
fntlarge = tkf.Font(size=20, weight="bold")
fntmid = tkf.Font(size=15)
fntbold = tkf.Font(size=10, weight="bold")
# Kopfdaten
lbl = tkinter.Label(self)
lbl["font"] = fntlarge
lbl["text"] = _("RevPi Python PLC - Control")
lbl.pack(pady=5)
lbl = tkinter.Label(self)
lbl["font"] = fntmid
lbl["text"] = _("Version: {}").format(self.version)
lbl.bind(
"<ButtonPress-2>",
lambda event: self._createwidgets(extended=not extended)
)
lbl.pack(pady=5)
# Mittelframe geteilt (links/rechts) ---------------------------------
frame_main = tkinter.Frame(self)
frame_main.pack(anchor="nw", fill="x", pady=5)
# Rows konfigurieren
frame_main.rowconfigure(0, weight=0)
frame_main.rowconfigure(1, weight=1)
frame_main.rowconfigure(2, weight=1)
int_row = 0
cpadnw = {"padx": 4, "pady": 2, "sticky": "nw"}
cpadsw = {"padx": 4, "pady": 2, "sticky": "sw"}
# Linke Seite Mittelframe ----------------
lbl = tkinter.Label(frame_main)
lbl["font"] = fntbold
lbl["text"] = _("RevPiPyLoad version on RevPi:")
lbl.grid(column=0, row=int_row, **cpadnw)
lbl = tkinter.Label(frame_main)
lbl["font"] = fntbold
lbl["text"] = _("not conn.") if self.xmlcli is None \
else self.xmlcli.version()
lbl.grid(column=1, row=int_row, **cpadnw)
int_row += 1 # 1
lbl = tkinter.Label(frame_main)
lbl["justify"] = "left"
lbl["text"] = _(
"\nRevPiModIO, RevPiPyLoad and RevPiPyControl\n"
"are community driven projects. They are all\n"
"free and open source software.\n"
"All of them comes with ABSOLUTELY NO\n"
"WARRANTY, to the extent permitted by \n"
"applicable law.\n"
"\n"
"\n"
"(c) Sven Sager, License: LGPLv3"
)
lbl.grid(column=0, row=int_row, columnspan=2, **cpadnw)
int_row += 1 # 2
lbl = tkinter.Label(frame_main)
lbl.bind("<ButtonPress-1>", self.visitwebsite)
lbl["fg"] = "blue"
lbl["text"] = "https://revpimodio.org/"
lbl.grid(column=0, row=int_row, columnspan=2, **cpadsw)
# int_row += 1 # 3
# Rechte Seite Mittelframe ---------------
# Funktionen der Gegenstelle
frame_func = tkinter.Frame(frame_main)
txt_xmlfunc = tkinter.Text(frame_func, width=30, height=15)
scr_xmlfunc = tkinter.Scrollbar(frame_func)
if extended:
txt_xmlfunc.insert(tkinter.END, "\n".join(
[] if self.xmlcli is None else self.xmlcli.system.listMethods()
))
else:
txt_xmlfunc.insert(tkinter.END, "\n".join(
[] if self.xmlcli is None else self.xmlcli.get_filelist()
))
txt_xmlfunc["yscrollcommand"] = scr_xmlfunc.set
txt_xmlfunc["state"] = "disabled"
scr_xmlfunc["command"] = txt_xmlfunc.yview
txt_xmlfunc.pack(side="left")
scr_xmlfunc.pack(fill="y", side="right")
frame_func.grid(column=3, row=0, rowspan=int_row + 1, **cpadnw)
# Unten Beenden-Button -----------------------------------------------
self.btnapplog = tkinter.Button(self)
self.btnapplog["command"] = self._checkclose
self.btnapplog["text"] = _("Close")
self.btnapplog.pack(fill="x", padx=100)
def visitwebsite(self, event=None):
u"""Öffnet auf dem System einen Webbrowser zur Projektseite."""
webbrowser.open("https://revpimodio.org")
# TODO: Remove testdrive
if __name__ == "__main__":
from xmlrpc.client import ServerProxy
cli = ServerProxy("http://192.168.50.35:55123")
root = tkinter.Tk()
app = RevPiInfo(root, cli, "0.4.0")
app.mainloop()

View File

@@ -17,7 +17,7 @@ class RevPiLogfile(tkinter.Frame):
def __init__(self, master, xmlcli):
u"""Init RevPiLogfile-Class."""
super().__init__(master)
self.master.bind("<KeyPress-Escape>", self._closewin)
self.master.bind("<KeyPress-Escape>", self._checkclose)
self.pack(fill="both", expand=True)
self.xmlcli = xmlcli
@@ -29,7 +29,9 @@ class RevPiLogfile(tkinter.Frame):
# Fenster bauen
self._createwidgets()
def _closewin(self, event):
def _checkclose(self, event=None):
u"""Prüft ob Fenster beendet werden soll.
@param event: tkinter-Event"""
self.master.destroy()
def _createwidgets(self):

View File

@@ -25,8 +25,8 @@ else:
savefile = os.path.join(homedir, ".revpipyplc", "connections.dat")
# Für andere Module zum Laden der Connections
def get_connections():
u"""Verbindungen aus Datei laden."""
if os.path.exists(savefile):
fh = open(savefile, "rb")
connections = pickle.load(fh)
@@ -38,6 +38,8 @@ def get_connections():
class RevPiPlcList(tkinter.Frame):
def __init__(self, master):
u"""Init RevPiPlcList-class.
@param master: tkinter master"""
super().__init__(master)
self.master.bind("<KeyPress-Escape>", self._checkclose)
self.pack()
@@ -45,13 +47,15 @@ class RevPiPlcList(tkinter.Frame):
self.changes = False
# Daten laden
self._connections = {}
self._connections = get_connections()
# Fenster bauen
self._createwidgets()
self._loadappdata()
self.build_listconn()
def _checkclose(self, event=None):
u"""Prüft ob Fenster beendet werden soll.
@param event: tkinter-Event"""
ask = True
if self.changes:
ask = tkmsg.askyesno(
@@ -65,6 +69,7 @@ class RevPiPlcList(tkinter.Frame):
self.master.destroy()
def _createwidgets(self):
u"""Erstellt alle Widgets."""
self.master.wm_title(_("RevPi Python PLC connections"))
self.master.wm_resizable(width=False, height=False)
self.master.protocol("WM_DELETE_WINDOW", self._checkclose)
@@ -128,13 +133,8 @@ class RevPiPlcList(tkinter.Frame):
self, text=_("Close"), command=self._checkclose)
self.btn_close.grid(column=4, row=9, sticky="se")
def _loadappdata(self):
if os.path.exists(savefile):
fh = open(savefile, "rb")
self._connections = pickle.load(fh)
self.build_listconn()
def _saveappdata(self):
u"""Speichert Verbindungen im home Dir."""
try:
makedirs(os.path.dirname(savefile), exist_ok=True)
fh = open(savefile, "wb")
@@ -145,6 +145,7 @@ class RevPiPlcList(tkinter.Frame):
return True
def build_listconn(self):
u"""Füllt Verbindungsliste."""
self.list_conn.delete(0, "end")
lst_conns = sorted(self._connections.keys(), key=lambda x: x.lower())
self.list_conn.insert("end", *lst_conns)

View File

@@ -374,6 +374,7 @@ class RevPiProgram(tkinter.Frame):
)
ec = self.xmlcli.set_pictoryrsc(Binary(fh.read()), ask)
print(ec)
if ec == 0:
if ask:
@@ -381,20 +382,46 @@ class RevPiProgram(tkinter.Frame):
_("Success"),
_("The transfer of the piCtory configuration "
"and the reset of piControl have been "
"successfully executed"),
"successfully executed."),
parent=self.master
)
else:
tkmsg.showinfo(
_("Success"),
_("The piCtory configuration was "
"successfully transferred"),
"successfully transferred."),
parent=self.master
)
# Einstellungen speichern
self.opt["setpictoryrsc_dir"] = os.path.dirname(fh.name)
self._savedefaults()
elif ec == -1:
tkmsg.showerror(
_("Error"),
_("Can not process the transferred file."),
parent=self.master
)
elif ec == -2:
tkmsg.showerror(
_("Error"),
_("Can not find main elements in piCtory file."),
parent=self.master
)
elif ec == -4:
tkmsg.showerror(
_("Error"),
_("Contained devices could not be found on Revolution "
"Pi. The configuration may be from a newer piCtory "
"version!"),
parent=self.master
)
elif ec == -5:
tkmsg.showerror(
_("Error"),
_("Could not load RAP catalog on Revolution Pi."),
parent=self.master
)
elif ec < 0:
tkmsg.showerror(
_("Error"),
@@ -451,7 +478,7 @@ class RevPiProgram(tkinter.Frame):
)
if type(dirselect) == str and dirselect != "":
fh = open(mkstemp(), "wb")
fh = open(mkstemp()[1], "wb")
elif tdown == 1:
# Zip
@@ -482,10 +509,12 @@ class RevPiProgram(tkinter.Frame):
if fh is not None:
if tdown == 1:
plcfile = self.xmlcli.plcdownload(
"zip", self.var_picdown.get())
"zip", self.var_picdown.get()
)
else:
plcfile = self.xmlcli.plcdownload(
"tar", self.var_picdown.get())
"tar", self.var_picdown.get()
)
try:
fh.write(plcfile.data)
@@ -674,7 +703,7 @@ class RevPiProgram(tkinter.Frame):
if ec == 0:
tkmsg.showinfo(
_("Success"),
_("The transfer was successful."),
_("The PLC program was transferred successfully."),
parent=self.master
)

View File

@@ -210,9 +210,9 @@ class RevPiPyControl(tkinter.Frame):
self.mbar.entryconfig("PLC", state="normal")
def infowindow(self):
u"""Öffnet das Fenster für die Verbindungen."""
u"""Öffnet das Fenster für die Info."""
win = tkinter.Toplevel(self)
revpiinfo.RevPiInfo(win)
revpiinfo.RevPiInfo(win, self.cli, pycontrolversion)
win.focus_set()
win.grab_set()
self.wait_window(win)