Skip to content

ljr1981/simple_process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# SIMPLE_PROCESS Lightweight process execution library for Eiffel. ## Overview SIMPLE_PROCESS provides a simple wrapper for executing shell commands and capturing their output. It replaces heavier framework dependencies with a minimal, focused implementation. ## Features - Execute shell commands and capture output - Check if executables exist in PATH - Configure process visibility (hidden/visible) - Wait or no-wait execution modes ## Installation 1. Clone or download this repository 2. Set the environment variable: ```powershell [System.Environment]::SetEnvironmentVariable('SIMPLE_PROCESS', 'path\to\simple_process', 'User') ``` 3. Add to your ECF: ```xml <library name="simple_process" location="$SIMPLE_PROCESS\simple_process.ecf"/> ``` ## Usage ```eiffel class MY_APP feature helper: SIMPLE_PROCESS_HELPER run_command local output: STRING_32 do create helper -- Execute command and capture output output := helper.output_of_command ("cmd /c dir", Void) print (output) -- Check if executable exists in PATH if helper.has_file_in_path ("git.exe") then print ("Git is installed%N") end end end ``` ## API Reference ### SIMPLE_PROCESS_HELPER | Feature | Description | |---------|-------------| | `output_of_command (cmd, dir)` | Execute command, return captured output | | `has_file_in_path (name)` | Check if file exists in system PATH | | `show_process` | Whether to show process window (default: False) | | `set_show_process (value)` | Set process visibility | | `is_wait_for_exit` | Whether to wait for process (default: True) | | `set_wait_for_exit` | Enable waiting for process exit | | `set_do_not_wait_for_exit` | Disable waiting for process exit | ## Dependencies - `base` - Eiffel standard library - `encoding` - Text encoding support - `process` - EiffelStudio process library ## Concurrency This library uses `thread` concurrency mode to maintain compatibility with the underlying ISE process library. ## Tests 9 tests covering command execution, PATH checking, and configuration toggles. ```batch ec.exe -batch -config simple_process.ecf -target simple_process_tests -tests ``` ## License MIT License - Copyright (c) 2024-2025, Larry Rix

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages