How to run python programs in pycharm with passing parameters? -
i having problem running python programs in pycharm, used right click , run program. want run program this:
python hrllo.py rahulkapoo vit university
here error get:
traceback (most recent call last): file "c:/users/rahul/pycharmprojects/untitled/hrllo.py", line 107, in <module> aggregate() file "c:/users/rahul/pycharmprojects/untitled/hrllo.py", line 88, in aggregate br = login() file "c:/users/rahul/pycharmprojects/untitled/hrllo.py", line 23, in login response = br.open('https://academics.vit.ac.in/student/stud_login.asp') file "c:\python27\lib\site-packages\mechanize\_mechanize.py", line 203, in open return self._mech_open(url, data, timeout=timeout) file "c:\python27\lib\site-packages\mechanize\_mechanize.py", line 255, in _mech_open raise response mechanize._response.httperror_seek_wrapper: http error 403: request disallowed robots.txt process finished exit code 1
in pycharm, right-click on script (or within editor window has script open, click create 'scriptname'
, put params in script parameters
box near top , click ok
.
the new run config appear left of run button @ top of pycharm (at least in version does). make sure new run config listed when running script.
Comments
Post a Comment