Command Assistant Help File

From OpenCircuits
Jump to navigation Jump to search

This is the Help "file" for the Python Application whose main page is: *[ tbd ]


Help file for Command Assistant application ( Documentation for Verxxx ). You can also get a lot of information about how the program works by looking at the GUI and its explanation: Command Assistant GUI Images.


Application Features

  • Issue Linux commands including starting GUI applications.
  • Runs as a GUI application.
  • Highly configurable.
  • Built to be extensible

Use

The application is designed to help you find and issue Linux commands to get some computer task done. ( if you also open the app, or the page for the Graphical User Interface (GUI) the following will be easier to follow )

The general workflow is:

  • In the key word field enter one or more key words for your task like "list files" an hit enter or press select. "List files" will

select the CommandLs set of commands.

  • To activate a selected command click on it ( the first command will be automatically selected, particularly useful when only

one command is selected).

Download and Install

There is really no install program. Currently the application is intended for those who have a fair familitry familiarity with Python coding and can just insert the downloaded code into their development environment and run it. You should also have a general idea of how to use the Linux Command Line. Code at *Russell Hensel / cmd_assist · GitLab . For most of you it will not run due to dependency problems. You will need to add them. Pretty much read the error messages and install the missing code. I use Anaconda Spyder so my preferred tool is conda ( conda install pyHS100 ). If conda does not work or you do not use it use pip.

Much of the application is configurable through the parameter.py file, but the default should give you an application that runs,

With the edited parameter file saved, restart the application. Not working? Double check or email me.


Application

Some operations work the same way in both applications

  • Install: see section above.
  • Debug: see section below.
  • Edit the parameter file: *Change Parameters: Use the application button < Edit Parms > ( after configuring for your editor ) or any text editor suitable for Python ( no tabs ) on the file parameters.py. See also: The section below, Configuration Files For Python and tbd
  • Edit the log file: This is a standard python logging file. Useful for debugging and general tracking of the application. You can set the level of the logging using the parameter file.


  • Quick Restart of the application: As perhaps after a parameter change. Use the < Restart > button. See also: tbd
  • Get Help: Press the <Help> button. Depending on how it is setup in parameters.py you may see this page.
  • Work with text in message area: See buttons to the left of the area.

How to Use the Parameter File

See: Configuration Files For Python You need a text editor suitable for .py files to manage the parameter file ( parameters.py ) This includes most text editors. I particularity like:

  • notepad
  • geany

You can also use the editor that comes in many python development environments, the simplest of which may be Idle. But there are many many others. If you are reading this you probably have some experience.

Once you configure an editor in parameters.py you can edit from the <Edit Parms> in the GUI ( see below )



When editing there are couple of gotchas to watch out for.

  • Python cares about capitalization, use the capitalization indicated in the default files and the example code.
  • Python also cares a lot about how lines are indented. Do not change the indentation from the sample files, and always indent using spaces ( not tabs. most text editors will use spaces automatically for .py files, even if you use the tab key )

Editing of the parameters.py file

  • Edit so the program finds your devices.
    • See above in Download and Install
  • Enable your favorite editor to work with the application.
    • self.ex_editor = r"D:\apps\Notepad++\notepad++.exe" # use r" or the backslashes will not work, or you can use forward slashes instead they may be wrong but they work.
  • Lots of other settings:
    • Read the comments in parameters.py and change as desired. If a setting does not work let me know.
  • If you mess up.
    • Re download and get back to the original file.






The GUI

see: tbd


Debugging

There are several application outputs that may be useful for debugging.



  • Watch the GUI
  • Check the Python console.
* Look at the python log file ( use the GUI button  Edit Log  ( specify your editor in xxxfirst )) or use your editor on the default name of the log file   xxx.py_log.

Most issues will probably be missing libraries, parameters.py issues, or just bugs in my code (email me ).

Links

  • tbd main page for this project
  • see categories below as well