How to Start¶
Various ways are possible in order to start modules from PyMoDAQ. In all cases after installation of the package
(using pip or setup.py, see Installation) all the modules will be installed within the site-packages folder of python. .exe
files will also be installed in the directory: C:\WPy-3710\python-3.7.1.amd64\Scripts however they will be usable only if:
- you manually installed PyMoDAQ (using the
python setup.py installcommand) - you installed with pip and the
python.exeprogram is in windowsPATH(addC:\WPy-3710\python-3.7.1.amd64in thePATHenvironment variable)
Using installed .exe files as shortcuts:¶
If one of the conditions above is satisfied you can run (from the directory: C:\WPy-3710\python-3.7.1.amd64\Scripts)
- pymodaq_scan.exe : will start the DAQ Scan module
- pymodaq_move.exe : will start a standalone DAQ Move module
- pymodaq_viewer.exe : will start a standalone DAQ Viewer module
- pymodaq_h5browser.exe : will start a standalone H5Browser module (to explore h5 files saved from DAQ_Scan or DAQ_Viewer modules)
and you can even even create shortcuts on the desktop (see Fig. 3)
From command line tool:¶
Run Winpython (or Anaconda) command line tool (C:\WPy-3710\WinPython Command Prompt.exe) and execute either:
C:\WPy-3710\scripts\pymodaq_scanC:\WPy-3710\scripts\pymodaq_viewerC:\WPy-3710\scripts\pymodaq_moveC:\WPy-3710\scripts\pymodaq_h5browser
Run any module:¶
If one of PyMoDAQ’s module as an entry point (a if __name__='__main__:' statement at the end of the script), you can run it with:
C:\WPy-3710\scripts\python -m pymodaq.daq_scan.daq_scan_mainC:\WPy-3710\scripts\python -m pymodaq.daq_viewer.daq_viewer_mainC:\WPy-3710\scripts\python -m pymodaq.daq_move.daq_move_mainC:\WPy-3710\scripts\python -m pymodaq.daq_utils.h5browser
etc…
Create a batch/bash file for quick use:¶
Any command line execution can be written (on windows) in a .bat file, so that when you double click it all text lines within will execute.
For instance, one could write:
cd C:\WPy-3710\python-3.7.1.amd64C:\WPy-3710\python-3.7.1.amd64\Scripts\pymodaq_scan
This will simulate the content of From command line tool:, while Python is not registered on windows PATH.
This is by far the most convenient way for user to start the application (even if it requires some preparation from the guy installing the package…)
