Re: interactive window vs. script: inconsistent behavior

2005-10-06 Thread Larry Bates
This also works and IMHO reads better: d="5-18-05 to 5-31-05" f,t=d.split(' to ')) Larry Bates Bell, Kevin wrote: > The following works in the interactive window of PythonWin, but fails in > a script. TypeError: Objects of type 'slice' can not be converted to a > COM VARIANT > > I just need to

Re: interactive window vs. script: inconsistent behavior

2005-10-06 Thread Duncan Booth
Bell, Kevin wrote: > The following works in the interactive window of PythonWin, but fails in > a script. TypeError: Objects of type 'slice' can not be converted to a > COM VARIANT > > I just need to parse out these dates, but it's making me crazy. > Shouldn't it work in both the interactive win

RE: interactive window vs. script: inconsistent behavior

2005-10-06 Thread Bell, Kevin
Sent: Thursday, October 06, 2005 2:44 PM To: python-list@python.org Subject: interactive window vs. script: inconsistent behavior The following works in the interactive window of PythonWin, but fails in a script. TypeError: Objects of type 'slice' can not be converted to a COM VARIANT

interactive window vs. script: inconsistent behavior

2005-10-06 Thread Bell, Kevin
The following works in the interactive window of PythonWin, but fails in a script. TypeError: Objects of type 'slice' can not be converted to a COM VARIANT I just need to parse out these dates, but it's making me crazy. Shouldn't it work in both the interactive window and a script? >>> d = "5