[Zope] problems with adding monthRange.py as Python script object

Frank McGeough FrankMcGeough@msn.com
Tue, 19 Jun 2001 22:10:52 -0400


------=_NextPart_001_0000_01C0F90C.B4062800
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

 =20
Well, I give up. It's the strangest thing. Any Python script I try and ad=
d externally that has more than 1 line in it doesn't work (gives syntax e=
rror). I ran the install again and I notice that it gets an error while t=
rying to compile the Python modules. The error flashes by so fast I am no=
t sure what it is. The error isn't in the install.log. Where else would Z=
ope install put install errors?

----- Original Message -----
From: Frank McGeough
Sent: Tuesday, June 19, 2001 8:40 PM
To: Dieter Maurer
Cc: zope@zope.org
Subject: Re: [Zope] problems with adding monthRange.py as Python script o=
bject
 =20
 =20
 I'm still working on this. There aren't any wierd characters in the file=
. Something else is going on. I've got Zope 2.3.2 installed and CMF 1.1 b=
eta. The monthRange.py module that I'm trying to import is the same one t=
hat works on my Windows 2K machine and downloaded from cmf.zope.org. The =
directory I installed this too on this Windows ME machine is c:\Program F=
iles\..., I am beginning to wonder whether that is the problem (the space=
 in the dir name) in combination with running on this sort-of o/s. It's v=
ery puzzling. =20
----- Original Message -----
From: Dieter Maurer
Sent: Tuesday, June 19, 2001 3:25 PM
To: Frank McGeough
Cc: zope@zope.org
Subject: Re: [Zope] problems with adding monthRange.py as Python script o=
bject
 =20
Frank McGeough writes:
> I get the following traceback that looks like Zope's having trouble fin=
ding DateTime.
>
>   File "", line 2
>
>     from DateTime import DateTime
>
>                                  ^
>
> SyntaxError: invalid syntax
Zope does not have a problem to find "DateTime".
It reports a SyntaxError not an ImportError.

There may be something invisible after the "DateTime" that
confuses the Python parser.

Maybe, the indentation is wrong. You know, Python block structuring
is based on indentation (I hate that but others are convinced,
it is a major strength). One missing space or one to much,
and you get a difficult to recognize syntax error.


DieterGet more from the Web.  FREE MSN Explorer download : http://explore=
r.msn.com

------=_NextPart_001_0000_01C0F90C.B4062800
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML><BODY STYLE=3D"font:10pt verdana; border:none;"><DIV>&nbsp;</DIV> <=
DIV>Well, I give up. It's the strangest thing. Any Python script I try an=
d add externally that has more than 1 line in it doesn't work (gives synt=
ax error). I ran the install again and I notice that it gets an error whi=
le trying to compile the Python modules. The error flashes by so fast I a=
m not sure what it is. The error isn't in the install.log. Where else wou=
ld Zope install put install errors?</DIV> <DIV>&nbsp;</DIV> <DIV>----- Or=
iginal Message -----</DIV> <BLOCKQUOTE style=3D"PADDING-RIGHT: 0px; PADDI=
NG-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RI=
GHT: 0px"> <DIV style=3D"BACKGROUND: #e4e4e4; FONT: 10pt Arial; COLOR: bl=
ack"><B>From:</B> Frank McGeough</DIV> <DIV style=3D"FONT: 10pt Arial"><B=
>Sent:</B> Tuesday, June 19, 2001 8:40 PM</DIV> <DIV style=3D"FONT: 10pt =
Arial"><B>To:</B> Dieter Maurer</DIV> <DIV style=3D"FONT: 10pt Arial"><B>=
Cc:</B> zope@zope.org</DIV> <DIV style=3D"FONT: 10pt Arial"><B>Subject:</=
B> Re: [Zope] problems with adding monthRange.py as Python script object<=
/DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;I'm still working on=
 this. There aren't any wierd characters in the file. Something else is g=
oing on. I've got Zope 2.3.2 installed and CMF 1.1 beta. The monthRange.p=
y module that I'm trying to import is the same one that works on my Windo=
ws 2K machine and downloaded from cmf.zope.org. The directory I installed=
 this too on this Windows ME machine is c:\Program Files\..., I am beginn=
ing to wonder whether that is the problem (the space&nbsp;in the dir name=
) in combination with running on this sort-of o/s. It's very puzzling. </=
DIV> <BLOCKQUOTE style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-L=
EFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D=
"FONT: 10pt Arial">----- Original Message -----</DIV> <DIV style=3D"BACKG=
ROUND: #e4e4e4; FONT: 10pt Arial; COLOR: black"><B>From:</B> Dieter Maure=
r</DIV> <DIV style=3D"FONT: 10pt Arial"><B>Sent:</B> Tuesday, June 19, 20=
01 3:25 PM</DIV> <DIV style=3D"FONT: 10pt Arial"><B>To:</B> Frank McGeoug=
h</DIV> <DIV style=3D"FONT: 10pt Arial"><B>Cc:</B> zope@zope.org</DIV> <D=
IV style=3D"FONT: 10pt Arial"><B>Subject:</B> Re: [Zope] problems with ad=
ding monthRange.py as Python script object</DIV> <DIV>&nbsp;</DIV>Frank M=
cGeough writes:<BR>&gt; I get the following traceback that looks like Zop=
e's having trouble finding DateTime.<BR>&gt;<BR>&gt;&nbsp;&nbsp; File "",=
 line 2<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; from DateTime import Date=
Time<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
^<BR>&gt;<BR>&gt; SyntaxError: invalid syntax<BR>Zope does not have a pro=
blem to find "DateTime".<BR>It reports a SyntaxError not an ImportError.<=
BR><BR>There may be something invisible after the "DateTime" that<BR>conf=
uses the Python parser.<BR><BR>Maybe, the indentation is wrong. You know,=
 Python block structuring<BR>is based on indentation (I hate that but oth=
ers are convinced,<BR>it is a major strength). One missing space or one t=
o much,<BR>and you get a difficult to recognize syntax error.<BR><BR><BR>=
Dieter<BR><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML><br clear=3Dall><hr=
>Get more from the Web.  FREE MSN Explorer download : <a href=3D'http://e=
xplorer.msn.com'>http://explorer.msn.com</a><br></p>

------=_NextPart_001_0000_01C0F90C.B4062800--