Skip to content

Commit

Permalink
lispy-python.py (argv): Add
Browse files Browse the repository at this point in the history
Useful to e.g.:

"xv" lp.argv("./script_name arg1 arg2 arg3").

Now sys.argv is quickly set up.
  • Loading branch information
abo-abo committed Jul 16, 2018
1 parent 591d0d6 commit ebdecf9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lispy-python.py
Expand Up @@ -21,6 +21,7 @@
import inspect
import re
import platform
import shlex
try:
import jedi
except:
Expand Down Expand Up @@ -131,3 +132,6 @@ def list_step(varname, lst):
print("[{}/{}]".format(i + 1, len(lst)))
f_globals[varname] = val
return val

def argv(cmd):
sys.argv = shlex.split(cmd)

0 comments on commit ebdecf9

Please sign in to comment.