windows - Python on Notepad++ : How to pass command line arguments? -


"valueerror: need more 1 value unpack - learn python hard way ex: 13"

this problem has been discussed lot of times on forum. there way pass on arguments in notepad++ editor itself?

writing code in notepad++ editor , executing on python's default environment after providing arguments should make work - can directly pass arguments notepad++?

p.s - started python - no prior knowledge.

passing command line arguments can done on command line itself.

or can call via python program using os.system execute command line arguments.

os.system : execute command (a string) in subshell. implemented calling standard c function system(), , has same limitations

import os os.system("program_name.py variable_number_of_arguements" 

you use call subprocess:

from subprocess import call call(["program.py", "arg1", "arg2"]) 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -