[Zope-dev] Making objects publishable
Arpad Kiss
Arpad Kiss" <sekter@mail.matav.hu
Wed, 7 Jul 1999 16:58:10 +0200
Hi!
Yesterday I got exactly the same errormessage. I found that, I had a
PYTHONPATH env. variable that caused this. Yesterday I had no time to examin
the contents of it, but after I deleted this variable it was ok.
Arpad
----- Original Message -----
From: Adrian Graham <aag@stanford.edu>
To: <zope-dev@zope.org>
Sent: Wednesday, July 07, 1999 10:08 PM
Subject: Re: [Zope-dev] Making objects publishable
> Much thanks for all of the suggestions regarding simple object
> publishing. Unfortunately I continue to have problems.
>
> It was suggested that the easiest way to publish an object was using the
> ZopeHTTPServer as follows:
> > ZopeHTTPServer.py [-p <port>] [-t] [-h <host address>] <path to module>
> > var=value,]
>
> This makes sense to me, but for some reason the ZopeHTTPServer.py was
> not given executable permission in my installation -- I don't know if
> this is typical or not. If it is then perhaps am I not supposed to run
> the ZopeHTTPServer.py directly? Anyway, after giving this file
> executable permission, I tried publishing the Hello.py file, but
> received the following error message:
>
> (the current directory is: [zope root]/lib/python/)
> bash-2.02# ../../bin/python ../../ZopeHTTPServer/ZopeHTTPServer.py -p
> 9673
> ../../Hello.py
> Traceback (innermost last):
> File "../../ZopeHTTPServer/ZopeHTTPServer.py", line 500, in ?
> if __name__=="__main__": main()
> File "../../ZopeHTTPServer/ZopeHTTPServer.py", line 498, in main
> start(module_file,host,port,threading,env)
> File "../../ZopeHTTPServer/ZopeHTTPServer.py", line 436, in start
> set_published_module(module_file,BoboRequestHandler,env)
> File "../../ZopeHTTPServer/ZopeHTTPServer.py", line 429, in
> set_published_module
> import cgi_module_publisher
> ImportError: No module named cgi_module_publisher
>
> This seems like some sort of configuration error to me, but I'm not
> really sure what I'm doing wrong. It can't seem to find the
> cgi_module_publisher module and neither can I.
>
> Any suggestions would be greatly appreciated.
>
> Adrian
>
> Michel Pelletier wrote:
> >
> > > -----Original Message-----
> > > From: Adrian Graham [mailto:aag@stanford.edu]
> > > Sent: Tuesday, June 29, 1999 10:31 PM
> > > To: zope-dev@zope.org
> > > Subject: [Zope-dev] Making objects publishable
> > >
> > >
> > > I am in the process of trying to make a simple "Hello World" object
> > > publishable. Currently I am using the tutorial entitled
> > > "Approaching the
> > > Zope Product API." In one section of the tutorial it appears to give
> > > instructions regarding making an object publishable, and testing that
> > > object with the debugger. However, it remains unclear to me how I
> > > actually install this object in the Zope system, so that it
> > > is available
> > > on the Web. At this point I am not interested in making this object a
> > > Product, but rather just a published object. Any instructions
> > > regarding
> > > this would be greatly appreciated (or pointers to documentation, if
> > > there is something I've overlooked).
> > >
> >
> > Publishing just a straight object on the web does not involve Zope,
> > however, it does involve two things 1) a webserver, and 2) ZPublisher,
> > which is the Object Request Broker for Zope.
> >
> > ZPublisher publishes modules over various network protocols.
> >
> > If you think about it, Zope is just one (really) big python module. To
> > ZPublisher, there is no difference between your python module and
> > Zope's.
> >
> > So, the quick and dirty way to publish your module would be with the
> > quick and dirty webserver that comes with Zope, ZopeHTTPServer. The
> > synopsis of the command to do this is:
> >
> > ZopeHTTPServer.py [-p <port>] [-t] [-h <host address>] <path to module>
> > var=value,]
> >
> > <path to module> is the path to the module you want to publish. The URL
> > then would be:
> >
> > http://machine:port/Module/Object
> >
> > -Michel
> >
> > > Adrian Graham
> > >
> > > _______________________________________________
> > > Zope-Dev maillist - Zope-Dev@zope.org
> > > http://www.zope.org/mailman/listinfo/zope-dev
> > >
> > > (For non-developer, user-level issues, use the companion list,
> > > zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
> > >
> >
> > _______________________________________________
> > Zope-Dev maillist - Zope-Dev@zope.org
> > http://www.zope.org/mailman/listinfo/zope-dev
> >
> > (For non-developer, user-level issues, use the companion list,
> > zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://www.zope.org/mailman/listinfo/zope-dev
>
> (For non-developer, user-level issues, use the companion list,
> zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
>