# popy_edit

Opens a text file in an editor from the command line.

## Edit a script

To edit a script in a text editor, Open a PoPy Command Prompt and call:-

    $ popy_edit my_script.pyml

The editor invoked by popy_edit is defined in the PoPy Config File file.

## Edit multiple scripts

Note you can also open all scripts in a directory using:-

    $ popy_edit *.pyml

This opens all files with the ‘.pyml’ extension in your default editor.

## Specify text editor

By default this uses the entry text_editor_path in this file:-

    c:\PoPy\popy_config.pyml

If the default editor does not exist then the chosen editor is the first binary found in this list:-

- C:\Program Files\Notepad++\notepad++.exe
- C:\Program Files (x86)\Notepad++\notepad++.exe
- C:\Windows\notepad.exe

Also see Configure Editor.

## Command line options

    usage: popy_edit [-h] input_file

    Opens a PoPy .pyml script file with an appropriate editor. By default uses
    editor specified in $POPY_PYTHON_PATH\popy_config.pyml. Alternatively will
    look in the following paths:- C:\Program
    Files\Notepad++\notepad++.exe,C:\Program Files
    (x86)\Notepad++\notepad++.exe,C:\Windows\notepad.exe

    positional arguments:
      input_file  Required path to input configuration file.

    optional arguments:
      -h, --help  show this help message and exit