First  |  Prev |  Next  |  Last
Pages: 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
Anyone happen to have optimization hints for this loop?
I have some code that takes data from an Access database and processes it into text files for another application. At the moment, I am using a number of loops that are pretty slow. I am not a hugely experienced python user so I would like to know if I am doing anything particularly wrong or that can be hugely impro... 15 Jul 2008 10:14
Opening Unicode files
Noorhan Abbas wrote: Hello, I wonder if you don't mind helping me out in this problem. I have been developing a tool in python that opens some unicode files, reading them and processing the data. It is working fine. When I started to write a cgi module that does the same thing for google appengine... 9 Jul 2008 12:40
You, spare time and SyntaxError
def ine(you): yourself = "what?" go = list("something"), list("anything") be = "something" please = be, yourself yourself = "great" for good in yourself: if you is good: good in you please.add(more, good) else: def inition(lacks, clarity): ... 10 Jul 2008 16:31
FOSS projects exhibiting clean/good OOP?
I'm wondering whether anyone can offer suggestions on FOSS projects/ apps which exhibit solid OO principles, clean code, good inline documentation, and sound design principles? I'm devoting some time to reviewing other people's code to advance my skills. Its good to review bad code (of which I have more than enou... 15 Jul 2008 06:08
Allow tab completion when inputing filepath?
Hi all, I've been looking around on the web for a way to do this, but so far have not come across anything for this particular application. I have found some ways to enable tab completion for program-related commands, but not for system filepaths. This would be nice to have when prompting the user to enter a fil... 10 Jul 2008 08:14
Python / Windows process control
Does anybody know of a python module which can do process management on Windows? The sort of thing that we might usually do with taskmgr.exe or process explorer? For example: * Kill a process by ID * Find out which process ID is locking an object in the filesystem * Find out all the IDs of a particular .exe f... 10 Jul 2008 12:22
Doubts about how implementing asynchronous timeouts through a heap
Hi, I'm trying to implement an asynchronous scheduler for asyncore to call functions at a later time without blocking the main loop. The logic behind it consists in: - adding the scheduled functions into a heapified list - calling a "scheduler" function at every loop which checks the scheduled functions due to ... 5 Aug 2008 13:12
Impossible to change methods with special names of instances of new-style classes?
> My question is: did something about the way the special method names are implemented change for new-style classes? class old: pass class new(object): pass testone = old() testone.__call__ = lambda : 33 testone() 33 testtwo = new() testtwo.__call__ = lambda : 33 ... 9 Jul 2008 14:44
mock with inheritance
Hello, i would like use a mock object for testing one class and its methods: Here my class : class Foo(Component): def __init__(self): self._db = self.env.get_db() def foomethod(self, arg): ..... But i don't know how to mock the class Component. Note that Component provide the attr... 9 Jul 2008 07:32
start reading from certain line
I am a starter in python and would like to write a program that reads lines starting with a line that contains a certain word. For example the program starts reading the program when a line is encountered that contains 'item 1' The weather is nice Item 1 We will go to the seaside .... Only the lines comin... 10 Jul 2008 12:22
First  |  Prev |  Next  |  Last
Pages: 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346