Sweet, Simon, that's exactly what I need.  Thanks so much, I'm quite 
enjoying Python so far, and I have a working starter project now.


On Monday, July 30, 2012 2:07:44 AM UTC-7, Simon wrote:
>
> When you have a working pyramid starter project, this might be helpful... 
>
> http://projects.unbit.it/uwsgi/wiki/INIFiles 
>
> And this.. 
>
> http://pythonpaste.org/deploy/ 
>
> You can init like this; 
>
>     $ uwsgi development.ini 
>
> provided you have this line in your .ini 
>
>      [uwsgi] 
>      paste = config:<absolute_project_path>/development.ini 
>
> Alternatively, you can combine the ``ini`` and ``paste`` config action, 
> and remove the need to reference your .ini file twice. 
>
>     $ uwsgi --ini-paste development.ini 
>
> The features above support having combined .ini files, or a single .ini 
> files that configures multiple apps. 
>
> ps. You don't need that ``callable`` line because uwsgi reads your paste 
> .ini file and derives from ``use = egg:MyProject``, which is short-hand for 
> ``egg:MyProject#main`` - ``main`` being the callable in your project's 
> ``__init__.py``. I write mine in full as I prefer to have as little implied 
> config as possible. 
>
>
> On 29 Jul 2012, at 05:47, Craig Younkins wrote: 
>
> > You'll want to follow this tutorial to create your first Pyramid project 
> - 
> http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/project.html#project-narr
>  
> > 
> > When you want to deploy it using uwsgi, follow up to step 7 in this 
> tutorial - 
> http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/modwsgi/index.html#modwsgi-tutorial
>  
> > 
> > In your uwsgi ini, 'file' will refer to 'pyramid.wsgi' in the tutorial 
> above, since it will have the wsgi application (callable = 'application') 
> > 
> > Hope that helps! 
> > 
> > Craig Younkins 
> > 
> > 
> > On Sat, Jul 28, 2012 at 11:08 PM, Jonah Dahlquist 
> > <[email protected]<javascript:>> 
> wrote: 
> > Hello, world! 
> > 
> > I'm coming into the Python world from a PHP background.  I'm trying to 
> get a working Pyramid application working on my own machine, and I've 
> almost made it.  I have nginx and uWSGI running, and can call a Python 
> script from the browser successfully.  However, lots of research, reading 
> documentation, and even reading through the "starter project" code has 
> failed to make it clear to me how to connect Pyramid to wsgi.  The script 
> looks like this: 
> > 
> > def application(env, start_response): 
> >     start_response('200 OK', [('Content-Type', 'text/html')]) 
> >     return "Hello universe!" 
> > 
> > The INI configuration file for uWSGI is as follows: 
> > 
> > [uwsgi] 
> > socket = /tmp/uwsgi.sock 
> > master = true 
> > processes = 4 
> > file = ./app.py 
> > callable = application 
> > daemonize = ./uwsgi.log 
> > pidfile = /tmp/app_process.pid 
> > virtualenv = /home/jonah/.virtualenvs/test 
> > 
> > So a request to http://localhost/ in the browser gives me "Hello 
> Universe!".  How can I modify my script/uWSGI configuration to run Pyramid 
> instead?  Thanks for your help. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "pylons-discuss" group. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msg/pylons-discuss/-/xW1HspiacSYJ. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> [email protected] <javascript:>. 
> > For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en. 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "pylons-discuss" group. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> [email protected] <javascript:>. 
> > For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/mzV73rvdRpYJ.
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/pylons-discuss?hl=en.

Reply via email to