Re: Create a .lua fle from Python

2015-10-02 Thread jmp
On 10/01/2015 09:12 PM, Steven D'Aprano wrote: On Wed, 30 Sep 2015 07:21 pm, jmp wrote: Is Ariel's xml file user-supplied? If so, how does your suggestion prevent the resulting lua script from executing arbitrary code? It does not. Like it doesn't fulfill the millions of possible

Re: Create a .lua fle from Python

2015-10-02 Thread Stefan Behnel
jmp schrieb am 02.10.2015 um 11:03: > Safety is like speed optimization, you care about it only when it can be a > problem. And the vast majority (there's a recent trolling thread about the > equivalent percentage of vast majority if you want to have fun) of python > code may run on trusted

Re: Create a .lua fle from Python

2015-10-01 Thread Steven D'Aprano
On Wed, 30 Sep 2015 07:21 pm, jmp wrote: >> Is Ariel's xml file user-supplied? If so, how does your suggestion >> prevent the resulting lua script from executing arbitrary code? > > It does not. Like it doesn't fulfill the millions of possible > requirements the OP could have written but did

Re: Create a .lua fle from Python

2015-09-30 Thread jmp
On 09/29/2015 07:28 PM, Peter Otten wrote: jmp wrote: import bs4 import jinja2 xml = """ BuenosAires 30 Seatle 25 """ lua_template = """ cities_temps ={ {%- for city, temp in cities.iteritems() %} ["{{city}}"] = {{temp}}, {%-

Create a .lua fle from Python

2015-09-29 Thread Ariel Argañaraz
Hi, This is my first post, I would like to know if a library that can help me with this. I want to parse a XML fle with Python and save the data into a Lua table called for example "newTable", then I want to create a "table.lua" fle with the "newTable" write on it. for example: the XML fle:

Re: Create a .lua fle from Python

2015-09-29 Thread Laura Creighton
In a message of Mon, 28 Sep 2015 18:41:09 -0300, Ariel Argañaraz writes: >Hi, >This is my first post, I would like to know if a library that can help me >with this. > > >I want to parse a XML fle with Python and save the data into a Lua table >called for example "newTable", then I want to create a

Re: Create a .lua fle from Python

2015-09-29 Thread jmp
On 09/28/2015 11:41 PM, Ariel Argañaraz wrote: Hi, This is my first post, I would like to know if a library that can help me with this. I want to parse a XML fle with Python and save the data into a Lua table called for example "newTable", then I want to create a "table.lua" fle with the

Re: Create a .lua fle from Python

2015-09-29 Thread Peter Otten
jmp wrote: > On 09/28/2015 11:41 PM, Ariel Argañaraz wrote: >> Hi, >> This is my first post, I would like to know if a library that can help >> me with this. >> >> >> I want to parse a XML fle with Python and save the data into a Lua table >> called for example "newTable", then I want to create a