On Wed, Dec 1, 2010 at 1:10 AM, Stéphane Klein <[email protected]> wrote:
> 2. use setup.py console_scripts entry points ? How can I load ".ini"
> configuration file in my script
> """
>
> In my setup.py :
>
>    entry_points="""
>    ...
>    [console_scripts]
>    myprojectname-export = myprojectname.scripts.export:main
>    myprojectname-import = myprojectname.scripts.import_:main
>    myprojectname-check = myprojectname.scripts.check:main
>    """
>
> After that, I do :
>
> $ python setup.py develop
>
> After this installation, I can use "myprojectname-export",
> "myprojectname-import", "myprojectname-check" scripts from everywhere. To
> use this script I don't need "setup.py".
>
> With this complement information, what is better ? this scripts or custom
> paster commands ?
>
> If I would like use paster command outside source project, I need to use
> "[paste.global_paster_command]" entry points section.

This isn't quite the right question. For utility scripts, the question
is whether to set up console scripts for them or not. If you don't set
up a console script, you can still run the script with "python -m
myapp.scripts.XXX". The bin/ directory is shared with other
applications so you may not want to clutter it with infrequently-used
scripts. So I make console scripts for frequently-used or important
utilities, but not for ad hoc or minor utilities.

-- 
Mike Orr <[email protected]>

-- 
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].
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