Re: Operator Precedence/Boolean Logic

2016-06-24 Thread Jussi Piitulainen
Lawrence D’Oliveiro writes: > On Thursday, June 23, 2016 at 9:57:35 PM UTC+12, Marko Rauhamaa wrote: >> Lawrence D’Oliveiro: >> >>> On Thursday, June 23, 2016 at 9:11:05 PM UTC+12, Marko Rauhamaa wrote: The __len__ method is not guaranteed to execute in O(1). >>> >>> So what is? >> >> The _

Re: Operator Precedence/Boolean Logic

2016-06-24 Thread Lawrence D’Oliveiro
On Thursday, June 23, 2016 at 9:57:35 PM UTC+12, Marko Rauhamaa wrote: > Lawrence D’Oliveiro: > >> On Thursday, June 23, 2016 at 9:11:05 PM UTC+12, Marko Rauhamaa wrote: >>> The __len__ method is not guaranteed to execute in O(1). >> >> So what is? > > The __bool__ method is the appropriate place

Re: how to python to use virtual memory?

2016-06-24 Thread Michael Torrie
On 06/24/2016 08:44 PM, Dennis Lee Bieber wrote: > I don't know how Linux handles swap disk -- Windows normally sets the > swap space to ~2X physical memory (for small RAM -- my 12GB system has a > 12GB swap and suggests 18GB). Linux typically uses a user-set swap partition. The old rule of

Re: Which one is the best XML-parser?

2016-06-24 Thread Ned Batchelder
On Friday, June 24, 2016 at 8:44:49 PM UTC-4, Sayth Renshaw wrote: > On Friday, 24 June 2016 07:03:18 UTC+10, David Shi wrote: > > Which one is the best XML-parser? > > Can any one tell me? > > Regards. > > David > > Most use lxml http://lxml.de/index.html > > Sayth Sayth, is everything OK? Why

Re: Which one is the best XML-parser?

