Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

webpy example

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


freevryheid at gmail

Nov 18, 2009, 7:51 PM

Post #1 of 5 (551 views)
Permalink
webpy example

Please post a tutorial or cookbook example to setup cherokee with webpy.

Thanks

Andre


me at pigmej

Nov 19, 2009, 3:05 AM

Post #2 of 5 (518 views)
Permalink
Re: webpy example [In reply to]

Generally, that's normal python setup. For example wklej.to works on
Cherokee + webpy.org

"runner.sh":
---
#!/bin/bash

nohup python2.4 /path/to/script.py 127.0.0.1:8003 scgi &
---
give execute permissions ( chmod +x ... )

"script.py"
normal webpy application

define new information source with Interpreter runner.sh ( full path )
connection 127.0.0.1:8003

save, and done.

Greetings
Jędrzej Nowak



On Thu, Nov 19, 2009 at 4:51 AM, Andre Smit <freevryheid [at] gmail> wrote:
> Please post a tutorial or cookbook example to setup cherokee with webpy.
>
> Thanks
>
> Andre
>
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>
>
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


freevryheid at gmail

Nov 19, 2009, 8:53 PM

Post #3 of 5 (507 views)
Permalink
Re: webpy example [In reply to]

Thanks, this helps a lot. Could someone please point out the error in
my script if any - I can't get it running using SCGI:

script.py:

#!/usr/bin/python

import web
web.wsgi.runwsgi = lambda func, addr=('127.0.0.1',8080):
web.wsgi.runscgi(func, addr)

urls = ( '/', 'hello')

class hello:
def GET(self):
return "Hello world!"

if __name__ == "__main__":
web.run(urls, globals())

I got this mostly from: http://slav0nic.org.ua/entry/141

I'm getting a 503 - Service Unavailable error.
+ I've chmoded 755 both runner.sh and script.py
+ firewall is disabled.


Thx

On Nov 19, 5:05 am, Jędrzej Nowak <m...@pigmej.eu> wrote:
> Generally, that's normal python setup. For example wklej.to works on
> Cherokee + webpy.org
>
> "runner.sh":
> ---
> #!/bin/bash
>
> nohup python2.4 /path/to/script.py 127.0.0.1:8003 scgi &
> ---
> give execute permissions ( chmod +x ... )
>
> "script.py"
> normal webpy application
>
> define new information source with Interpreter runner.sh ( full path )
> connection 127.0.0.1:8003
>
> save, and done.
>
> Greetings
> Jędrzej Nowak
>
> On Thu, Nov 19, 2009 at 4:51 AM, Andre Smit <freevryh...@gmail.com> wrote:
> > Please post a tutorial or cookbook example to setup cherokee with webpy.
>
> > Thanks
>
> > Andre
>
> > _______________________________________________
> > Cherokee mailing list
> > Chero...@lists.octality.com
> >http://lists.octality.com/listinfo/cherokee
>
> _______________________________________________
> Cherokee mailing list
> Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


freevryheid at gmail

Nov 19, 2009, 9:01 PM

Post #4 of 5 (508 views)
Permalink
Re: webpy example [In reply to]

Sorry, not a 503 error but 504: Gateway Timeout



