Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #97205
| Path | csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <lac@openend.se> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'subject:Python': 0.05; 'table.': 0.07; 'cc:addr:python-list': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'example:': 0.10; 'python': 0.10; 'python.': 0.11; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'help?': 0.16; 'message-id:@fido.openend.se': 0.16; 're- write': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'laura': 0.18; 'library': 0.20; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; 'parse': 0.22; 'sep': 0.22; 'subject: .': 0.22; 'tables': 0.23; 'xml': 0.24; 'all.': 0.24; 'mon,': 0.24; 'example': 0.26; 'this.': 0.28; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'anyone': 0.32; "can't": 0.32; 'table': 0.32; 'maybe': 0.33; 'url:python': 0.33; 'file': 0.34; 'could': 0.35; 'skip:> 10': 0.35; 'but': 0.36; 'too': 0.36; 'there': 0.36; 'url:org': 0.36; 'subject:: ': 0.37; 'why': 0.39; 'data': 0.39; 'subject:from': 0.39; 'some': 0.40; 'save': 0.60; 'header:Message-Id:1': 0.61; 'per': 0.62; '30,': 0.63; 'here:': 0.63; '>with': 0.84; 'header:In-reply-to:1': 0.84; 'posible': 0.84; 'post,': 0.84 |
| To | Ariel Argañaraz <arielin82@gmail.com> |
| cc | python-list@python.org, lac@openend.se |
| From | Laura Creighton <lac@openend.se> |
| Subject | Re: Create a .lua fle from Python |
| In-reply-to | <CAMxmM6bhyHUpQXxnwO-OiesppP6mRM74=dA37VJwV212MZGyUw@mail.gmail.com> |
| References | <CAMxmM6bhyHUpQXxnwO-OiesppP6mRM74=dA37VJwV212MZGyUw@mail.gmail.com> |
| Comments | In-reply-to Ariel Argañaraz <arielin82@gmail.com> message dated "Mon, 28 Sep 2015 18:41:09 -0300." |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-ID | <11064.1443526970.1@fido> |
| Content-Transfer-Encoding | 8bit |
| Date | Tue, 29 Sep 2015 13:42:50 +0200 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Tue, 29 Sep 2015 13:42:52 +0200 (CEST) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.235.1443526980.28679.python-list@python.org> (permalink) |
| Lines | 62 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1443526980 news.xs4all.nl 23837 [2001:888:2000:d::a6]:51303 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:97205 |
Show key headers only | View raw
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 "table.lua" fle with
>the "newTable" write on it.
>
>
>for example:
>
>the XML fle: cities.xml
>
><cities>
> <city>
> <name>BuenosAires</name>
> <temperature>30</temperature>
> </city>
><city>
> <name>Seatle</name>
> <temperature>25</temperature>
></city>
></cities>
>
>
>And I want to create a cities_temp.lua file
>
>cities_temps ={
>["Buenos Aires"] = 30,
>["Seatle"] = 25,
>}
>
>
>Is that posible to do with LUPA (https://pypi.python.org/pypi/lupa)?? In
>the docs I read that you can create lua tables but I did not see if there
>is a way to create a .lua file with that table.
>
>
>I could do it with python writing to a file line per line but i want some
>more elegant.
>
>Can anyone give some help?
>
>Thanks.
>
>--
>Ariel Argañaraz
Lupa is a partial re-write of lunatic python.
https://pypi.python.org/pypi/lunatic-python
with docs here:
http://labix.org/lunatic-python
and maybe that can do what you want.
But I don't know why you need to involve python at all. Lua has
perfectly good xml parsers, indeed like python -- perhaps too many
of them. Can't you just use lua?
Laura
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Create a .lua fle from Python Laura Creighton <lac@openend.se> - 2015-09-29 13:42 +0200
csiph-web