2016-06-24 Thread lorenzo . gatti
On Thursday, June 23, 2016 at 11:03:18 PM UTC+2, David Shi wrote: > Which one is the best XML-parser? > Can any one tell me? > Regards. > David Lxml offers lxml.etree.iterparse (http://lxml.de/tutorial.html#event-driven-parsing), an important combination of the memory savings of incremental pars

Re: Which one is the best XML-parser?

2016-06-24 Thread Sayth Renshaw
On Friday, 24 June 2016 07:03:18 UTC+10, David Shi wrote: > Which one is the best XML-parser? > Can any one tell me? > Regards. > David Most use lxml http://lxml.de/index.html Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: Which one is the best XML-parser?

2016-06-24 Thread Sayth Renshaw
On Friday, 24 June 2016 07:03:18 UTC+10, David Shi wrote: > Which one is the best XML-parser? > Can any one tell me? > Regards. > David xml parser most use lxml http://lxml.de/index.html Sayth -- https://mail.python.org/mailman/listinfo/python-list

LXML cannot access elements of dict created

2016-06-24 Thread Sayth Renshaw
I have created several varitions of my parser however I am still having the same issue, ,my return is the whole file, not a key of the dict as i have attempted to access. Not really sure where I am going wrong with it. I have left previous implementations in however to show where I have come fr

lxml parsing whole file, unable to access elements

2016-06-24 Thread Sayth Renshaw
Hi I have created several versions of a parser for XML with lxml both objectify and lxml. They all work in that the parser returns the whole file however I cannot access elements or keys as I have tried to create a dict of the results to make it easier to put in an sql query later. However I k

how to python to use virtual memory?

2016-06-24 Thread meInvent bbird
after set resource hard and soft both out of real memory 70GB to 100GB and expecting the extra memory setting using virtual memory which is hard disk, the program still wrongly be killed itself after running in background side -- https://mail.python.org/mailman/listinfo/python-list

Re: Which one is the best XML-parser?

2016-06-24 Thread Sayth Renshaw
On Friday, 24 June 2016 07:03:18 UTC+10, David Shi wrote: > Which one is the best XML-parser? > Can any one tell me? > Regards. > David Most would use lxml sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: Which one is the best XML-parser?

2016-06-24 Thread Sayth Renshaw
On Friday, 24 June 2016 07:03:18 UTC+10, David Shi wrote: > Which one is the best XML-parser? > Can any one tell me? > Regards. > David Most use lxml Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: PyQt5: is the wrapper incomplete?

2016-06-24 Thread jladasky
On Thursday, June 16, 2016 at 12:16:21 AM UTC-7, Vincent Vande Vyvre wrote: > On Debian, this is a separate package python3-pyqt5.qtserialport, I > don't know for other Linux > > After install you can use: > > from PyQt5.QtSeriaPort import QSerialPort Thank you Vincent, that is exactly what I

program return killed after run a very long time

2016-06-24 Thread meInvent bbird
i suspect it use so much memory, however i have already assign 30GB memory in openstack cloud is there any command to allow python to use more memory? currently program return killed after run a very long time -- https://mail.python.org/mailman/listinfo/python-list

I seem to be creating a dict that I cannot access the keys of

2016-06-24 Thread Sayth Renshaw
Really getting a little lost here with lxml. I cannot seem to create a dict of results using xpath or other that I could easily get the results from, currently I am always returned a printed copy of the whole file regardless of what parsing options I do. Can I ask is there something obvious wro

Re: PyQt5: is the wrapper incomplete?

2016-06-24 Thread jladasky
On Thursday, June 16, 2016 at 12:16:21 AM UTC-7, Vincent Vande Vyvre wrote: > On Debian, this is a separate package python3-pyqt5.qtserialport Many thanks, Vincent, that was exactly what I needed! -- https://mail.python.org/mailman/listinfo/python-list

plotting of live data-python

2016-06-24 Thread rayprabhakarray
Hi All, I'm plotting a continuous analog reading using python's drawnow package. I want to implement a data cursor which follows the graph and shows me the coordinates without me clicking or hovering over the specific point. Basically since the plot is moving, it getting difficult to see the co

Re: not able to install mysqldb-python

2016-06-24 Thread Arshpreet Singh
On Thursday, 23 June 2016 23:18:27 UTC+5:30, Joaquin Alzola wrote: > >ImportError: No module named 'ConfigParser' > It is telling you the error > This email is confidential and may be subject to privilege. If you are not > the intended recipient, please do not copy or disclose its content bu

Re: Guys, can you please share me some sites where we can practice python programs for beginners and Intermediate.

2016-06-24 Thread Sayth Renshaw
On Tuesday, 21 June 2016 21:03:28 UTC+10, Pushpanth Gundepalli wrote: > Guys, can you please share me some sites where we can practice python > programs for beginners and Intermediate. Here are some good beginner projects https://knightlab.northwestern.edu/2014/06/05/five-mini-programming-proje

My Generator yields a dictionary. Return entire file not specified key, value

2016-06-24 Thread Sayth Renshaw
When I am running my file which takes a file off the command line reads it and creates an objecitifed xml instance and then parses for each attribute into a dictionary and then yields it. At this point I am tring to use it to obtain specific key value elements, however I keep being returned the

Which one is the best XML-parser?

2016-06-24 Thread Sayth Renshaw
Lxml -- https://mail.python.org/mailman/listinfo/python-list

Live analog plotting - python

2016-06-24 Thread Prabhakar Ray
Hi Guys, I'm reading a continuous analog value using python and plotting it using drawnow(). Since the plot is moving it's getting difficult to note down the coordinates of any specific point. I intend to implement a moving data cursor which can follow the graph and can give me real time coordi

RE: Question on compiling on linux

2016-06-24 Thread Joaquin Alzola
>That gives me many .so files but no python*.so* file :( Install the python-devel. This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt. -- https://mail.pytho

Re: Seen bug in argparse module

2016-06-24 Thread Peter Otten
Jagdish Choudhary wrote: > When argument provided from user which doesn't match to right option which > is mentioned in help , it runs without issue..let me provide an example > > https://docs.python.org/3.3/library/argparse.html > > import argparse > parser = argparse.ArgumentParser(description

Re: Question on compiling on linux

2016-06-24 Thread Zachary Ware
On Fri, Jun 24, 2016 at 2:28 PM, Steven Truppe wrote: > That gives me many .so files but no python*.so* file :( Where are you finding these many .so files? There should be libpython3.5m.so in the root of the source tree (alongside `python`). By the way, I'm not sure how you're accessing the lis

Re: Question on compiling on linux

2016-06-24 Thread Steven Truppe
That gives me many .so files but no python*.so* file :( Am 2016-06-24 um 20:35 schrieb Steven Truppe: So back to my first question now that you saw everything worked fine, but there is no python.so file, did i miss something when using ./configure ? Am 2016-06-24 um 20:23 schrieb Chris Angel

Re: Question on compiling on linux

2016-06-24 Thread Zachary Ware
On Fri, Jun 24, 2016 at 1:35 PM, Steven Truppe wrote: > So back to my first question now that you saw everything worked fine, but > there is no python.so file, did i miss something when using ./configure ? Try `./configure --enable-shared`. -- Zach -- https://mail.python.org/mailman/listinfo/p

Seen bug in argparse module

2016-06-24 Thread Jagdish Choudhary
Hi All, When argument provided from user which doesn't match to right option which is mentioned in help , it runs without issue..let me provide an example https://docs.python.org/3.3/library/argparse.html import argparse parser = argparse.ArgumentParser(description='Process some integers.')pars

Re: Question on compiling on linux

2016-06-24 Thread Steven Truppe
So back to my first question now that you saw everything worked fine, but there is no python.so file, did i miss something when using ./configure ? Am 2016-06-24 um 20:23 schrieb Chris Angelico: On Sat, Jun 25, 2016 at 4:19 AM, Steven Truppe wrote: But that's not a library file, it's the in

Re: Question on compiling on linux

2016-06-24 Thread Chris Angelico
On Sat, Jun 25, 2016 at 4:19 AM, Steven Truppe wrote: > But that's not a library file, it's the interpreter, i need the library to > extend and embend python into my own application ... Bouncing back to the list (please keep it there). The reason I mentioned ./python is that, if it isn't there,

PyDev 5.1.2 Released

2016-06-24 Thread Fabio Zadrozny
Release Highlights: --- * **Important** PyDev now requires Java 8 and Eclipse 4.5 onwards. * PyDev 4.5.5 is the last release supporting Java 7 and Eclipse 3.8. * See: http://www.pydev.org/update_sites/index.html for the update site of older versions of PyDev. * See: th

Re: Question on compiling on linux

2016-06-24 Thread Chris Angelico
On Sat, Jun 25, 2016 at 1:00 AM, Steven Truppe wrote: > i want to write an application that does extend and embed Python. I > downloaded the sources for 3.5.1 and used ./confiugure to build. > > In the old times i got a file called python.so somewhere but now i get many > .so files and how can

Re: Which one is the best XML-parser?

2016-06-24 Thread Peter Otten
Marko Rauhamaa wrote: > Random832 : >> You know what would be really nice? A "semi-incremental" parser that >> can e.g. yield (whether through an event or through the iterator >> protocol) a fully formed element (preferably one that can be queried >> with xpath) at a time for each record of a docu

Question on compiling on linux

2016-06-24 Thread Steven Truppe
Hi all, i want to write an application that does extend and embed Python. I downloaded the sources for 3.5.1 and used ./confiugure to build. In the old times i got a file called python.so somewhere but now i get many .so files and how can i change between debug and release build (32 and

Re: Which one is the best JSON parser?

2016-06-24 Thread Grant Edwards
On 2016-06-23, MRAB wrote: > On 2016-06-23 21:58, David Shi via Python-list wrote: >> Can any one tell me? >> Regards. >> David >> > There's one in the standard library. Which has always worked fine for me... -- Grant Edwards grant.b.edwardsYow! I want another

Re: Which one is the best XML-parser?

2016-06-24 Thread Marko Rauhamaa
Random832 : > You know what would be really nice? A "semi-incremental" parser that > can e.g. yield (whether through an event or through the iterator > protocol) a fully formed element (preferably one that can be queried > with xpath) at a time for each record of a document representing a > list of

Re: Which one is the best XML-parser?

2016-06-24 Thread Random832
On Fri, Jun 24, 2016, at 02:39, dieter wrote: > You want an incremental parser if the XML documents are so huge that > you must process them incrementally rather than have a data structure > representing the whole document (in memory). Incremental parsers > for XML are usually called "SAX" parsers.

Re: Can math.atan2 return INF?

2016-06-24 Thread Marko Rauhamaa
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange): > Marko Rauhamaa wrote: > >> Note that the "valid point of view for external observers" is the >> only valid scientific point of view. > > For a scientific point of view, right. But tell this to the one that > will be close to a blackhole

Re: Break and Continue: While Loops

2016-06-24 Thread Pierre-Alain Dorange
BartC wrote: > But even with ordinary conditionals, False is False, but [False] is > True. And [] is False, while [[]] is True. A class instance is always > True, even when empty. And then "False" is True as well! "Empty" is not "Nothing". To be empty, something must exist first. -- Pierre-Al

Re: Can math.atan2 return INF?

2016-06-24 Thread Pierre-Alain Dorange
Marko Rauhamaa wrote: > Note that the "valid point of view for external observers" is the only > valid scientific point of view. For a scientific point of view, right. But tell this to the one that will be close to a blackhole ;-) -- Pierre-Alain Dorange Moof