Help me learn Python !

Steve Holden sholden at holdenweb.com
Wed Apr 17 17:56:42 EDT 2002


"peter" <REMOVEpeterp100 at hotmail.com> wrote ...
> On Tue, 16 Apr 2002 16:19:16 -0400, "Steve Holden"
> <sholden at holdenweb.com> wrote:
>
> >"peter" <REMOVEpeterp100 at hotmail.com> wrote ...
> >> I'm using Windows 2000, and the Xitami webserver.
> >>
> >>
> >I don't ever remember having these problems on my Win98 system. Although
> >I've now got Win2k I have not yet tried any LRWP stuff. Hold on ...
> >
> >Nope, don't see any indentation errors -- are you sure you haven't
mangled
> >the code? Note, by the way, you need to change the call
> >
> >            self.sock.connect(self.host, self.port)
> >
> >to
> >
> >            self.sock.connect((self.host, self.port))
> >
> >before it will run - a change in the library brought it into line with
the
> >documentation, breaking code that took advantage of the opriginal bug.
For
> >the record, I just ran the code and everything works fine: I get five
> >responses from testlrwp (which responds at "/testapp1"), and then "The
URL
> >you asked for does not exist on this website". All as expected.
> >
> >Hope this helps.
> >
> >regards
> > Steve
>
> Thank you for you reply,
>
> I think my problem has something to do with this website.  As I copy
> and paste the code from here
[URL and code deleted to avoid anybody else gettijng sucked in]

Well, that would explain it. Whoever is running that web site wants to try
using their own ocde occasionally :-) -- they have completely removed all
indentation from the code!

>
> is there another source for these libraries.
>
Indeed there is. If you've downloaded Xitami and installed it in <XitamiDir>
then you will also have a <XitamiDir>/addons/lrwp directory, and the code is
there, correctly indented.

> Also, I'm using notepad and IDLE.
>
>The only thing you'll want to watch out for is that a lot of Python code
now uses four-space indentation. While you can mix tabs and spaces (the
interpreter treats tabs as taking the spacing to the next multiple of 8)
this is NOT recommended.

Hope you can now run LRWP processes successfully. Don't forget that
modification to the accept() call!

regards
 Steve








More information about the Python-list mailing list