Scripting Resources for DigitalMicrograph™ |
PyJEM Example: Python Dialog Template | |
Function |
A simple dialog template containing a field, popup menu and pushbutton. |
Version |
version:20220905, v1.0 |
Author |
D. R. G. Mitchell |
Acknowledgements |
- |
Comments |
There is no PyJEM functionality in this script. It is just a basic dialog template for Python using the tkinter module. The dialog created contains a field in which values can be entered, a popup menu which can be used to select a value and a push button with which to elicit a response. This dialog can be used as the foundation for any PyJEM scripts which require user interaction. |
System Requirements |
Written in Spyder in Anaconda3. Requires a PyJEM-equipped microscope. The script can be opened in Spyder and run from there. Alternatively, double clicking on the script will run it in Python. If the downloaded script as a generic grey file icon it does not have Python set as the default application to open it. Right click on it and set Python to open it. Python lives in the Anaconda3 folder. |
Known Issues |
If you run this script from within Spyder, be aware that the dialog may appear behind the Spyder window - look for it in the taskbar at the bottom of the screen. You can only have one dialog running from any one Console window. If you attempt to run the script twice, the second dialog will not appear until the first is closed. |
Supported |
Yes |
Included Files |
Main script file. |
Source Code |
zip archive containing the script. |