execute external commands
This commit is contained in:
parent
fbd72dcd70
commit
40ef42a246
11
it/!.py
Normal file
11
it/!.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
def main(buffer, command):
|
||||||
|
if len(command) == 1:
|
||||||
|
print("?")
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
print("[%d]" % subprocess.run(command[1:]).returncode)
|
||||||
|
except Exception as err:
|
||||||
|
print("%s" % str(err))
|
||||||
|
return buffer
|
@ -9,6 +9,10 @@ For disambiguation it's suggested that this project be referred to as "ited", pr
|
|||||||
|
|
||||||
## Included commands
|
## Included commands
|
||||||
|
|
||||||
|
### !
|
||||||
|
|
||||||
|
Passes arguments to Python `subprocess.run`.
|
||||||
|
|
||||||
### buffer
|
### buffer
|
||||||
|
|
||||||
This is where code relating to the Buffer class is kept but calling this from within the editor will allow you to view the current buffer's attributes.
|
This is where code relating to the Buffer class is kept but calling this from within the editor will allow you to view the current buffer's attributes.
|
||||||
|
Loading…
Reference in New Issue
Block a user