Class behaving like a static class

2009-01-27 Thread gu
Hi to all, i have a module (a single .py file, actually), with a class called HashedDir. when i import the file and instanciate 2 instances of that class, when i check the object's fields they're always the same, even if the two objects should be different. Eg: h1 = HashedDir('someValue')

Re: Line completion with custom commands

2009-01-09 Thread gu
Marco Mariani wrote: gu wrote: I see, but how does django-admin work, then? from bash: complete -W "doSomething doSomethingElse doSomethingDifferent" myProgram This worked like a charm, thank you so much. Is this available for bash only or any shell? -- http://mail.python.o

Re: Line completion with custom commands

2009-01-09 Thread gu
Steve Holden wrote: gu wrote: Hi, my Python program can be launched with a range of different options (or subcommands) like: $ myProgram doSomething $ myProgram doSomethingElse $ myProgram nowDoSomethingDifferent I want it to use auto-completion with so that if i type "myProgram d"

Line completion with custom commands

2009-01-09 Thread gu
Hi, my Python program can be launched with a range of different options (or subcommands) like: $ myProgram doSomething $ myProgram doSomethingElse $ myProgram nowDoSomethingDifferent I want it to use auto-completion with so that if i type "myProgram d" it returns "myProgram doSomething" and

unexpected behavior: did i create a pointer?

2007-09-07 Thread gu
hi to all! after two days debugging my code, i've come to the point that the problem was caused by an unexpected behaviour of python. or by lack of some information about the program, of course! i've stripped down the code to reproduce the problem: a = {} for x in range(10): for y in ran