Re: Pyfora, a place for python

2009-11-07 Thread Saketh
this offends or irritates anyone, please accept my humble apologies. I understand that forums can be degenerate and uncivil, but my hope is that with Pyfora, beginners will have a place to freely ask questions in a genial environment. A large part of my computer upbringing was on forums, and I want

Re: efficiently checking for string.maketrans conflicts?

2009-04-22 Thread Saketh
On Apr 20, 11:35 pm, Michael Spencer wrote: > Saketh wrote: > > Hi everyone: > > > I'm using "translation" in the sense ofstring.maketranshere. > > > I am trying to efficiently compare if two string translations > > "conflict" -- that is,

efficiently checking for string.maketrans conflicts?

2009-04-20 Thread Saketh
is conflict-checking is the bottleneck of my program, and the obvious way to implement it -- looping through the translations and explicitly checking for the above conditions -- is much slower than I'd like. Is there a more efficient, Pythonic way of checking if two translations conflict? Sincerely, Saketh -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting two corresponding lists?

2009-04-20 Thread Saketh
On Apr 20, 12:10 pm, Esmail wrote: > Hello all, > > I wonder if someone could help me with sorting two corresponding lists. > > For instance the first list contains some items, and the second list > contains their value (higher is better) > > items = [apple, car, town, phone] > values = [5, 2, 7,

distutils setup.py

2006-08-07 Thread Saketh
ly copied to the target directory. However, when I use it for sdist, none of the data_files are copied. If this were a directory problem, then setup.py would have failed earlier when I specified Application.py in the "scripts" argument. How can I get the data_files copied properly withou

distutils is not found

2006-08-03 Thread Saketh
Under openSUSE 10.0, I installed Python 2.4.1. I executed a setup.py which imports distutils, but I received an error which gave an "ImportError: module not found" for distutils. I thought that distutils is part of the standard library under Python, but is there something that I am missing? Can I (

Re: how to get the length of a number

2006-06-11 Thread Saketh
Stan Cook wrote: > Can anyone tell me how to get the length of a number. I > know len(string) will get the length of a string, but it > doesn't like len(int). I seem to remember something like %s > string. I tried to set a variable = to %s int, but that > doesn't work. Is there a function I've

wxPython: Keyboard events and TreeCtrl

2006-06-11 Thread Saketh
Hello, everyone. I am a writing an application that I want to make a stripped-down framework of Leo for Cornell note-taking. I have one TreeCtrl, a menu, and a status bar. There are two classes currently - the Application class and the Frame class. The Frame class contains all of the event handl