Re: Python-list Digest, Vol 88, Issue 69
Sent from my LG phone [email protected] wrote: >Send Python-list mailing list submissions to > [email protected] > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list >or, via email, send a message with subject or body 'help' to > [email protected] > >You can reach the person managing the list at > [email protected] > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Python-list digest..." > >Today's Topics: > > 1. Re: Python use growing fast (Alice Bevan?McGregor) > 2. Re: order of importing modules (Chris Rebert) > 3. Re: How to Buffer Serialized Objects to Disk (MRAB) > 4. Re: How to Buffer Serialized Objects to Disk (Chris Rebert) > 5. Re: How to Buffer Serialized Objects to Disk (Peter Otten) > 6. Re: Best way to automatically copy out attachments from an > email (Chris Rebert) > 7. Re: Parsing string for " " (Aahz) > 8. Re: Nested structures question (Tim Harig) > 9. Re: How to Buffer Serialized Objects to Disk (Scott McCarty) > >On 2011-01-10 19:49:47 -0800, Roy Smith said: > >> One of the surprising (to me, anyway) uses of JavaScript is as the >> scripting language for MongoDB (http://www.mongodb.org/). > >I just wish they'd drop spidermonkey and go with V8 or another, faster >and more modern engine. :( > > - Alice. > > > > >> Dan Stromberg wrote: >>> On Tue, Jan 11, 2011 at 4:30 PM, Catherine Moroney >>> wrote: In what order does python import modules on a Linux system? I have a package that is both installed in /usr/lib64/python2.5/site-packages, and a newer version of the same module in a working directory. I want to import the version from the working directory, but when I print module.__file__ in the interpreter after importing the module, I get the version that's in site-packages. I've played with the PYTHONPATH environmental variable by setting it to just the path of the working directory, but when I import the module I still pick up the version in site-packages. /usr/lib64 is in my PATH variable, but doesn't appear anywhere else. I don't want to remove /usr/lib64 from my PATH because that will break a lot of stuff. Can I force python to import from my PYTHONPATH first, before looking in the system directory? >>> Please import sys and inspect sys.path; this defines the search path >>> for imports. >>> >>> By looking at sys.path, you can see where in the search order your >>> $PYTHONPATH is going. >>> >On Wed, Jan 12, 2011 at 11:07 AM, Catherine Moroney > wrote: >> I've looked at my sys.path variable and I see that it has >> a whole bunch of site-package directories, followed by the >> contents of my $PYTHONPATH variable, followed by a list of >> misc site-package variables (see below). > >> But, I'm curious as to where the first bunch of 'site-package' >> entries come from. The >> /usr/lib64/python2.5/site-packages/pyhdfeos-1.0_r57_58-py2.5-linux-x86_64.egg >> is not present in any of my environmental variables yet it shows up >> as one of the first entries in sys.path. > >You probably have a .pth file somewhere that adds it (since it's an >egg, probably site-packages/easy-install.pth). >See http://docs.python.org/install/index.html#modifying-python-s-search-path > >Cheers, >Chris >-- >http://blog.rebertia.com > > >On 12/01/2011 21:05, Scott McCarty wrote: >> Sorry to ask this question. I have search the list archives and googled, >> but I don't even know what words to find what I am looking for, I am >> just looking for a little kick in the right direction. >> >> I have a Python based log analysis program called petit >> (http://crunchtools.com/petit). I am trying to modify it to manage the >> main object types to and from disk. >> >> Essentially, I have one object which is a list of a bunch of "Entry" >> objects. The Entry objects have date, time, date, etc fields which I use >> for analysis techniques. At the very beginning I build up the list of >> objects then would like to start pickling it while building to save >> memory. I want to be able to process more entries than I have memory. >> With a strait list it looks like I could build from xreadlines(), but >> once you turn it into a more complex object, I don't quick know where to go. >> >> I understand how to pickle the entire data structure, but I need >> something that will manage the memory/disk allocation? Any thoughts? >> >To me it sounds like you need to use a database. > > >On Wed, Jan 12, 2011 at 1:05 PM, Scott McCarty wrote: >> Sorry to ask this question. I have search the list archives and googled, but >> I don't even know what words to find what I am looking for, I am just >> looking for a little kick in the right direction. >> I have a Python based log analysis program called petit >> (http://crunchtools.com/petit). I
Re: Python-list Digest, Vol 88, Issue 69
Sent from my LG phone [email protected] wrote: >Send Python-list mailing list submissions to > [email protected] > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list >or, via email, send a message with subject or body 'help' to > [email protected] > >You can reach the person managing the list at > [email protected] > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Python-list digest..." > >Today's Topics: > > 1. Re: Python use growing fast (Alice Bevan?McGregor) > 2. Re: order of importing modules (Chris Rebert) > 3. Re: How to Buffer Serialized Objects to Disk (MRAB) > 4. Re: How to Buffer Serialized Objects to Disk (Chris Rebert) > 5. Re: How to Buffer Serialized Objects to Disk (Peter Otten) > 6. Re: Best way to automatically copy out attachments from an > email (Chris Rebert) > 7. Re: Parsing string for " " (Aahz) > 8. Re: Nested structures question (Tim Harig) > 9. Re: How to Buffer Serialized Objects to Disk (Scott McCarty) > >On 2011-01-10 19:49:47 -0800, Roy Smith said: > >> One of the surprising (to me, anyway) uses of JavaScript is as the >> scripting language for MongoDB (http://www.mongodb.org/). > >I just wish they'd drop spidermonkey and go with V8 or another, faster >and more modern engine. :( > > - Alice. > > > > >> Dan Stromberg wrote: >>> On Tue, Jan 11, 2011 at 4:30 PM, Catherine Moroney >>> wrote: In what order does python import modules on a Linux system? I have a package that is both installed in /usr/lib64/python2.5/site-packages, and a newer version of the same module in a working directory. I want to import the version from the working directory, but when I print module.__file__ in the interpreter after importing the module, I get the version that's in site-packages. I've played with the PYTHONPATH environmental variable by setting it to just the path of the working directory, but when I import the module I still pick up the version in site-packages. /usr/lib64 is in my PATH variable, but doesn't appear anywhere else. I don't want to remove /usr/lib64 from my PATH because that will break a lot of stuff. Can I force python to import from my PYTHONPATH first, before looking in the system directory? >>> Please import sys and inspect sys.path; this defines the search path >>> for imports. >>> >>> By looking at sys.path, you can see where in the search order your >>> $PYTHONPATH is going. >>> >On Wed, Jan 12, 2011 at 11:07 AM, Catherine Moroney > wrote: >> I've looked at my sys.path variable and I see that it has >> a whole bunch of site-package directories, followed by the >> contents of my $PYTHONPATH variable, followed by a list of >> misc site-package variables (see below). > >> But, I'm curious as to where the first bunch of 'site-package' >> entries come from. The >> /usr/lib64/python2.5/site-packages/pyhdfeos-1.0_r57_58-py2.5-linux-x86_64.egg >> is not present in any of my environmental variables yet it shows up >> as one of the first entries in sys.path. > >You probably have a .pth file somewhere that adds it (since it's an >egg, probably site-packages/easy-install.pth). >See http://docs.python.org/install/index.html#modifying-python-s-search-path > >Cheers, >Chris >-- >http://blog.rebertia.com > > >On 12/01/2011 21:05, Scott McCarty wrote: >> Sorry to ask this question. I have search the list archives and googled, >> but I don't even know what words to find what I am looking for, I am >> just looking for a little kick in the right direction. >> >> I have a Python based log analysis program called petit >> (http://crunchtools.com/petit). I am trying to modify it to manage the >> main object types to and from disk. >> >> Essentially, I have one object which is a list of a bunch of "Entry" >> objects. The Entry objects have date, time, date, etc fields which I use >> for analysis techniques. At the very beginning I build up the list of >> objects then would like to start pickling it while building to save >> memory. I want to be able to process more entries than I have memory. >> With a strait list it looks like I could build from xreadlines(), but >> once you turn it into a more complex object, I don't quick know where to go. >> >> I understand how to pickle the entire data structure, but I need >> something that will manage the memory/disk allocation? Any thoughts? >> >To me it sounds like you need to use a database. > > >On Wed, Jan 12, 2011 at 1:05 PM, Scott McCarty wrote: >> Sorry to ask this question. I have search the list archives and googled, but >> I don't even know what words to find what I am looking for, I am just >> looking for a little kick in the right direction. >> I have a Python based log analysis program called petit >> (http://crunchtools.com/petit). I
Re: Python-list Digest, Vol 88, Issue 67
Sent from my LG phone [email protected] wrote: >Send Python-list mailing list submissions to > [email protected] > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list >or, via email, send a message with subject or body 'help' to > [email protected] > >You can reach the person managing the list at > [email protected] > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Python-list digest..." > >Today's Topics: > > 1. Re: Python use growing fast (Colin J. Williams) > 2. Career path - where next? (Alan Harris-Reid) > 3. Re: Career path - where next? (Terry Reedy) > 4. Re: Python use growing fast (Terry Reedy) > 5. Re: Ideas for a module to process command line arguments > (Alice Bevan?McGregor) > 6. Re: Python use growing fast (Krzysztof Bieniasz) > 7. Re: Career path - where next? (Jon Clements) > 8. Re: Career path - where next? (Philip Semanchuk) > 9. Best way to automatically copy out attachments from an email > (Matty Sarro) > 10. How to populate all possible hierarchical clusterings from a > set of elements? (justin) > >On 10-Jan-11 16:02 PM, MRAB wrote: >> On 10/01/2011 20:29, Dan Stromberg wrote: >>> I invite folks to check out Tiobe's Language Popularity Rankings: >>> >>> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html >>> >>> The gist is: Python grew faster than any other programming language >>> over the last year, according to this (slightly arbitrary, but better >>> than no indicator) ranking. >>> >>> ...despite our wikipedia page whose first paragraph almost seems like >>> it was written with the intention of scaring off new converts, with >>> its "unusual" comment: >>> >>> http://en.wikipedia.org/wiki/Python_%28programming_language%29 >>> >>> (Like it or not, people do frequently confuse the descriptive for the >>> normative) >> >> It shows an example of Python code, which happens to have 2 syntax >> errors! > >Why not correct the Wikipedia entry? > >Colin W. > > > >Hi there, I wonder if any Python folk out there can help me. > >For many years I was a contractor developing desktop and web >applications using Visual Foxpro as my main language, with Foxpro, >SQL-server and Oracle as back-end databases. Unfortunately Foxpro was >killed-off by Microsoft, hence my work dried-up and my last 'big' >contract ended about a year ago. Since then I have taken time off >programming doing house-renovation, and in the last 6 months I have been >updating my programming skills by learning Python (3) with SQLite, >JavaScript, HTML and CSS to a level where I can create and deploy >data-based web-sites. > >My situation now is that I am reasonably comfortable with the above >languages and am now in a position where I wish to return to employment >using my new and/or existing skills (contract/permanent, full/part-time >or teleworking). However, I have yet to find any UK vacancy which will >accept a relative 'beginner' - they all require at least 2-3 years >Python in a commercial environment. It's a catch-22 situation - it's >hard to get a job without experience, but you need a job to get >experience in the 1st place! > >I would even consider doing small projects for nothing so that I can >'get my foot in the door' (although I hope to be wise-enough to know >when I am being taken advantage of!). I am also mailing CVs to agencies >I think may be interested. > >If anyone out has ideas as to how to proceed towards achieving my goal, >I would be grateful for any advice. > >Regards, >Alan Harris-Reid > > > >On 1/12/2011 11:37 AM, Alan Harris-Reid wrote: > >... >> updating my programming skills by learning Python (3) with SQLite, >> JavaScript, HTML and CSS to a level where I can create and deploy >> data-based web-sites. >... >> I would even consider doing small projects for nothing so that I can >> 'get my foot in the door' (although I hope to be wise-enough to know > >I believe both Roundup/Python tracker and PyPI (Python package index) >are based on sqlite and have small projects available/needed. I cannot >help you otherwise. Good luck. > >-- >Terry Jan Reedy > > > >On 1/12/2011 9:51 AM, Colin J. Williams wrote: > >>> It shows an example of Python code, which happens to have 2 syntax >>> errors! >> >> Why not correct the Wikipedia entry? > >As I reported early, the errors, if any, are in .png and .svg images of >text, which would have to be replaced, not corrected. Would be good >since the imaged snippet is a haphazard except from a much larger file >and inane out of context. > >-- >Terry Jan Reedy > > > >On 2011-01-11 21:41:24 -0800, Michele Simionato said: > >> Originally plac too was able to recognize flags automatically by >> looking at the default value (if the default value is a boolean then >> the option is a flag); however I removed that functionality becau
