[Feature Suggest] Consider dropping a python package and paster ini file approach as default.

49 views
Skip to first unread message

Cosmia Luna

unread,
Mar 10, 2012, 1:43:55 AM3/10/12
to pylons...@googlegroups.com
As a freshman in python, it made me very confused once what does a package mean and the weird file such like *.egg-info, entry_points.txt, setup.cfg ... I can't understand very well even today. And the paster like ini file, plain python configuration will surely be more powerful with no cost to learn.

I suggest not use pserve script but a plain python script like below to be default or at least a option to make it easier:

#!/path/to/python
import sys
sys.insert(0, 'path/to/app')
from app import wsgi_app, app_config
from werkzeug.serving import run_simple
run_simple(app_config.HOSTNAME, app_config.PORT, wsgi_app,
    use_reloader=
app_config.DEBUG, use_debugger=app_config.DEBUG)

Or something more powerful.

Regards,
Cosmia

Chris McDonough

unread,
Mar 10, 2012, 11:38:15 AM3/10/12
to pylons...@googlegroups.com
On Fri, 2012-03-09 at 22:43 -0800, Cosmia Luna wrote:
> As a freshman in python, it made me very confused once what does a
> package mean and the weird file such like *.egg-info,
> entry_points.txt, setup.cfg ... I can't understand very well even
> today. And the paster like ini file, plain python configuration will
> surely be more powerful with no cost to learn.

I sympathize with this, Python packaging is pretty grotty. However, at
some point you're going to need to understand it to make the most of
Python.

> I suggest not use pserve script but a plain python script like below
> to be default or at least a option to make it easier:
>
> #!/path/to/python
> import sys
> sys.insert(0, 'path/to/app')
> from app import wsgi_app, app_config
> from werkzeug.serving import run_simple
> run_simple(app_config.HOSTNAME, app_config.PORT, wsgi_app,
> use_reloader=app_config.DEBUG, use_debugger=app_config.DEBUG)
>
> Or something more powerful.

Defaults are pretty hard. We get value out of pserve and friends
(particularly the --reload flag).

Of course what you want is already possible. See the code sample at
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/

- C


Reply all
Reply to author
Forward
0 new messages