On 7/16/2012 12:28 PM, tinn...@isbd.co.uk wrote:
> tinn...@isbd.co.uk wrote:
>> I am trying to use the PyQt4 calendar widget to perform some different
>> actions on specific dates. There are three events available:-
>>
>> selectionChanged()
>> activated(QDate)
>> clicked(QDate)
>>
>> O
Jabba Laci wrote:
> Hi,
>
> I have a simple PyQt application that creates a webkit instance to
> scrape AJAX web pages. It works well but I can't call it twice. I
> think the application is not closed correctly, that's why the 2nd call
> fails. Here is the code below. I also put it on pastebin:
> h
Jabba Laci wrote:
> Hi, Thanks for your reply. I forgot to mention that my first solution
> created a headless browser, i.e. it didn't create any GUI. I would
> like to keep it that way, thus I could scrape (AJAX-powered) webpages
> in batch mode without any user interaction.
No head, no problem.
On 2:59 PM, Devin Jeanpierre wrote:
> It is kind of funny that the docs don't ever explicitly say what a
> property is. http://docs.python.org/library/functions.html#property --
> Devin
Here's a writeup that does:
http://wiki.python.org/moin/AlternativeDescriptionOfProperty
-John
--
http://m
On 2:59 PM, noydb wrote:
> How do you format a number to print with commas?
I would readily admit that both the "locale" module and "format" method
are preferable to this regular expression, which certainly violates the
"readability counts" dictum:
r"(?<=\d)(?=(\d\d\d)+$)"
# python 2.6.6
imp
On 4/4/2012 7:32 PM, Chris Angelico wrote:
> Don't know if it's what's meant on that page by the += operator,
Yes, it is.
>> a=([1],)
>> a[0].append(2) # This is fine
[In the following, I use the term "name" rather loosely.]
The append() method attempts to modify the object whose name is "a[0]"
On 2:59 PM, Ian Kelly wrote:
> On Sat, Jun 4, 2011 at 12:09 PM, Chris Angelico wrote:
>> Python doesn't seem to have an inbuilt function to divide strings in
>> this way. At least, I can't find it (except the special case where n
>> is 1, which is simply 'list(string)'). Pike allows you to use the
Friedrich:
>> I would be much obliged if someone can give me some tips on how to
>> achieve a variably pad a number.
> :)
>
> ('%%0%dd' % (pads,)) % (n,)
>
> Probably be good to wrap it in a function. It looks kind of obscure as it
> is.
You might want to try "new style" string formatting [1]
On 2:59 PM, Lie Ryan wrote:
>> Can any of you guys explain me advantages and disadvantages of
>> using each of them
> Simplicity is one, using @decor() means you have at least three-level
> nested functions, which means the code is likely to be very huge and
> perhaps unnecessarily.
Bruce Eckel po
On 2:59 PM, Ethan Furman wrote:
> def __call__(self, func=None):
> if func is None:
> return self._call()
> self.func = func
> return self
> def _call(self):
> print("\n" + self.char * 50)
> self.func()
> print(self.char * 50 +
On 2:59 PM, Anthony Kong wrote:
> So the question: is it possible to use lambda expression at all for
> the setter? (As in the last, commented-out line)
>
> Python interpreter will throw an exception right there if I use the
> last line ('SyntaxError: lambda cannot contain assignment'). I'd use
>
On 2:59 PM, Kevin Walzer wrote:
> Can anyone point me in the direction of a Tkinter/Python app that has
> been wrapped with py2exe and is deployed on Windows as a standalone
> using one of the standard installer tools? (MSI, NSIS, Inno Setup,
> etc.) I'm working on a Tkinter app for Windows and hav
On 2:59 PM, Kevin Walzer wrote:
> Can anyone point me in the direction of a Tkinter/Python app that has
> been wrapped with py2exe and is deployed on Windows as a standalone
> using one of the standard installer tools? (MSI, NSIS, Inno Setup,
> etc.) I'm working on a Tkinter app for Windows and hav
On 2:59 PM, smith jack wrote:
> if a list L is composed with tuple consists of two elements, that is
> L = [(a1, b1), (a2, b2) ... (an, bn)]
>
> is there any simple way to divide this list into two separate lists , such
> that
> L1 = [a1, a2... an]
> L2=[b1,b2 ... bn]
>
> i do not want to use loop
On 2:59 PM, smith jack wrote:
> if a list L is composed with tuple consists of two elements, that is
> L = [(a1, b1), (a2, b2) ... (an, bn)]
>
> is there any simple way to divide this list into two separate lists , such
> that
> L1 = [a1, a2... an]
> L2=[b1,b2 ... bn]
>
> i do not want to use loop
On 2:59 PM, Nobody wrote:
> On Tue, 16 Aug 2011 01:26:54 +0200, Johannes wrote:
>
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
> "Best" is subjective. AFAIK, the theoretically-optimal algorithm is
> Boyer-Moore. But that would req
On 2:59 PM, Nobody wrote:
> On Tue, 16 Aug 2011 01:26:54 +0200, Johannes wrote:
>
>> what is the best way to check if a given list (lets call it l1) is
>> totally contained in a second list (l2)?
> "Best" is subjective. AFAIK, the theoretically-optimal algorithm is
> Boyer-Moore. But that would req
On 2:59 PM, Massi wrote:
> I everyone,
>
> I'm trying to write a setup file for py2exe (0.6.9) to convert my
> script into a windows (on win 7) executable. In my script (python2.6)
> I use PyQt and matplotlib. Here is the setup.py file:
> ImportError: No module named Tkinter
>
> Obviously Tkinter
On 5/13/2011 3:38 PM, noydb wrote:
> I want some code to take the items in a semi-colon-delimted string
> "list" and places each in a python list. I came up with below. In
> the name of learning how to do things properly,
No big deal that you weren't aware of the split() method for strings.
Sin
On 2:59 PM, Chris Angelico wrote:
>>> So really, it's not "all() is slow" but "function calls are slow".
>>> Maybe it'd be worthwhile making an all-factory:
>> PLEASE say you're joking. If I saw code like that on any of our project,
>> this would definitely qualify for a DailyWTF.
> For the benefi
Peter Otten wrote:
> Last not least there's the option to employ locale-aware formatting:
Not quite last ... there's the mind-bending regular expression route:
import re
re.sub(r"(?<=\d)(?=(\d\d\d)+$)", ",", "12345678") # 12,345,678
re.sub(r"(?<=\d)(?=(\d\d\d)+$)", ",", "-54321")
The difference between the fill=, expand=, and anchor= options to the pack()
function takes a while to get used to. In brief:
* fill= controls the size of a control itself
* expand= controls the size of the space into which the pack() function
places a control
* anchor= comes into play if the si
>> from Tkinter import *
>>
>> def do():
>> btn.configure(image = None)
>>
>> root = Tk()
>> img1 = PhotoImage(file="bacon.gif")
>>
>> btn = Button(image = img1, command = do, text = "hello" )
>> btn.img = img1
>> btn.pack()
>> root.mainloop()
>>
Try this change:
from: btn.
>> > Try this change:
>> >
>> > from: btn.configure(image = None)
>> > to: img1.blank()
>> >
>>
>> This does in fact clear the image out, however it isn't causing the
>> text to display... Do i have have to create a new button and swap it
>> out?
I knew you were gonna ask that! :-)
>> m,n = [1,2,3],[4,5,6]
>> m[:],n[:] = n,m
I believe this is an RTFM situation. In the Python 2.6.1 help topic "Simple
Statements" > "Assignment Statements", see this para:
If the target is a slicing: The primary expression in the reference is
evaluated. It should yield a mutable seq
>>
>> > L = filter('a'.__ne__,L)
>>
>> And this is probably the fastest. But not all types define
>> __ne__ so a
>> more generic answer would be:
>>
>> from functools import partial
>> from operator import ne
>> L = filter(partial(ne, 'a'), L)
>>
And don't forget this "traditio
>>
>> from functools import partial
>> from operator import ne
>> L = filter(partial(ne, 'a'), L)
>>
I learned about functools.partial only recently (on this list). functools is
implemented in C, not Python, so I couldn't answer this question for myself:
Is functools.partial completely
>>
>> I'd like to create a simple Menu bar with one item in it,
>> say, called "My
>> Menu", and have a few submenu items on it like "Change
>> Data" and "Exit". I
>> can do that but I'd like the title I put on the enclosing
>> window to be
>> completely visible. The title is, for ex
> def move_panel(self, evt):
> def gen():
> for x in range(200):
> yield x
> for x in range(200, 0, -1):
> yield x
> for x in gen():
> self.square.SetPosition((x, 30))
> time.sleep(0.005)
>
I can'
> I have 2 lists
> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
> b = [2, 4, 1, 3]
>
> Now, I want to order _a_ (a[1]) based on _b_.
> i.e. the second element in tuple should be the same as
> b.
> i.e. Output would be [(3, 2), (2, 4), (4, 1), (7, 3)]
>
> I did the same as follows:
>
> If you don't want to build the intermediary dict, a
> less efficient
> version that runs in O(n^2):
>
> a.sort(key=lambda k: b.index(k[1]))
>
> Which is mostly similar to John's solution, but still
> more efficient
> because it only does a b.index call once per 'a'
> item instead of twice
> pe
(My apologies if the thread has already covered this.) I believe I understand
the WHAT in this situation, but I don't understand the WHY ...
Given this class definition:
class Cls(object):
x = 345
... I observe the following, using IDLE 2.6.1:
>>> inst = Cls()
>>> Cls.x is inst.x
True
Matthew Woodcraft said:
> I doubt it's because anyone particularly wanted this
> behaviour; it just
> falls out of the way '+=' is defined.
>
> At the point where 'inst.x += 1' is compiled,
> Python doesn't know
> whether 'inst.x' is going to turn out to be a class
> attribute or an
> instance a
Earlier, I said:
> I'll look into what the standard Python doc set says on this
> matter.
>
RTFM, in section "Augmented assignment statements" of python301.chm:
---
For targets which are attribute references, the initial value is retrieved with
a getattr() and the result is assigned with a se
[snip]
> field_widths = [14, 6, 18, 21, 21, 4, 6]
>
> out = open("/home/chatdi/ouptut.csv", 'w')
> for line in open("/home/chatdi/input.csv", "r"):
> fields = line.rstrip().split('|')
> padded_fields = [field.ljust(width) for field, width in zip(fields,
> field_widths)]
> out.write
[snip]
> > If you want next(g) to yield 3, you'd have to do something like:
> >
> > g = (x for x in s[:])
> >
> > where s[:] makes a copy of s that is then iterated over.
BTW, this simpler statement works, too:
g = iter(s[:])
--
http://mail.python.org/mailman/listinfo/python-list
On Mon Mar 16 03:42:42, I said:
> RTFM, in section "Augmented assignment statements" of python301.chm:
>
> ---
> For targets which are attribute references, the initial value is retrieved
> with a getattr() and the result is assigned with a setattr(). Notice that
the
> two methods do not necess
[snip]
>> > If the object is a class instance and the attribute reference
occurs
>> > on both sides of the assignment operator; for example::
>> >
>> > self.x = self.x + 1
>> >
>> > ... in the RHS expression, ``self.x`` is evaluated with
>> > ``getattr()``, which ca
I've tried twice to register myself at bugs.python.org. But the confirmation
email message never arrives. (Yes, I checked my spam folder.) What do I do
now?
E-mail message checked by Spyware Doctor (6.0.0.386)
Database version: 5.12060
http://www.pctools.com/en/spyware-doctor-antivirus/
--
ht
Scott David Daniels said:
>> You ask, "What exactly is the role of ...", rather than saying
>> something like, "I don't understand the role of ...", and continue
>> to ask why the code is not architected the way you first expected
>> it to be architected, calling those things you do not unders
>>
>> We can try to debug this :)
>>
>> > E-mail message checked by Spyware Doctor (6.0.0.386)
>> > Database version:
>> 5.12060http://www.pctools.com/en/spyware-doctor-antivirus/
>>
>> Any chance it's Spyware Doctor or some anti-virus flagging
>> the message
>> and hiding it?
>>
Eric Brunel said:
>> The Tk instance is registered in a hidden variable in the
>> Tkinter module. When
>> you don't specify a master, it'll use the latest created Tk
>> instance one by
>> default. BTW, the latest should be the only one: it is
>> quite unsafe to create
>> several Tk insta
>> >> We can try to debug this :)
>> >>
>> >> > E-mail message checked by Spyware Doctor (6.0.0.386)
>> >> > Database version:
>> >> 5.12060http://www.pctools.com/en/spyware-doctor-antivirus/
>> >>
>> >> Any chance it's Spyware Doctor or some anti-virus flagging
>> >> the messag
I said:
>> > My intent was to fix an obvious omission: a special case
>> was discussed in
>> > the "Augmented assignment statements" section, but an
>> almost-identical
>> > special case was omitted from the "Assignment statements" section.
After finally getting registered at bugs.python.o
Terry Ready said:
>> > My ISP (AT&T/Yahoo) was blocking email from the Python bug-tracker:
"The
>> > sending system has been identified as a source of spam".
>>
>> I hope you were able to suggest to them that that
>> identification must be
>> an error. Frustrating given the spam sources
Dennis Lee Bieber presented a code snippet with two consecutive statements
that made me think, "I'd code this differently". So just for fun ... is
Dennis's original statement or my "_alt" statement more idiomatically
Pythonic? Are there even more Pythonic alternative codings?
mrkrs = [b for b i
>> > mrkrs_alt2 = filter(lambda b: b > 127 or b in list("\r\n\t"),
block)
>> >
>>
>> Never tested my 'pythonicity', but I would do:
>>
>> def test(b) : b > 127 or b in r"\r\n\t"
Oops! Clearly,
b in "\r\n\t"
is preferable to ...
b in list("\r\n\t")
You do *not* want to u
Inspired by recent threads (and recalling my first message to Python
edu-sig), I did some Internet searching on producing prime numbers using
Python generators. Most algorithms I found don't go for the infinite,
contenting themselves with "list all the primes below a given number".
Here's a very P
Mark Tolonen said:
>> p <= sqrt(n) works a little better :^)
>>
>> -Mark
>>
Right you are -- I found that bug in my last-minute check, and then I forgot
to trannscribe the fix into the email message. Duh -- thanks!
-John
E-mail message checked by Spyware Doctor (6.0.0.386)
Database
>> Also, if my code is considered ugly or redundant by this community,
>> can you make suggestions to clean it up?
Python is pretty mature: if you have a simple, generic problem, the chances
are that someone else has already solved it, packaging the solution in a
library (or "module"). For your
Kay Schluehr said:
> g = (lambda primes = []:
> (n for n in count(2) \
> if
> (lambda n, primes: (n in primes if primes and
n<=primes[-1] \
> else
> (primes.append(n) or True \
> if all(n%p for p in primes if p <= sqrt(n)) \
>
Kay Schluehr wrote:
> That's because it is *one* expression. The avoidance of named
> functions makes it look obfuscated or prodigious. Once it is properly
> dissected it doesn't look that amazing anymore.
>
> Start with:
>
> (n for n in count(2) if is_prime(n, primes))
>
> The is_prime function
>> > g = (lambda primes = []:
>> > (n for n in count(2) if
>> > (lambda x, primes:
>> > (primes.append(x) or True
>> > if all(x%p for p in primes if p <= sqrt(x))
>> > else False)
>> > )(n, primes)
>> >
Tim Shannon wrote:
I'm new to python, so keep that in mind.
I have a tk Canvas that I'm trying to draw on, and I want to start my
drawing at an offset (from 0) location. So I can tweak this as I
code, I set this offset as a class level variable:
def ClassName:
OFFSET = 20
def __i
For what definition of 'did not work'? Seems perfectly fine to me. Just try to
add the lines:
root = Tk()
Try adding a line like this:
root.geometry("400x300+100+75")
... which means: "make the window 400 pixels wide and 300 pixels high,
with the upperleft corner at point (100,75)"
Lawrence D'Oliveiro wrote:
> Fine if it only happened once. But it's a commonly-made mistake. At some
> point you have to conclude that not all those people are stupid, there
> really is something wrong with the design.
I think "something wrong with the design" is overstating the case a bit,
an
Hrvoje Niksic wrote:
> if test.contains(item) # would return a Boolean value
>
>> That's a string method, not a function in the string module.
Oops, of course.
import operator
operator.contains('foo', 'o')
That's pretty good, and IMHO a bit better than John Machin's suggestion
> Peter Otten wrote:
>> Could you explain why you prefer 'contains(belly, beer)'
>> or 'belly.contains(beer)' over 'beer in belly'? The last form may be
a bit
>> harder to find in the documentation, but once a newbie has learned about
>> it he'll find it easy to remember.
andrew cooke wrote:
Arnaud Delobelle wrote:
You could do something like this with the help of itertools.ifilter:
prime_gen = ifilter(
lambda n, P=[]: all(n%p for p in P) and not P.append(n),
count(2)
)
Formidable! (both the English and French meanings) This is the most
elegant, Sieve of Eratos
Duncan Booth wrote:
John Posner wrote:
Do know what in the itertools implementation causes adding a 'if p <=
sqrt(n)' clause to *decrease* performance, while adding a
'takewhile()' clause *increases* performance?
I haven't timed it, but I would guess t
Tim Chase wrote:
I still prefer "Return False if any element of the iterable is not
true" or "Return False if any element in the iterable is false"
because that describes exactly what the algorithm does. Granted,
anybody with a mote of Python skills can tell that from the algorithm,
but if you
Chris Rebert wrote:
Ah, okay. Then you want:
def all_same(lst):
return len(set(lst)) == 1
def all_different(lst):
return len(set(lst)) == len(lst)
Note that these require all the elements of the list to be hashable.
This solution relies on the object ID -- no hashability required:
Scott David Daniels wrote:
Assuming you really are going for "is" comparison, how about:
max(id(x) for x in mylist) == min(id(x) for x in mylist)
It has the advantage that if [id(x) for x in mylist] = [2N, 1N, 3N],
you get the answer you desire.
Oops -- got me! -John
--
http://mail.python
Tim Chase wrote:
I will probably leave the lead-in sentence as-is but may
add another sentence specifically covering the case for
an empty iterable.
as one of the instigators in this thread, I'm +1 on this solution.
Thanks for weighing in, Raymond. As long as people are getting in their
last
Alan G Isaac wrote:
Yes, that's what I am currently doing.
But it seems that that is exactly the kind of thing
we are enabled to avoid with e.g., named fonts.
So I was hoping for an equivalent functionality
for colors. From your answer, I am guessing there
is none.
Not sure this would help, but
jazbees wrote:
> I'm surprised to see that the use of min and max for element-wise
> comparison with lists has not been mentioned. When fed lists of True/
> False values, max will return True if there is at least one True in
> the list, while min will return False if there is at least one False.
Arnaud Delobelle wrote:
return any( not val for val in value_list )
This is the same as:
return not all(value_list)
Yes, I should have remembered De Morgan's Theorem. Thanks!
-John
--
http://mail.python.org/mailman/listinfo/python-list
uuid wrote:
I am at the same time impressed with the concise answer and
disheartened by my inability to see this myself.
My heartfelt thanks!
Don't be disheartened! Many people -- myself included, absolutely! --
occasionally let a blind spot show in their messages to this list. BTW:
contai
Duncan Booth wrote:
Tim Chase wrote:
There _are_ cases where it's a useful behavior, but they're rare,
so I don't advocate getting rid of it. But it is enough of a
beginner gotcha that it really should be in the Python FAQ at
www.python.org/doc/faq/general/
That's an excellent idea!
So
Stephen Hansen wrote:
I have a feeling this might start one of those uber-massive "pass by
value / reference / name / object / AIEE" threads where everyone goes
around in massive circles explaining how Python uses one or another
parameter passing paradigm and why everyone else is wrong... but..
Shane Geiger wrote:
if type(el) == list or type(el) is tuple:
A tiny improvement:
if type(el) in (list, tuple):
--
http://mail.python.org/mailman/listinfo/python-list
jamieson wrote:
i.e. start out with a window like this:
[1][4][7]
[2][5][8]
[3][6][9]
make the main window larger and end up with this:
[1][6]
[2][7]
[3][8]
[4][9]
[5
Here's a solution, using Label widgets for clarity. The keys are:
* start numbering from zero, not one
* use divmod() on an
On Sun, 29 Nov 2009 22:03:09 -0500, tuxsun wrote:
I've been working in the shell on and off all day, and need to see if
a function I defined earlier is defined in the current shell I'm
working in.
Is there a shell command to get of list of functions I've defined?
How about this:
#
On Wed, 02 Dec 2009 10:55:23 -0500, Mark Summerfield
wrote:
On Dec 1, 2:03 pm, Mark Summerfield wrote:
I've produced a 4 page document that provides a very concise summary
of Python 2<->3 differences plus the most commonly used new Python 3
features. It is aimed at existing Python 2 program
On Wed, 02 Dec 2009 13:34:11 -0500, Carsten Haese
wrote:
With string interpolation, you don't need to do that, either.
'%*d' % (8,456)
' 456'
Thanks, Carsten and Mark D. -- I'd forgotten about the use of "*" in
minimum-field-width specs and precision specs (doh). How about this:
On Thu, 17 Dec 2009 02:09:03 -0500, Martin P. Hellwig
wrote:
mrstevegross wrote:
Ok, I would like to put together a Python/Tkinter dialog box that
displays a simple message and self-destructs after N seconds. Is there
a simple way to do this?
Thanks,
--Steve
Just, thinking aloud, I proba
On Fri, 18 Dec 2009 13:00:48 -0500, Alf P. Steinbach
wrote:
Chapter 2 is about Basic Concepts (of programming). It's the usual:
variables, ...
1. Overall suggestion
You have a tendency to include non-pertinent asides [1]. But then,
rambling a bit endows a manuscript with the author's
On Sat, 19 Dec 2009 19:10:13 -0500, KarlRixon wrote:
Given the following script, I'd expect p1.items to just contain
["foo"] and p2.items to contain ["bar"] but they both contain ["foo",
"bar"].
Why is this? Are object variables not specific to their instance?
---
#!/u
On Sun, 20 Dec 2009 16:59:11 -0500, Zabin wrote:
I am beginner in programming in pyqt. I have been trying to call the
same function from multiple events- but each event results in a
different instance of the function. I am just unable to figure out how
to retrieve the source which calls the fun
On Sun, 27 Dec 2009 09:44:17 -0500, joy99
wrote:
Dear Group,
I am encountering a small question.
Suppose, I write the following code,
input_string=raw_input("PRINT A STRING:")
string_to_word=input_string.split()
len_word_list=len(string_to_word)
if len_word_list>9:
rest_words=
On Tue, 29 Dec 2009 01:35:41 -0500, Steven D'Aprano
wrote:
On Tue, 29 Dec 2009 00:49:50 -0500, John Posner wrote:
On Sun, 27 Dec 2009 09:44:17 -0500, joy99
wrote:
Dear Group,
I am encountering a small question.
Suppose, I write the following code,
input_string=raw_input(&qu
On Tue, 29 Dec 2009 01:35:41 -0500, Steven D'Aprano
wrote:
On Tue, 29 Dec 2009 00:49:50 -0500, John Posner wrote:
On Sun, 27 Dec 2009 09:44:17 -0500, joy99
wrote:
Dear Group,
I am encountering a small question.
Suppose, I write the following code,
input_string=raw_input("PRIN
On Tue, 29 Dec 2009 01:35:41 -0500, Steven D'Aprano
wrote:
On Tue, 29 Dec 2009 00:49:50 -0500, John Posner wrote:
On Sun, 27 Dec 2009 09:44:17 -0500, joy99
wrote:
Dear Group,
I am encountering a small question.
Suppose, I write the following code,
input_string=raw_input("PRIN
On Wed, 30 Dec 2009 12:58:06 -0500, Dave McCormick
wrote:
Hi All,
I am new to Python and the list so I hope I am posting this correctly...
I am working on a way to have text automatically formated in a Tkiniter
Text widget and would like some input on my code.
Currently I am using Python
On Thu, 31 Dec 2009 10:24:44 -0500, Dave McCormick
wrote:
John,
Thank you for the tips.
I was changing the line-column index to a FLOAT because the search would
return the starting position (pos) of the string, then by making it a
FLOAT and adding the string length I was able to get the en
On Thu, 31 Dec 2009 11:32:04 -0500, Andreas Waldenburger
wrote:
On Thu, 31 Dec 2009 08:13:35 -0800 (PST) davidj411
wrote:
I am not sure why this behavior is this way.
at beginning of script, i want to create a bunch of empty lists and
use each one for its own purpose.
however, updating one l
On Sat, Jan 2, 2010 at 1:47 PM, Dave McCormick wrote:
WooHoo!!!
I got it!!! Yup, I am sure it can be optimized but it works!!!
Dave, please ignore a couple of my bogus complaints in the previous
message:
... you call function new_Rword() before you define it
... this version also has
On Sat, Jan 2, 2010 at 1:47 PM, Dave McCormick wrote:
WooHoo!!!
I got it!!! Yup, I am sure it can be optimized but it works!!!
Hmmm ... it doesn't work for me ...
RED
for word in redList:
new_Rword(complete, word) def new_Rword(complete, word):
Tbox.tag_remov
On Fri, 01 Jan 2010 21:01:04 -0500, Cousin Stanley
wrote:
I was not familiar with the re.finditer method
for searching strings ...
Stanley and Dave --
So far, we've just been using finditer() to perform standard-string
searches (e.g. on the word "red"). Since Dave now wants to
No doubt a dumb question from a noob:
The following program (a cut down version of some test code) uses no
CPU, and does not terminate:
import sys
from PyQt4.QtCore import *
if __name__=="__main__":
app = QCoreApplication(sys.argv)
sys.exit(app.exec_())
What is the program doing?
On Tue, 05 Jan 2010 10:31:09 -0500, Dave McCormick
wrote:
... But this is what I have so far.
##
file = 'red.txt'
file = open("red.txt","r")
rList = file.readlines()
file.close()
redList = str(rList).split()
Dave, you're doing exactly the right thing: gradually expanding your
On Tue, 05 Jan 2010 13:12:00 -0500, vsoler wrote:
Hello,
I am acessing an Excel file by means of Win 32 COM technology.
For a given cell, I am able to read its formula. I want to make a map
of how cells reference one another, how different sheets reference one
another, how workbooks reference
On Tue, 05 Jan 2010 15:08:04 -0500, Dave McCormick
wrote:
It's certainly a mistake to use the expression "str(rList).split()".
Using str() to convert the list "rList" into a string creates a mess
that includes square-bracket characters. Did this actually work for you?
It sort of worked
On Tue, 05 Jan 2010 16:54:44 -0500, Dave McCormick
wrote:
But it is not what I am wanting. I first thought to make it look for a
space but that would not work when a single character like "#" is to be
colored if there is a "string" of them. Or if all of the characters
between quotes are
On Wed, 06 Jan 2010 17:47:37 -0500, Zabin wrote:
On Jan 7, 10:23 am, Zabin wrote:
Hey!
I am new PyQt programmer and want to restrict users to allow only
numeric values into a table and lineedit boxes. I found the
QDoubleValidator class but am unsure as to how to implement it. (I am
a little
On Fri, 08 Jan 2010 14:28:57 -0500, MRAB
wrote:
Dave McCormick wrote:
On Wed, Jan 6, 2010 at 9:18 AM, John Posner <mailto:jjpos...@optimum.net>> wrote:
On Tue, 05 Jan 2010 16:54:44 -0500, Dave McCormick
mailto:mackrac...@gmail.com>> wrote:
But it is not wh
On 1/22/2010 7:17 AM, Gilles Ganault wrote:
Hello
I use a dictionary to keep a list of users connected to a web site.
To avoid users from creating login names that start with digits in
order to be listed at the top, I'd like to sort the list differently
every minute so that it'll start with the
On 1/26/2010 8:43 AM, Jean-Michel Pichavant wrote:
Hello,
Does anyone using pylint knows a way to make pylint ignore these
'missing docstring' warnings when the base class version of the method
actually defines the docstring ?
'Cause my doc builder (epydoc) handle it properly and propagate
docst
On 1/26/2010 9:22 AM, Jean-Michel Pichavant wrote:
John Posner wrote:
On 1/26/2010 8:43 AM, Jean-Michel Pichavant wrote:
Hello,
Does anyone using pylint knows a way to make pylint ignore these
'missing docstring' warnings when the base class version of the method
actually d
On 1/28/2010 10:50 AM, evilweasel wrote:
I will make my question a little more clearer. I have close to 60,000
lines of the data similar to the one I posted. There are various
numbers next to the sequence (this is basically the number of times
the sequence has been found in a particular sample).
1 - 100 of 220 matches
Mail list logo