Re: Lowest hassle Python web server?

2005-03-23 Thread Larry Bates
kanzen wrote:
 I keep telling my friends that Python rocks. Now it's time to put my
 money where my mouth is. I'm about to start writing a server for a
 phone based game. It needs to handle simlpe requests from some Java
 code running on the phone at a fairly low transaction rate. There will
 also be a simple web site allowing users to edit preferences and so
 forth. I have just enough Python experience to decide that I prefer it
 over Java for this job. It'll be on a Linux box that I have full
 control over.
 
 I can see from FAQs that there are several possible ways of doing web
 server work in Python, e.g. Twisted or mod_python in Apache, etc. So
 I'm wondering:
 
 - Could you recommend a solution you've found to be the most
 convenient?
 - Does threading cause any more of a hassle in Python than Java?
 - Is there anything similar to JSP in Java?
 
 Thanks,
 KanZen
 
You might want to take a look a Medusa.  It is the basis for the
web server that is bundled in Zope.

http://www.nightmare.com/medusa/

Larry Bates
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Lowest hassle Python web server?

2005-03-23 Thread Gerhard Häring
Larry Bates wrote:
[...] You might want to take a look a Medusa.  It is the basis for the
web server that is bundled in Zope.
Medusa is just an asyncore framework, and not something you can develop 
web apps with.

-- Gerhard
--
http://mail.python.org/mailman/listinfo/python-list


Re: Lowest hassle Python web server?

2005-03-22 Thread kanzen
Okay, thanks for your suggestions. Are there any further
recommendations as to what Python framework to use if the web server is
Apache with mod_python?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Lowest hassle Python web server?

2005-03-21 Thread Neil Benn
snip
- Does threading cause any more of a hassle in Python than Java?
snip
 

Hello,
   From the python docs, it states that the threading design is loosely 
based upon the java module.  Certainly, coming from Java I had little 
trouble getting used to python threading.  However heres some gotchyas :

- The thing to beware of there is something in Python called the GIL.  
Read up about that before you start threading stuff - this will explain 
to you why there is no volatile keyword - this got me confused at first.
- There is no synchronize keyword, instead you have to use locks which 
can be obtained from the threading module
- There are no methods such as wait on an object (there is an event 
object you can get to call wait upon - again threading)
- The handy concurrent stuff which has been introduced in J2SE5.0 
mainly isn't in python - through you do get Queues in Python (maybe 
more, I dunno?)

   The GIL thing makes it easier to do threading with Python (there are 
disadvantages to the GIL but I won't get into that here - if you're 
interested read through the history on this group) but it's still 
threading so beware!

Cheers,
Neil
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : [EMAIL PROTECTED]
Cenix Website : http://www.cenix-bioscience.com
--
http://mail.python.org/mailman/listinfo/python-list


Lowest hassle Python web server?

2005-03-20 Thread kanzen
I keep telling my friends that Python rocks. Now it's time to put my
money where my mouth is. I'm about to start writing a server for a
phone based game. It needs to handle simlpe requests from some Java
code running on the phone at a fairly low transaction rate. There will
also be a simple web site allowing users to edit preferences and so
forth. I have just enough Python experience to decide that I prefer it
over Java for this job. It'll be on a Linux box that I have full
control over.

I can see from FAQs that there are several possible ways of doing web
server work in Python, e.g. Twisted or mod_python in Apache, etc. So
I'm wondering:

- Could you recommend a solution you've found to be the most
convenient?
- Does threading cause any more of a hassle in Python than Java?
- Is there anything similar to JSP in Java?

Thanks,
KanZen

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Lowest hassle Python web server?

2005-03-20 Thread Peter Hansen
kanzen wrote:
- Does threading cause any more of a hassle in Python than Java?
What hassles have you had?  I thought threads in Java
were pretty straightforward.  In any case, in Python
they are generally very easy to use, provided you have
a basic knowledge of thread safety issues and/or provided
you restrict all interaction between threads to use
the Queue module.
- Is there anything similar to JSP in Java?
Snakelets?  Google will find it for you.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list


Re: Lowest hassle Python web server?

2005-03-20 Thread Adonis
kanzen wrote:
I keep telling my friends that Python rocks. Now it's time to put my
money where my mouth is. I'm about to start writing a server for a
phone based game. It needs to handle simlpe requests from some Java
code running on the phone at a fairly low transaction rate. There will
also be a simple web site allowing users to edit preferences and so
forth. I have just enough Python experience to decide that I prefer it
over Java for this job. It'll be on a Linux box that I have full
control over.
I can see from FAQs that there are several possible ways of doing web
server work in Python, e.g. Twisted or mod_python in Apache, etc. So
I'm wondering:
- Could you recommend a solution you've found to be the most
convenient?
- Does threading cause any more of a hassle in Python than Java?
- Is there anything similar to JSP in Java?
Thanks,
KanZen
You can look into CherryPy http://www.cherrypy.org/
Hope this helps
Adonis
--
http://mail.python.org/mailman/listinfo/python-list


Re: Lowest hassle Python web server?

2005-03-20 Thread Gerhard Häring
kanzen wrote:
I keep telling my friends that Python rocks. Now it's time to put my
money where my mouth is. I'm about to start writing a server for a
phone based game. It needs to handle simlpe requests from some Java
code running on the phone at a fairly low transaction rate. There will
also be a simple web site allowing users to edit preferences and so
forth. I have just enough Python experience to decide that I prefer it
over Java for this job. It'll be on a Linux box that I have full
control over.
I can see from FAQs that there are several possible ways of doing web
server work in Python, e.g. Twisted or mod_python in Apache, etc. So
I'm wondering:
- Could you recommend a solution you've found to be the most
convenient?
I've tested a few, and when it finally came that I wanted and needed to 
do web application development in Python for real, I decided to use 
Snakelets.

So far, I find it a very convenient way to write web applications. It's 
also very close to how Java servlets/JSP pages work.

FWIW, the other frameworks I've tested thoroughly were Quixote and WebWare.
- Does threading cause any more of a hassle in Python than Java?
- Is there anything similar to JSP in Java?
Snakelets Ypages come close to JSP.
-- Gerhard
--
http://mail.python.org/mailman/listinfo/python-list