Re: How to parse XML file and save results as .txt or .csv?

2015-08-18 Thread harirammanohar159
On Tuesday, 18 August 2015 22:20:32 UTC+5:30, ryguy7272 wrote: > I am trying to parse this XML file. > http://www.usda.gov/oce/commodity/wasde/report_format/latest-July-2015-New-Format.xml > > I tried a bunch of things in R, and almost got it working, but it seems like > there was some issue wit

Logging to a file from a C-extension

2015-08-18 Thread Al Pfalzgraf
If a logging file is opened at the level of a Python application, how would the log file name be communicated to a C-extension so that logging from the extension would be sent to the same log file? -- https://mail.python.org/mailman/listinfo/python-li

pysqlite 2.8.0 released

2015-08-18 Thread Gerhard Häring
NEW FEATURES - No new features, but tons of bugfixes. These mean that things now work that didn't before: - Transactional DDL now works - You can use SAVEPOINTs now BUILD PROCESS - Python 2.7.x is now required. If trying to use it with Python 3, print a useful error message. Integrated all

Re: regex recursive matching (regex 2015.07.19)

2015-08-18 Thread MRAB
On 2015-08-18 22:55, Ben Bacarisse wrote: Neal Becker writes: Trying regex 2015.07.19 I'd like to match recursive parenthesized expressions, with groups such that '(a(b)c)' would give group(0) -> '(a(b)c)' group(1) -> '(b)' but that's not what I get import regex #r = r'\((?>[^()]|(?R))*\)

testing, please disregard

2015-08-18 Thread Tim Johnson
I have had some problems with another python.org ML. I am sending this to see if it is received. Please disregard. thanks -- Tim http://www.akwebsoft.com, http://www.tj49.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Regular expression and substitution, unexpected duplication

2015-08-18 Thread MRAB
On 2015-08-18 22:42, Laurent Pointal wrote: Hello, I want to make a replacement in a string, to ensure that ellipsis are surrounded by spaces (this is not a typographycal problem, but a preparation for late text chunking). I tried with regular expressions and the SRE_Pattern.sub() method, but I

Re: regex recursive matching (regex 2015.07.19)

2015-08-18 Thread Ben Bacarisse
Neal Becker writes: > Trying regex 2015.07.19 > > I'd like to match recursive parenthesized expressions, with groups such that > '(a(b)c)' > > would give > group(0) -> '(a(b)c)' > group(1) -> '(b)' > > but that's not what I get > > import regex > > #r = r'\((?>[^()]|(?R))*\)' > r = r'\(([^()]|(?

Re: memory control in Python

2015-08-18 Thread Ping Liu
Hi, Oscar, Your feedback is very valuable to me since you dig into the problem itself. Basically, we are trying to develop an open source software with multiple interface to several free solvers so that we can switch among them in case one of them is not working or so efficient. The optimizati

Regular expression and substitution, unexpected duplication

2015-08-18 Thread Laurent Pointal
Hello, I want to make a replacement in a string, to ensure that ellipsis are surrounded by spaces (this is not a typographycal problem, but a preparation for late text chunking). I tried with regular expressions and the SRE_Pattern.sub() method, but I have an unexpected duplication of the repl

Re: I2C protocol

2015-08-18 Thread Mark Lawrence
On 18/08/2015 20:34, Johny wrote: Is there any library for I2C protocol so that I can control a device connected to Windows? Go to https://pypi.python.org/pypi, put i2c in the search box and take your pick. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can

I2C protocol

2015-08-18 Thread Johny
Is there any library for I2C protocol so that I can control a device connected to Windows? -- https://mail.python.org/mailman/listinfo/python-list

Re: regex recursive matching (regex 2015.07.19)

2015-08-18 Thread MRAB
On 2015-08-18 15:25, Neal Becker wrote: Trying regex 2015.07.19 I'd like to match recursive parenthesized expressions, with groups such that '(a(b)c)' would give group(0) -> '(a(b)c)' group(1) -> '(b)' but that's not what I get import regex #r = r'\((?>[^()]|(?R))*\)' r = r'\(([^()]|(?R))*\)

Re: regex recursive matching (regex 2015.07.19)

2015-08-18 Thread Terry Reedy
On 8/18/2015 10:25 AM, Neal Becker wrote: Trying regex 2015.07.19 I'd like to match recursive parenthesized expressions, with groups such that '(a(b)c)' Extended regular expressions can only match strings in extended regular languages. General nested expressions are too general for that. Yo

regex recursive matching (regex 2015.07.19)

2015-08-18 Thread Neal Becker
Trying regex 2015.07.19 I'd like to match recursive parenthesized expressions, with groups such that '(a(b)c)' would give group(0) -> '(a(b)c)' group(1) -> '(b)' but that's not what I get import regex #r = r'\((?>[^()]|(?R))*\)' r = r'\(([^()]|(?R))*\)' #r = r'\((?:[^()]|(?R))*\)' m = regex.m

Re: Dave Angel RIP

2015-08-18 Thread Nonami Animashaun
Folks, Many of us will remember the long-time list regular Dave Angel. Dave was active on this list for many years, a keen participant in many discussions, and very helpful to Python users of all levels of expertise. Unfortunately, I am saddened to say that Dave passed away on May 25th, and the f

Re: Dave Angel RIP

2015-08-18 Thread Chris Angelico
On Tue, Aug 18, 2015 at 10:25 PM, Steven D'Aprano wrote: > Many of us will remember the long-time list regular Dave Angel. Dave was > active on this list for many years, a keen participant in many discussions, > and very helpful to Python users of all levels of expertise. Aww :( He was notable to

Re: execute commands as su on remote server

2015-08-18 Thread Julio Oña
Hi, try to use http://www.fabfile.org/ look at: http://docs.fabfile.org/en/latest/api/core/operations.html sudo() call has the posibility to change to another user besides root, with: with settings(sudo_user='mysql'): sudo("whoami") # prints 'mysql' El lun., 17 de ago. de 2015 a la(s) 1

Dave Angel RIP

2015-08-18 Thread Steven D'Aprano
Folks, Many of us will remember the long-time list regular Dave Angel. Dave was active on this list for many years, a keen participant in many discussions, and very helpful to Python users of all levels of expertise. Unfortunately, I am saddened to say that Dave passed away on May 25th, and the f

Re: memory control in Python

2015-08-18 Thread Oscar Benjamin
On 15 August 2015 at 00:41, Ping Liu wrote: > Dear All, Hi Ping Liu, > I am working on an optimization problem, where we are trying to minimize > some indicators like energy usage, energy cost, CO2 emission. In this > problem, we have a bunch of energy conversion technologies for electricity > a

Re: memory control in Python

2015-08-18 Thread Laura Creighton
In a message of Tue, 18 Aug 2015 01:56:16 -0700, Rustom Mody writes: >[How she (her mail client) manages to befuddle googlegroups thusly is >quite a mystery... >] For me as well, as all I am doing is just replying to the mail ... And I haven't changed my mail client at all in years and years ...

Re: memory control in Python

2015-08-18 Thread Rustom Mody
On Tuesday, August 18, 2015 at 3:40:11 AM UTC+5:30, Ping Liu wrote: > Hi, Dieter, > > If I move from Python to Jython or IronPython, do I need to retool whatever I > have done? If so, that may take quite a long time. This may make the > reimplementation impossible. Hi Ping There is a message f