Alex Hall wrote:
I'm sorry, I misspoke (well, mistyped anyway). I have a couple
class-level variables, but most of them are set in the __init__ so
that every instance gets a fresh copy of them. Thatnks for the
responses.
Ah I see, or at least I think I see. Possibly we're talking at
cross-pur
On 04/11/11 01:42, Steven D'Aprano wrote:
Alan Gauld wrote:
If you're worried about the screen space and/or keystrokes, you can do
this:
if direction.upper() in tuple('NSEW'): ...
It's not so much the keystrokes that I don't like but it's the fact that
I invariably miss out a quote or a co
Not sure if that is what you are after since you are calling
re.split() using items when Peter was using re.split() on a single
item within items
so instead of this
parts = re.split(r"(\d+)", str(items))
try specifying just one item, like this
parts = re.split(r"(\d+)", items[0])
On Fri, Nov 4, 2
On 11/03/2011 10:39 PM, lina wrote:
On Wed, Nov 2, 2011 at 12:14 AM, Peter Otten<__pete...@web.de> wrote:
lina wrote:
items
[('83ILE', 1), ('84ALA', 2), ('8SER', 0), ('9GLY', 0)]
parts = re.split(r"(\d+)",items)
Traceback (most recent call last):
File "", line 1, in
parts = re.s
On Fri, Nov 4, 2011 at 10:39 AM, lina wrote:
> On Wed, Nov 2, 2011 at 12:14 AM, Peter Otten <__pete...@web.de> wrote:
>> lina wrote:
>>
sorted(new_dictionary.items())
>>>
>>> Thanks, it works, but there is still a minor question,
>>>
>>> can I sort based on the general numerical value?
>>>
>>
On Wed, Nov 2, 2011 at 12:14 AM, Peter Otten <__pete...@web.de> wrote:
> lina wrote:
>
>>> sorted(new_dictionary.items())
>>
>> Thanks, it works, but there is still a minor question,
>>
>> can I sort based on the general numerical value?
>>
>> namely not:
>> :
>> :
>> 83ILE 1
>> 84ALA 2
>> 8SER 0
>
Alan Gauld wrote:
Use the list form, even though it does involve a few more keystrokes and
a lot more screen space. The extra typing to avoid the problems are not
worth it! :-)
If you're worried about the screen space and/or keystrokes, you can do this:
if direction.upper() in tuple('NSEW'):
Mike Nickey wrote:
I'm currently taking a class on Android Development.
The instructor says that the code needed has to be done through Java.
Isn't there any way to create these same apps with Python?
This is not really the place to be asking this sort of question. This
list is focused on lear
On 03/11/11 13:01, Chris Hare wrote:
Thanks for the advice. When I do that, I get this error
Exception in Tkinter callback
Traceback (most recent call last):
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
line 1410, in __call__
return
On 11/03/2011 12:37 PM, lina wrote:
I have another question, regarding the generator,
def translate_process(dictionary,tobetranslatedfile):
results=[]
with open(tobetranslatedfile,"r") as f:
results=(dictionary[line.split()[2]] for line in f)
print(list(results))
On 11/03/2011 12:30 PM, lina wrote:
Hi,
['1AB','57GL', '76LE']
How can I extract 1, 57 , 76 out?
except the one I tried as:
for i in range(len(a)):
print(a[i][:-2])
1
57
76
are there some way to tell the difference between the [0-9] and [A-Z],
In the last thread, somebod
I have another question, regarding the generator,
def translate_process(dictionary,tobetranslatedfile):
results=[]
with open(tobetranslatedfile,"r") as f:
results=(dictionary[line.split()[2]] for line in f)
print(list(results))
print(len(list(results)))
Here the
Hi,
['1AB','57GL', '76LE']
How can I extract 1, 57 , 76 out?
except the one I tried as:
>>> for i in range(len(a)):
print(a[i][:-2])
1
57
76
are there some way to tell the difference between the [0-9] and [A-Z],
Thanks for the help (you will give and you have given).
Best r
That helps Wayne - and was what I was referring to when I posted that I thought
I had figured it out. Thanks for your help.
Chris Hare
ch...@labr.net
http://www.labr.net
On Nov 3, 2011, at 10:08 AM, Wayne Werner wrote:
> On Thu, Nov 3, 2011 at 9:41 AM, Chris Hare wrote:
> Thanks Peter. Actu
On Thu, Nov 3, 2011 at 9:41 AM, Chris Hare wrote:
> Thanks Peter. Actually, I have read a bunch of stuff and looked at
> example code. The problem in this case is I am using a defined method -
> focus_set(), which is part of Tkinter and isn't part of my code. since I
> am using it in the manne
Thanks Peter. Actually, I have read a bunch of stuff and looked at example
code. The problem in this case is I am using a defined method - focus_set(),
which is part of Tkinter and isn't part of my code. since I am using it in the
manner in which I have seen other examples, I am confused abou
Chris Hare wrote:
> Thanks for the advice. When I do that, I get this error
>
> Exception in Tkinter callback
> Traceback (most recent call last):
> File
>
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-
tk/Tkinter.py",
> line 1410, in __call__
> return se
(You mistakenly top-posted, so now in order to keep this next message in
order, I have to delete the out of order history)
On 11/03/2011 09:01 AM, Chris Hare wrote:
Thanks for the advice. When I do that, I get this error
Exception in Tkinter callback
Traceback (most recent call last):
File
Thanks for the advice. When I do that, I get this error
Exception in Tkinter callback
Traceback (most recent call last):
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
line 1410, in __call__
return self.func(*args)
TypeError: focus_set() t
Dang it - sure is a typo!
Thanks!
Chris Hare
ch...@labr.net
http://www.labr.net
On Nov 3, 2011, at 12:58 AM, Dipo Elegbede wrote:
> There is nothing called franeButton it should be frameButton. I guess its a
> typo.
>
> On 3 Nov 2011 05:52, "Chris Hare" wrote:
>
>
> I have the foll
On 03/11/11 04:46, Chris Hare wrote:
I have a Listbox defined
self.list = Listbox(self.frame)
What I want to do is when the user either single clicks, double clicks, presses
tab or return, move the focus to the specified field
self.list.bind("", self.login_userid.focus_set()
On Thu, 3 Nov 2011, 06:12:58 CET, Mike Nickey wrote:
> I am hoping that there is a Python ADK that will allow creation of
> apps with Python but I haven't seen one and wanted to see what you know is
> out there.
Linux journal has an article on this [1]. I have no experience in this but it
lo
22 matches
Mail list logo