regular expression or parser ?
Hi, I m a novice to python..I m stuck in a problem and need some help. i m trying to extract data between the line "start operation" and the line "stop operation" from a txt file. and then to fill it under different columns of an excel sheet. -- http://mail.python.org/mailman/listinfo/python-list
Script Error
Hi Guys, I am facing a problem with a script that i had written to automate opening a website and signing on to it. It was running fine for a long time but all of a sudden it has stopped progressing beyond opening the URL. I ran the code line by line on the pythonwin's IDE and it ran fine but when i execute the whole script it gives this error: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 307, in RunScript debugger.run(codeObject, __main__.__dict__, start_stepping=0) File "C:\Python24\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run _GetCurrentDebugger().run(cmd, globals,locals, start_stepping) File "C:\Python24\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 631, in run exec cmd in globals, locals File "C:\Documents and Settings\Desktop\pi\Ressurection\Dec\19\CoE.py", line 4, in ? ie.SetTextBox(username,'txtUserId',0) File "cPAMIE.py", line 387, in SetTextBox doc = self._ie.Document.forms[frmName] File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 216, in __getitem__ return self._get_good_object_(self._enum_.__getitem__(index)) File "C:\Python24\Lib\site-packages\win32com\client\util.py", line 37, in __getitem__ return self.__GetIndex(index) File "C:\Python24\Lib\site-packages\win32com\client\util.py", line 56, in __GetIndex raise IndexError, "list index out of range" IndexError: list index out of range The code i was using is: import cPAMIE ie= cPAMIE.PAMIE() ie.Navigate ('URL') ie.SetTextBox(username,'txtUserId',0) ie.SetTextBox(pwd,'txtPassword',0) ie.ClickButton('btnSubmit',0) Any ideas as to why am i getting this error when running the code as a script Thanks in advance, Forced -- http://mail.python.org/mailman/listinfo/python-list
Re: Script Error
Guys any suggestions ? Could it be because of a MS patch or something as i believe i had some patching on the windows box i was running this script on. Forced_Ambitions wrote: > Hi Guys, > > I am facing a problem with a script that i had written to automate > opening a website and signing on to it. It was running fine for a long > time but all of a sudden it has stopped progressing beyond opening the > URL. I ran the code line by line on the pythonwin's IDE and it ran fine > but when i execute the whole script it gives this error: > > > Traceback (most recent call last): > File > "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > line 307, in RunScript > debugger.run(codeObject, __main__.__dict__, start_stepping=0) > File > "C:\Python24\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", > line 60, in run > _GetCurrentDebugger().run(cmd, globals,locals, start_stepping) > File > "C:\Python24\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", > line 631, in run > exec cmd in globals, locals > File "C:\Documents and > Settings\Desktop\pi\Ressurection\Dec\19\CoE.py", line 4, in ? > ie.SetTextBox(username,'txtUserId',0) > File "cPAMIE.py", line 387, in SetTextBox > doc = self._ie.Document.forms[frmName] > File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line > 216, in __getitem__ > return self._get_good_object_(self._enum_.__getitem__(index)) > File "C:\Python24\Lib\site-packages\win32com\client\util.py", line > 37, in __getitem__ > return self.__GetIndex(index) > File "C:\Python24\Lib\site-packages\win32com\client\util.py", line > 56, in __GetIndex > raise IndexError, "list index out of range" > IndexError: list index out of range > > The code i was using is: > > import cPAMIE > > ie= cPAMIE.PAMIE() > > ie.Navigate ('URL') > ie.SetTextBox(username,'txtUserId',0) > ie.SetTextBox(pwd,'txtPassword',0) > ie.ClickButton('btnSubmit',0) > > Any ideas as to why am i getting this error when running the code as a > script > > Thanks in advance, > Forced -- http://mail.python.org/mailman/listinfo/python-list