On Fri, Dec 11, 2009 at 3:56 PM, Lea Haensenberger <[email protected]> wrote:
> I really need to create language catalogues automatically. Can
> somebody help me?
>
> On Dec 8, 11:47 am, Lea Haensenberger <[email protected]> wrote:
>> Hi all,
>> I'd like to call 'python setup.py extract_messages' within a python
>> script. Is there a way to do this directly, i.e. not via shell
>> execution?

Here is an ugly solution:

os.chdir('packageroot')
old_argv = sys.argv[:]
sys.argv = sys.argv[0] + ['extract_messages']
__import__('setup') # maybe execfile instead
sys.argv = old_argv

But if you only need to extract messages you'd have a look the Babel
api (i've never do that)

>>
>> Cheers,
>> Lea
>
> --
>
> 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.
>
>
>

--

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