python-2.4
Pythonic way to emulate itertools.product in python 2.4
I have a python 3 script that uses itertools.product, but I need to be able to run it on a machine that only has python 2.4 installed. Since itertools.product is new in python 2.6, I no longer have ac[详细]
2023-04-12 03:12 分类:问答Future Development in Python 2.4
I\'m starting a new python project at work that is targeted primarily at RHEL5 machines that may be upgraded to RHEL6 in couple years.Given that python 2.4 is standard on RHEL5 and the system admins w[详细]
2023-04-11 08:11 分类:问答Is this bad practice?
In this piece of code, if I match the given pattern on the line, I replace the line by a self-built string. Is this actually good practice? It looks a little bit like reusing the variable line for out[详细]
2023-03-27 02:23 分类:问答Python get start and end date of the week
How to get the s开发者_StackOverflow中文版tart date and end date of a week, and also if the following dates below comes under a particular range of start and end dates of the week how to show only tho[详细]
2023-03-22 02:57 分类:问答Efficient writing to a Compact Flash in python
I\'m writing a gui to do perform a glorified \'dd\'. I could just subprocess to \'dd\' but I thought I might as well use python\'s open()/read()/write() if I can as it\'ll let me display progress muc[详细]
2023-03-18 04:43 分类:问答conditional command-line arguments [ possibly using getopt()?? ]
This is related to my previous post here. Running the actual script, I outpu开发者_运维问答t the result like this:[详细]
2023-03-06 08:53 分类:问答calculating the next day from a "YYYYMMDD" formatted string
How can I calculate the next day from a string like 20110531 in the same YYYYMMDD format? In this particular case, I li开发者_开发技巧ke to have 20110601 as the result. Calculating \"tomorrow\" or nex[详细]
2023-03-04 21:53 分类:问答Valgrind on Python2.4 : Huge amount of memory 'possibly lost'
I have written some code which works without errors. The code uses MySQLdb for (frequent) database access and uses 4 different databases. Also a couple of log files are generated and logging module is[详细]
2023-02-26 15:46 分类:问答Find minimum element in a dictionary of dictionaries
I need to find what element of apple has the minimum size. Tnx for all answers. But there is one problem: I use Python 2.4.2 (I can\'t change it) and function min haven\'t key arg. 开发者_如何学Pytho[详细]
2023-02-12 11:04 分类:问答Getting the maximum value from dictionary
I\'m facing problem with this. I have 10,000 rows in my dictionary and this is one of the rows Example: A (8) C (4) G (48419) T (2) when printed out[详细]
2023-02-08 19:02 分类:问答