I want to implement my pypy.py script on commandline, I need to work with setup tools but the console_script does not work properly as my pypy.py needs two arguments, please guide me how can I modify it properly to work on commendline.
python.py
def main(agru1, argu2):
"do something"
if __name__ == "__main__":
main()
when I include it in my setup.py file, as console_script as follow
setup(
entry_points={
'console_scripts': [
'pypy = pypy.pypy:main'],
}
)
And I get the following error when I run it on commandline:
Traceback (most recent call last):
File "/usr/local/bin/python", line 9, in <module>
load_entry_point('Pypy==0.1', 'console_scripts', 'pypy')()
TypeError: main() takes at least 2 arguments (0 given)
Thanks, how should I include main(argv[1], argv[2]) in the setup.py ( as mentioned above) ?
error still the same if I use your explanation .... !