Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Display script version in top status bar
-
I program my scripts on my ipad, in local Pythonista folders.
But some scripts are written for my wife, then I copy these scripts on Pythonista iCloud folder, and they are executed by tapping an home screen icon pointing to pythonista3://script_name?action=run&root=icloud.
But, sometimes, I forget to copy my modified script from local to iCloud.
Thus, I've decided to display in the status bar (at top) of the iDevice, a label showing the version of the running script, so I can check if the script executed by my wife is the last version.
For that:
- a module VersionInStatusBar.py is installed in site-packages folder
here
- these lines are added at top of my scriptsfrom VersionInStatusBar import VersionInStatusBar version = 'nn.n ' VersionInStatusBar(version=version)
- this line is added in the will_close def, to remove the label from status bar
VersionInStatusBar(version=False)
Don't be estonished by the green "log" label. My pythonista_startup.py displays that when the logging of @dgelessus is active (thanks and happy new year to him)