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

Frank McGeough FrankMcGeough@msn.com
Tue, 19 Jun 2001 20:37:06 -0400


------=_NextPart_001_0000_01C0F8FF.9AA000A0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

 =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.


Dieter

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )Get more from the Web.  =
FREE MSN Explorer download : http://explorer.msn.com

------=_NextPart_001_0000_01C0F8FF.9AA000A0
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>&nbsp;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 beta. The monthRange.py module that I'm trying to import is the s=
ame one that 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 Files\..., I am beginning 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: 0p=
x; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; M=
ARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt Arial">----- Original Message=
 -----</DIV> <DIV style=3D"BACKGROUND: #e4e4e4; FONT: 10pt Arial; COLOR: =
black"><B>From:</B> Dieter Maurer</DIV> <DIV style=3D"FONT: 10pt Arial"><=
B>Sent:</B> Tuesday, June 19, 2001 3:25 PM</DIV> <DIV style=3D"FONT: 10pt=
 Arial"><B>To:</B> Frank McGeough</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 objec=
t</DIV> <DIV>&nbsp;</DIV>Frank McGeough writes:<BR>&gt; I get the followi=
ng traceback that looks like Zope'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 DateTime<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<BR>&gt;<BR>&gt; SyntaxError: invalid sy=
ntax<BR>Zope does not have a problem to find "DateTime".<BR>It reports a =
SyntaxError not an ImportError.<BR><BR>There may be something invisible a=
fter the "DateTime" that<BR>confuses the Python parser.<BR><BR>Maybe, the=
 indentation is wrong. You know, Python block structuring<BR>is based on =
indentation (I hate that but others are convinced,<BR>it is a major stren=
gth). One missing space or one to much,<BR>and you get a difficult to rec=
ognize syntax error.<BR><BR><BR>Dieter<BR><BR>___________________________=
____________________<BR>Zope maillist&nbsp; -&nbsp; Zope@zope.org<BR>http=
://lists.zope.org/mailman/listinfo/zope<BR>**&nbsp;&nbsp; No cross posts =
or HTML encoding!&nbsp; **<BR>(Related lists -<BR>http://lists.zope.org/m=
ailman/listinfo/zope-announce<BR>http://lists.zope.org/mailman/listinfo/z=
ope-dev )<BR></BLOCKQUOTE></BODY></HTML><br clear=3Dall><hr>Get more from=
 the Web.  FREE MSN Explorer download : <a href=3D'http://explorer.msn.co=
m'>http://explorer.msn.com</a><br></p>

------=_NextPart_001_0000_01C0F8FF.9AA000A0--