On Nov 19, 10:53 pm, freevryheid <freevryh...@gmail.com> wrote:
> Thanks, this helps a lot. Could someone please point out the error in
> my script if any - I can't get it running using SCGI:
>
> script.py:
>
> #!/usr/bin/python
>
> import web
> web.wsgi.runwsgi = lambda func, addr=('127.0.0.1',8080):
> web.wsgi.runscgi(func, addr)
>
> urls = ( '/', 'hello')
>
> class hello:
>     def GET(self):
>         return "Hello world!"
>
> if __name__ == "__main__":
>         web.run(urls, globals())
>
> I got this mostly from:http://slav0nic.org.ua/entry/141
>
> I'm getting a 503 - Service Unavailable error.
> + I've chmoded 755 both runner.sh and script.py
> + firewall is disabled.
>
> Thx
>
> On Nov 19, 5:05 am, Jędrzej Nowak <m...@pigmej.eu> wrote:
>
> > Generally, that's normal python setup. For example wklej.to works on
> > Cherokee + webpy.org
>
> > "runner.sh":
> > ---
> > #!/bin/bash
>
> > nohup python2.4 /path/to/script.py 127.0.0.1:8003 scgi &
> > ---
> > give execute permissions ( chmod +x ... )
>
> > "script.py"
> > normal webpy application
>
> > define new information source with Interpreter runner.sh ( full path )
> > connection 127.0.0.1:8003
>
> > save, and done.
>
> > Greetings
> > Jędrzej Nowak
>
> > On Thu, Nov 19, 2009 at 4:51 AM, Andre Smit <freevryh...@gmail.com> wrote:
> > > Please post a tutorial or cookbook example to setup cherokee with webpy.
>
> > > Thanks
>
> > > Andre
>
> > > _______________________________________________
> > > Cherokee mailing list
> > > Chero...@lists.octality.com
> > >http://lists.octality.com/listinfo/cherokee
>
> > _______________________________________________
> > Cherokee mailing list
> > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
>
> _______________________________________________
> Cherokee mailing list
> Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


freevryheid at gmail

Nov 19, 2009, 9:07 PM

Post #5 of 5 (525 views)
Permalink
Re: webpy example [In reply to]

fixed: web.application(urls, globals())

Still the same error though.

2009/11/19 freevryheid <freevryheid [at] gmail>

> Sorry, not a 503 error but 504: Gateway Timeout
>
>
>
> On Nov 19, 10:53 pm, freevryheid <freevryh...@gmail.com> wrote:
> > Thanks, this helps a lot. Could someone please point out the error in
> > my script if any - I can't get it running using SCGI:
> >
> > script.py:
> >
> > #!/usr/bin/python
> >
> > import web
> > web.wsgi.runwsgi = lambda func, addr=('127.0.0.1',8080):
> > web.wsgi.runscgi(func, addr)
> >
> > urls = ( '/', 'hello')
> >
> > class hello:
> > def GET(self):
> > return "Hello world!"
> >
> > if __name__ == "__main__":
> > web.run(urls, globals())
> >
> > I got this mostly from:http://slav0nic.org.ua/entry/141
> >
> > I'm getting a 503 - Service Unavailable error.
> > + I've chmoded 755 both runner.sh and script.py
> > + firewall is disabled.
> >
> > Thx
> >
> > On Nov 19, 5:05 am, Jędrzej Nowak <m...@pigmej.eu> wrote:
> >
> > > Generally, that's normal python setup. For example wklej.to works on
> > > Cherokee + webpy.org
> >
> > > "runner.sh":
> > > ---
> > > #!/bin/bash
> >
> > > nohup python2.4 /path/to/script.py 127.0.0.1:8003 scgi &
> > > ---
> > > give execute permissions ( chmod +x ... )
> >
> > > "script.py"
> > > normal webpy application
> >
> > > define new information source with Interpreter runner.sh ( full path )
> > > connection 127.0.0.1:8003
> >
> > > save, and done.
> >
> > > Greetings
> > > Jędrzej Nowak
> >
> > > On Thu, Nov 19, 2009 at 4:51 AM, Andre Smit <freevryh...@gmail.com>
> wrote:
> > > > Please post a tutorial or cookbook example to setup cherokee with
> webpy.
> >
> > > > Thanks
> >
> > > > Andre
> >
> > > > _______________________________________________
> > > > Cherokee mailing list
> > > > Chero...@lists.octality.com
> > > >http://lists.octality.com/listinfo/cherokee
> >
> > > _______________________________________________
> > > Cherokee mailing list
> > > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
> >
> > _______________________________________________
> > Cherokee mailing list
> > Chero...@lists.octality.comhttp://lists.octality.com/listinfo/cherokee
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.