First  |  Prev |  Next  |  Last
Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Sequential Object Store
Hi All, I need to store a large number of large objects to file and then access them sequentially. I am talking about a few thousands of objects and each with size of a few hundred kilobytes, and total file size a few gigabytes. I tried shelve, but it is not good at sequentially accessing the data. In essence, ... 9 Aug 2010 15:39
How to match patterns like XX YY XX YY? (regex)
Hi, Suppose that I have strings like the following test(a b)a b test(xy uv)xy uv .... I want to change them to test(a)a test(b)b test(xy)xy test(uv)uv .... The problem is that I don't know how to capture pattern that repeat itself (like 'a' and 'xy' in the example). I could use 'test\((\w+) (\w+)... 7 Aug 2010 14:44
Is there any way to minimize str()/unicode() objects memory usage [Python 2.6.4] ?
On Fri, 06 Aug 2010 18:39:27 -0700, dmtr wrote: Steven, thank you for answering. See my comments inline. Perhaps I should have formulated my question a bit differently: Are there any *compact* high performance containers for unicode()/str() objects in Python? By *compact* I don't mean compression. Just op... 7 Aug 2010 11:28
iterators and continuing after a StopIteration
Hi all, I have a list that I'm iterating over, and during the iteration items are appended. Moreover, it is iterated over in two nested loops. If the inner loop comes to the end, I want the outer loop to append an item. Is there a way to do this? Because once an iterator has raised a StopIteration, it ... 7 Aug 2010 14:44
os.unlink on Windows
On 08/07/2010 01:10 PM, Shambhu Sharma wrote: Hi, I am new to Python. I was trying to use os.unlink function in windows. But i am getting error: OSError: [Errno 2] No such file or directory: 'C:\\SHAMBHU\\tmp\\text_delete.txt' Input file to os.unlink is: 'C:\SHAMBHU\tmp\text_delete.txt... 9 Aug 2010 04:40
Python library for Sequence Matching/Comparison
Hi, Is there any sequence matching library in (apart from difflib) to compare sequences of natural text? thanks ... 7 Aug 2010 06:06
Is there any way to minimize str()/unicode() objects memory usage ?[Python 2.6.4] ?
dmtr <dchichkov(a)gmail.com> wrote: What I'm really looking for is a dict() that maps short unicode strings into tuples with integers. But just having a *compact* list container for unicode strings would help a lot (because I could add a __dict__ and go from it). At this point, I'd suggest to use o... 7 Aug 2010 10:23
sched() function questions
I am currently using threading.timer to execute an event in my big chunk of code. This is causing a problem with sqlite, so I am trying to figure out the sched function import sched import time def timerfunc(): print "hello", time.time() return(time.time()) def delay(period): time.sleep(period... 7 Aug 2010 08:14
Python "why" questions
On Fri, 2010-08-06 at 22:05 -0500, Default User wrote: From "the emperor's new clothes" department: 1) Why do Python lists start with element [0], instead of element [1]? "Common sense" would seem to suggest that lists should start with [1]. "Common sense" is wrong. There are many compelling ad... 13 Aug 2010 20:08
Is there any way to minimize str()/unicode() objects memory usage[Python 2.6.4] ?
On 08/07/2010 02:45 AM, dmtr wrote: I'm running into some performance / memory bottlenecks on large lists. Is there any easy way to minimize/optimize memory usage? Simple str() and unicode objects() [Python 2.6.4/Linux/x86]: sys.getsizeof('') 24 bytes sys.getsizeof('0') 25 bytes s... 7 Aug 2010 02:54
First  |  Prev |  Next  |  Last
Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22