[Pythonmac-SIG] Doc cgi python

Jörg Kantel kantel@mpiwg-berlin.mpg.de
Fri, 24 Mar 2000 18:49:54 +0100


--============_-1258202300==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

>  > How execute a script cgi python with WebStar ?
>  > Or where I can find documentation on the cgi with python ?
>  >
>  >
>Internet Programming with Python
>Aaron Watters, Guido van Rossum, James C. Ahlstrom

O no. Sure that is a nice book but all the programs there will never 
work with WebStar :o( WebStar has it's own way to communicate via 
Apple Event (wwwSdoc) to the CGI and it has become the standard way 
on the Mac. That means all Webserver on the Mac do it this way.

Unfortunately there exist no wrapper-classes for MacPython (unlike 
MacPerl) and so you have to program your stuff by yourself. There is 
one example shipped with the MacPython standard-distribution in the 
folder "cgi" in the folder "Demo" in the folder "Mac" ;o). This 
example is using the MiniAEFrame. But unfortunately by my try it runs 
only the first time - by a second call it forced my Mac to freeze.

My answer is: Sorry, there is no way to execute a Python CGIs with 
Webstar and any other Mac Webserver. That's not really exact, you can 
do it with WebTen (that's an Apache port on the Mac). But to do that 
you have first to compile a BSD Python within MachTen (that's an UN*X 
for the Mac, both programs are from Tenon: http://www.tenon.com/) and 
than to transfer the libs  (you can't run MachTen and WebTen on the 
same machine) to the WebTen folder (it worked - I've tested it ;o) 
but it's a hard way and I stopped any further investigations.

At the moment I do all my CGIs with Frontier (you can use the free 
version 5.01, availabel at 
http://www.scripting.com/frontier5/downloads/default.html) and 
sometimes AppleScript. For target machines which are not Macintosh 
boxes I use MacPerl 
(http://www.iis.ee.ethz.ch/~neeri/macintosh/perl.html) on my Mac. It 
has the above mentioned wrapper classes that transform the Apple way 
of communicating to a cgi to the Unix-way. So you can program and 
test your CGI's on the Mac and run it on Unix.

That's my five cents (and pls excuse my bad (d)english)
HTH
J"org

--
---------------------------------------------------------------------- 
----------------
J"org Kantel		Max Planck Institute for the History of Science
Computer Department	http://www.mpiwg-berlin.mpg.de/staff/kantel/kantel.html
Wilhelmstr.44	email: kantel@mpiwg-berlin.mpg.de	email 
private: joerg@kantel.de
D-10117 Berlin	phone: +4930-22667-220		fax: +4930-22667-299
---------------------------------------------------------------------- 
---------------- 
--============_-1258202300==_ma============
Content-Type: text/enriched; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<excerpt>> How execute a script cgi python with WebStar ?

> Or where I can find documentation on the cgi with python ?=20

>=20

>

Internet Programming with Python

Aaron Watters, Guido van Rossum, James C. Ahlstrom

</excerpt>

O no. Sure that is a nice book but all the programs there will never
work with WebStar :o( WebStar has it's own way to communicate via Apple
Event (wwwSdoc) to the CGI and it has become the standard way on the
Mac. That means all Webserver on the Mac do it this way.


Unfortunately there exist no wrapper-classes for MacPython (unlike
MacPerl) and so you have to program your stuff by yourself. There is
one example shipped with the MacPython standard-distribution in the
folder "cgi" in the folder "Demo" in the folder "Mac" ;o). This example
is using the MiniAEFrame. But unfortunately by my try it runs only the
first time - by a second call it forced my Mac to freeze.


My answer is: Sorry, there is no way to execute a Python CGIs with
Webstar and any other Mac Webserver. That's not really exact, you can
do it with WebTen (that's an Apache port on the Mac). But to do that
you have first to compile a BSD Python within MachTen (that's an UN*X
for the Mac, both programs are from Tenon: http://www.tenon.com/) and
than to transfer the libs  (you can't run MachTen and WebTen on the
same machine) to the WebTen folder (it worked - I've tested it ;o) but
it's a hard way and I stopped any further investigations.


At the moment I do all my CGIs with Frontier (you can use the free
version 5.01, availabel at
<fontfamily><param>Verdana</param><color><param>6666,0000,0000</param><bigge=
r>http://www.scripting.com/frontier5/downloads/default.html</bigger></color>=
</fontfamily>)
and sometimes AppleScript. For target machines which are not Macintosh
boxes I use MacPerl
(<fontfamily><param>Verdana</param><color><param>6666,0000,0000</param><bigg=
er>http://www.iis.ee.ethz.ch/~neeri/macintosh/perl.html</bigger></color></fo=
ntfamily>)
on my Mac. It has the above mentioned wrapper classes that transform
the Apple way of communicating to a cgi to the Unix-way. So you can
program and test your CGI's on the Mac and run it on Unix.


That's my five cents (and pls excuse my bad (d)english)

HTH

J"org

--

----------------------------------------------------------------------------=
----------

J"org Kantel		Max Planck Institute for the History of Science

Computer Department	http://www.mpiwg-berlin.mpg.de/staff/kantel/kantel.html

Wilhelmstr.44	email: kantel@mpiwg-berlin.mpg.de	email private: joerg@kantel.=
de

D-10117 Berlin	phone: +4930-22667-220		fax: +4930-22667-299

----------------------------------------------------------------------------=
----------

--============_-1258202300==_ma============--