On 2011-08-21 11:10 -0700, Dexter wrote:
> I want to install webpy on my local machine.
> 
> It is a LAMP server installed on Ubuntu 10.10. I was able to serve
> pages by placing index.php in www folder so I assume Apache and PHP
> are working fine.
>
> SNIPPAGE

I take it you are new to Python in general? Either way, you should keep
in mind that a web.py app is a Python script. For development on local
machine, we usually just run it as a script (using the Python
interpreter), and it will serve _itself_ using the built-in CherryPy
server. So, given an app in code.py script:

   python code.py

And that's about it. CherryPy is actually not too shabby as a server. I
don't know about the built-in one, but I'm guessing it's not been
modified. You can put it behind a reverse proxy like nginx or lighty and
have it serve a production site with proxy serving static content.

With WSGI apps, you don't necessarily have to use an HTTP server to
serve your app. You can use dedicated WSGI servers (CherryPy is one, but
there are servers like Bjoern, which are much faster). In that scenario,
the WSGI server sits behind a reverse proxy which serves the static
files. In my exerience with Bjoern and Bottle, Bjoern was also quite
fast serving static files (although I imagine not quite as fast as
nginx).

So anyway, locally, you only need to run your script and nothing else.

Also, note that you don't need to install web.py itself either. You can
put it into your project tree and import it as you would any local
module/package. So:

   your_project/
     |- web <-- web.py
     |- other_modules
     \- code.py


   #code.py
   import web # works!

-- 
Branko Vukelic
[email protected]
[email protected]

Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com

Love coffee? You might love Loveffee, too.
loveffee.appspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to