Dennis Lee Bieber a écrit :
On Wed, 11 Jun 2008 10:10:14 +0200, Bruno Desthuilliers
<[EMAIL PROTECTED]> declaimed the following in
comp.lang.python:
are some *very* talented and *experimented* programmers here.
Pardon, but I think you mean "experienced".
Indeed. Tim Golden already c
On 04:51, giovedì 12 giugno 2008 Terry Reedy wrote:
First of all a big thank you, all.
> def makeappender():
> data = ['','']
> def appender(val):
>
> return appender
I'll give it a try. I just doubting if the data will be shared outside the
function.
Actually, my practice goes to send all vari
gopal mishra wrote:
In 'save as' dialog of window application, I am trying to set the path in
'save in' combo box using python win32 programming.
How we can set the directory in the 'save in' combo box.
There are several ways to display a "Save As" dialog. Can you
post [a minimal version of]
On Wed, 11 Jun 2008 12:25:29 -0700, geoffbache wrote:
> (1) py2exe. This is really for when python isn't installed on the remote
> user's machine, so it requires you to distribute a large amount of DLLs
> etc which are part of the python installation. A bit silly when I know
> that the remote user
Hi, I'm a newbie to Python, but I think it won't be too hard to learn.
A few days ago I registered Google App Engine, it only support Python
2.5. I want to set my blog on it soon. But it's not easy for me to
finish it in a short time since I'm not very familiar with Python, so
I want find some code
Mike Orr <[EMAIL PROTECTED]> wrote:
> That's a misunderstanding of classes vs instances. If you have an
> instance of MyClass(Superclass), there is one instance but several
> classes. The instance is of MyClass; there is no instance of
> Superclass. 'self' has a .__class__ attribute because it'
Mike Orr <[EMAIL PROTECTED]> writes:
> There's a very good reason to use self.__class__: it makes it
> possible to subclass your class.
This really depends on the usage. In the OP's use case, he wanted the
subclasses to share the same lock object defined in the superclass
(because of synchroniza
Hi,
I'm using in my script command os.system('command') on Windows XP.
Each time the os.system command is used, python opens an empty ms-dos
command window (the black one) and then closes it. So when in one
script the os.system command 50 times is used, I see 50 black windows.
Is there a way of h
Royt wrote:
> Hi, I'm a newbie to Python, but I think it won't be too hard to learn.
> A few days ago I registered Google App Engine, it only support Python
> 2.5. I want to set my blog on it soon. But it's not easy for me to
> finish it in a short time since I'm not very familiar with Python, so
Mike Orr a écrit :
(snip)
'self' has a .__class__ attribute because it's an
instance, but MyClass and Superclass do not because they're already
classes.
Not true for new-style classes:
>>> class Toto(object): pass
...
>>> Toto.__class__
(snip)
I sometimes wish classes
had a .__class__ at
asdf wrote:
> basically I need to plot a graph of data vs time. However when i use
> matplotlib the hr:min tick marks come out very close together and
> appear jumbled.
You need to look up the matplotlib.dates package - it's covered briefly in
the tutorial at http://matplotlib.sourceforge.net/tuto
En Wed, 11 Jun 2008 04:21:03 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribió:
Gabriel Genellina wrote:
En Tue, 10 Jun 2008 09:44:13 -0300, Gabriel Rossetti
<[EMAIL PROTECTED]> escribió:
I wanted to use the h2py.py script (Tools/scripts/h2py.py) and it
didn't like char litterals :
__
http://attwireless1.blogspot.com
http://onenesstemple.blogspot.com
http://maintanancemanagementsoftwareservises.blogspot.com
http://consolidation2.blogspot.com
http://debtmanagementcompany.blogspot.com/
http://personalloanscash.blogspot.com/
http://att
TheSaint a écrit :
On 04:51, giovedì 12 giugno 2008 Terry Reedy wrote:
First of all a big thank you, all.
def makeappender():
data = ['','']
def appender(val):
return appender
I'll give it a try. I just doubting if the data will be shared outside the
function.
Each time makeappe
En Thu, 12 Jun 2008 05:28:13 -0300, boriq <[EMAIL PROTECTED]>
escribió:
I'm using in my script command os.system('command') on Windows XP.
Each time the os.system command is used, python opens an empty ms-dos
command window (the black one) and then closes it. So when in one
script the os.syste
On 12 Jun., 11:51, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Thu, 12 Jun 2008 05:28:13 -0300, boriq <[EMAIL PROTECTED]>
> escribió:
>
> > I'm using in my script command os.system('command') on Windows XP.
> > Each time the os.system command is used, python opens an empty ms-dos
> > comm
En Thu, 12 Jun 2008 07:08:00 -0300, boriq <[EMAIL PROTECTED]>
escribió:
On 12 Jun., 11:51, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
En Thu, 12 Jun 2008 05:28:13 -0300, boriq <[EMAIL PROTECTED]>
escribió:
> I'm using in my script command os.system('command') on Windows XP.
> Each time
Gabriel Genellina wrote:
En Thu, 12 Jun 2008 07:08:00 -0300, boriq <[EMAIL PROTECTED]>
escribió:
On 12 Jun., 11:51, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
En Thu, 12 Jun 2008 05:28:13 -0300, boriq <[EMAIL PROTECTED]>
escribió:
> I'm using in my script command os.system('command') o
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
> FWIW, metaclasses do have a class attribute that refers to itself !-)
>
One metaclass (i.e. type) has a class attribute that refers to itself.
Other metaclasses have a class attribute that refers to the metaclass's
metaclass. I can't think of
True or False? (no fair looking it up)
(*) If repl is a string then re.sub(pattern, repl, s)
returns s with non-overlapping occurences of pattern
replaced by repl.
I assumed it was true - spent a few hours trying to
figure out what was going on with a certain re.sub,
then noticed that (*) is fa
Hello,
I have a dictionary and will get all keys which have the same values.
d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
I will something as :
d.keys(where their values are the same)
With this statement I can get two lists for this example:
l1= ['a','e']
l2=['b','d']
W
There's no regex that detects balanced parentheses,
or is there?
That is, search('and so ((x+y)+z) = (x+(y+z))')
should return '((x+y)+z)'.
Not just a theoretical question, I'm cleaning up
a large body of TeX code and a regex that did that
would be very convenient. (Yes, I know it's not
hard to d
Hi,
I want to replace all occourences of " by \" in a string.
But I want to leave all occourences of \" as they are.
The following should happen:
this I want " while I dont want this \"
should be transformed to:
this I want \" while I dont want this \"
and NOT:
this I want \" while
On Jun 11, 10:43 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> Those are not /server side/ refreshes...
Correct. But we weren't discussing server side refreshes. We were
discussing how to make the "browser refresh automatically in the
server side":
On Jun 11, 7:59 am, Lie <[EMAIL P
Hello. Was trying to create a simple plotting function. Wasnt working
however. If i write the same code without putting it inside a function
it works. :S. Could some1 tell me the problem? Heres the code:
# File name Plotting2
import Gnuplot
def plot(original, expected, actual):
if type (o
On 11 Cze, 19:10, Sengly <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> This might be off group but I am looking for a python library that can
> help me to find a sense of a word in a text and eventually a list of
> synonyms of that term. I searched the web and found one but it is
> written in perl (ht
On Jun 12, 4:04 am, William McBrine <[EMAIL PROTECTED]> wrote:
> On Wed, 11 Jun 2008 12:25:29 -0700, geoffbache wrote:
> > (1) py2exe. This is really for when python isn't installed on the remote
> > user's machine, so it requires you to distribute a large amount of DLLs
> > etc which are part of t
Nader:
> d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
> I will something as :
> d.keys(where their values are the same)
That's magic.
> With this statement I can get two lists for this example:
> l1= ['a','e']
> l2=['b','d']
> Would somebody tell me how I can do it?
You c
On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]>
wrote:
>Hello,
>
>I have a dictionary and will get all keys which have the same values.
>
>d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
That's not a dictionary, it's a syntax error. If you actually
have a d
On Jun 12, 7:11 pm, anton <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to replace all occourences of " by \" in a string.
>
> But I want to leave all occourences of \" as they are.
>
> The following should happen:
>
> this I want " while I dont want this \"
>
> should be transformed to:
>
> this
On Jun 12, 1:35 pm, [EMAIL PROTECTED] wrote:
> Nader:
>
> > d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
> > I will something as :
> > d.keys(where their values are the same)
>
> That's magic.
>
> > With this statement I can get two lists for this example:
> > l1= ['a','e']
>
bvdp wrote:
Is there a simple/safe expression evaluator I can use in a python
program. I just want to pass along a string in the form "1 + 44 / 3" or
perhaps "1 + (-4.3*5)" and get a numeric result.
I can do this with eval() but I really don't want to subject my users to
the problems with t
On Jun 12, 1:41 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]>
> wrote:
>
> >Hello,
>
> >I have a dictionary and will get all keys which have the same values.
>
> >d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' :
In <[EMAIL PROTECTED]> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>kj schrieb:
>> I'm running into a strange seg fault with the module cjson. The
>> strange part is that it does not occur when I run the code under
>> Emacs' Pydb.
>>
>> Here's an example:
>>
>>
>> import sys, cjson
>>
>>
On Jun 12, 1:48 pm, Nader <[EMAIL PROTECTED]> wrote:
> On Jun 12, 1:35 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > Nader:
>
> > > d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
> > > I will something as :
> > > d.keys(where their values are the same)
>
> > That's magic.
>
> > > With
On Jun 12, 8:57 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> True or False? (no fair looking it up)
>
> (*) If repl is a string then re.sub(pattern, repl, s)
> returns s with non-overlapping occurences of pattern
> replaced by repl.
>
> I assumed it was true - spent a few hours trying to
> fig
David C. Ullrich wrote:
> (Or is there a function somewhere that will convert
> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
> do the same for precisely the escpapes referred to
> in the "and so forth"?)
I think you just have to escape the backslash:
re.sub(pattern, replacement_string.repla
On Jun 12, 2:05 pm, Chris <[EMAIL PROTECTED]> wrote:
> On Jun 12, 1:48 pm, Nader <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 12, 1:35 pm, [EMAIL PROTECTED] wrote:
>
> > > Nader:
>
> > > > d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
> > > > I will something as :
> > > > d.key
Nader <[EMAIL PROTECTED]> wrote:
> I have a dictionary and will get all keys which have the same values.
>
> d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3),('e' : 1),('f' : 4)}
>
> I will something as :
>
> d.keys(where their values are the same)
>
> With this statement I can get two lists for
kj wrote:
> In <[EMAIL PROTECTED]> "Diez B. Roggisch"
> <[EMAIL PROTECTED]> writes:
>
>>kj schrieb:
>>> I'm running into a strange seg fault with the module cjson. The
>>> strange part is that it does not occur when I run the code under
>>> Emacs' Pydb.
>>>
>>> Here's an example:
>>>
>>>
>>>
Quoting Dennis Lee Bieber <[EMAIL PROTECTED]>:
> On Wed, 11 Jun 2008 21:54:33 -0700 (PDT), Michele Simionato
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
> >
> > It looks like in French (as in Italian) *experimented* has the
> > meaning of "tried and tested on the fiel
David C. Ullrich <[EMAIL PROTECTED]> wrote:
> Practical question: What's a _complete_ list of the
> escapes included in the "and so forth" in (**)?
>
> (Or is there a function somewhere that will convert
> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
> do the same for precisely the escpapes
John Machin <[EMAIL PROTECTED]> wrote:
> What you want is:
>
>>> import re
>>> text = r'frob this " avoid this \", OK?'
text
> 'frob this " avoid this \\", OK?'
>>> re.sub(r'(? frob this \\" avoid this \\", OK?'
>>>
>
Or you can do it without using regular expressions at all. Just replace
On Jun 11, 11:48 am, Frank Millman <[EMAIL PROTECTED]> wrote:
> Thanks to all for the various replies. They have all helped me to
> refine my ideas on the subject. These are my latest thoughts.
>
[snip]
>
> My main concern is that my approach may be naive, and that I will run
> into situations that
Duncan Booth <[EMAIL PROTECTED]> writes:
> In fact, thinking about it a bit more, I think that if you did have
> another metaclass which is its own metaclass then the class cannot
> subclass 'object'.
You could if the metaclass of your metaclass inherited from 'type'.
Then your types could still
anton wrote:
> I want to replace all occourences of " by \" in a string.
>
> But I want to leave all occourences of \" as they are.
>
> The following should happen:
>
> this I want " while I dont want this \"
>
> should be transformed to:
>
> this I want \" while I dont want this \"
>
>
On Jun 12, 2:15 pm, Nader <[EMAIL PROTECTED]> wrote:
> On Jun 12, 2:05 pm, Chris <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 12, 1:48 pm, Nader <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 12, 1:35 pm, [EMAIL PROTECTED] wrote:
>
> > > > Nader:
>
> > > > > d = {('a' : 1), ('b' : 3), ('c' : 2),('d' : 3)
On Jun 12, 12:30 pm, [EMAIL PROTECTED] wrote:
> Hello. Was trying to create a simple plotting function. Wasnt working
> however. If i write the same code without putting it inside a function
> it works. :S. Could some1 tell me the problem? Heres the code:
>
> # File name Plotting2
>
> import Gnuplo
On Jun 12, 6:06 am, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> There's no regex that detects balanced parentheses,
> or is there?
>
> That is, search('and so ((x+y)+z) = (x+(y+z))')
> should return '((x+y)+z)'.
>
> Not just a theoretical question, I'm cleaning up
> a large body of TeX code and a
On Jun 12, 6:41 am, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]>
> wrote:
>
> >Hello,
>
> >I have a dictionary and will get all keys which have the same values.
>
>
> d = {'a' : 1, 'b' : 3, 'c' : 2,'d' : 3,'e' : 1,'f' : 4}
>
> dd
Hi all,
I have a scenario where I have a list like this:
UserScore
1 0
1 1
1 5
2 3
2 1
3 2
4 3
4 3
4 2
And I need to add up the score for ea
Mark wrote:
> Hi all,
>
> I have a scenario where I have a list like this:
>
> UserScore
> 1 0
> 1 1
> 1 5
> 2 3
> 2 1
> 3 2
> 4 3
> 4 3
> 4
[EMAIL PROTECTED] wrote:
> Hello. Was trying to create a simple plotting function. Wasnt working
> however. If i write the same code without putting it inside a function
> it works. :S. Could some1 tell me the problem?
Judging from the demo you have to keep a Gnuplot.Gnuplot instance alive. If
y
On Thu, Jun 12, 2008 at 9:48 AM, Mark <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a scenario where I have a list like this:
>
> UserScore
> 1 0
> 1 1
> 1 5
> 2 3
> 2 1
> 3 2
> 4
On Thu, 12 Jun 2008 05:12:55 -0700 (PDT), John Machin
<[EMAIL PROTECTED]> wrote:
>On Jun 12, 8:57 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
>> True or False? (no fair looking it up)
>>
>> (*) If repl is a string then re.sub(pattern, repl, s)
>> returns s with non-overlapping occurences of pa
On 2008-06-12, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> If you were to follow the footsteps of COBOL, you'd be using
> BCD internally, with a special code to represent the decimal
> point (and maybe, to save space, the sign too)
>
> Old mainframes had instructions to work with packed BCD as
On Jun 12, 3:48 pm, Mark <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a scenario where I have a list like this:
>
> User Score
> 1 0
> 1 1
> 1 5
> 2 3
> 2 1
> 3 2
> 4 3
> 4
On Thu, 12 Jun 2008 14:12:31 +0200, Peter Otten <[EMAIL PROTECTED]>
wrote:
>David C. Ullrich wrote:
>
>> (Or is there a function somewhere that will convert
>> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
>> do the same for precisely the escpapes referred to
>> in the "and so forth"?)
>
>I th
On 2008-06-12, Hans Nowak <[EMAIL PROTECTED]> wrote:
> bvdp wrote:
>>
>> Is there a simple/safe expression evaluator I can use in a python
>> program. I just want to pass along a string in the form "1 + 44 / 3" or
>> perhaps "1 + (-4.3*5)" and get a numeric result.
>>
>> I can do this with eval
On Jun 12, 3:02 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Mark wrote:
> > Hi all,
>
> > I have a scenario where I have a list like this:
>
> > User Score
> > 1 0
> > 1 1
> > 1 5
> > 2 3
> > 2 1
> >
Just out of curiosity, what are the chances of this happening (sort of like
what happened with sqlite)? I read somewhere that Guido said the only reason
Tkinter is still the standard GUI module instead of wxPython is because "it
was there first." Perhaps a joke, but it got me thinking that there
2008/6/11, Sengly <[EMAIL PROTECTED]>:
>
> Dear all,
>
> This might be off group but I am looking for a python library that can
> help me to find a sense of a word in a text and eventually a list of
> synonyms of that term. I searched the web and found one but it is
> written in perl (http://www.d.
On 12 Jun 2008 12:32:13 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich <[EMAIL PROTECTED]> wrote:
>
>> Practical question: What's a _complete_ list of the
>> escapes included in the "and so forth" in (**)?
>>
>> (Or is there a function somewhere that will convert
>> r"\remark{Hint
Mark wrote:
Hi all,
I have a scenario where I have a list like this:
UserScore
1 0
1 1
1 5
2 3
2 1
3 2
4 3
4 3
4 2
And I need to add up th
I'm keen on learning python, with a heavy lean on doing things the
"pythonic" way, so threw the following script together in a few hours
as a first-attempt in programming python.
I'd like the community's thoughts/comments on what I've done;
improvements I can make, "don'ts" I should be avoiding, e
"Mark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Jun 12, 3:02 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Mark wrote:
---
This was my (failed) attempt:
predictions = Prediction.objects.all()
scores = []
for prediction in predictions:
i = [prediction.predictor.id, 0]
On Thu, 12 Jun 2008 06:38:16 -0700 (PDT), Paul McGuire
<[EMAIL PROTECTED]> wrote:
>On Jun 12, 6:06 am, David C. Ullrich <[EMAIL PROTECTED]> wrote:
>> There's no regex that detects balanced parentheses,
>> or is there?
>>
>> [...]
>
>Pyparsing includes several helper methods for building common
>ex
> To be honest I'm relatively new to Python, so I don't know too much
> about how all the loop constructs work and how they differ to other
> languages. I'm building an app in Django and this data is coming out
> of a database and it looks like what I put up there!
>
> This was my (failed) attempt
John, it's a QuerySet coming from a database in Django. I don't know
enough about the structure of this object to go into detail I'm
afraid.
Aidan, I got an error trying your suggestion: 'zip argument #2 must
support iteration', I don't know what this means!
Thanks to all who have answered! Sorry
Mark wrote:
John, it's a QuerySet coming from a database in Django. I don't know
enough about the structure of this object to go into detail I'm
afraid.
Aidan, I got an error trying your suggestion: 'zip argument #2 must
support iteration', I don't know what this means!
well, if we can create
> Just out of curiosity, what are the chances of this happening (sort of
> like what happened with sqlite)? I read somewhere that Guido said the only
> reason Tkinter is still the standard GUI module instead of wxPython is
> because "it was there first." Perhaps a joke, but it got me thinking that
On 12 Jun, 16:18, "John Salerno" <[EMAIL PROTECTED]> wrote:
> Just out of curiosity, what are the chances of this happening (sort of like
> what happened with sqlite)?
Plenty of prior discussion here:
http://groups.google.com/group/comp.lang.python/search?group=comp.lang.python&q=wxPython+standar
Aidan wrote:
Mark wrote:
John, it's a QuerySet coming from a database in Django. I don't know
enough about the structure of this object to go into detail I'm
afraid.
Aidan, I got an error trying your suggestion: 'zip argument #2 must
support iteration', I don't know what this means!
well, if
Hi Diez & All,
> And on a personal note: I find it *buttugly*.
Do you mind explaining "why" you find it *buttugly*? I am asking just
out of curiosity, obviously. I am so biased towards wxPython that I
won't make any comment on this thread in particular, but I am curious
to know why some people fi
[Note: I changed the subject line to make it more informative.]
In <[EMAIL PROTECTED]> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>kj wrote:
>> In <[EMAIL PROTECTED]> "Diez B. Roggisch"
>> <[EMAIL PROTECTED]> writes:
>>
>>>kj schrieb:
I'm running into a strange seg fault with the modu
Hello. Needed some help again. Im trying to calculate the best fit
line here. Given a set of points in a list. However, wirte in the end
where i plot the line it tells me tht the variable is not defined.
Either try correcting this or tell me a subsitute that i could use.
Thnks. Heres the code:
#F
On Jun 12, 9:55 am, "Andrea Gavana" <[EMAIL PROTECTED]> wrote:
> Hi Diez & All,
>
> > And on a personal note: I find it *buttugly*.
>
> Do you mind explaining "why" you find it *buttugly*? I am asking just
> out of curiosity, obviously. I am so biased towards wxPython that I
> won't make any commen
TheSaint wrote:
On 01:37, giovedì 12 giugno 2008 Ethan Furman wrote:
Do you mean indenting, or wrapping?
I mean fill the line by increasing spaces between words in order to get a
paragraph aligned both side, left and right on the page.
So if the width is 78 chars it wouldn't have jig saw end
Mark wrote:
John, it's a QuerySet coming from a database in Django. I don't know
enough about the structure of this object to go into detail I'm
afraid. [...]
Then let the database do the summing up. That's what it's there for :-)
select user, sum(score) from score_table
group by user
or some
Aidan wrote:
does this work for you?
users = [1,1,1,2,2,3,4,4,4]
score = [0,1,5,3,1,2,3,3,2]
d = dict()
for u,s in zip(users,score):
if d.has_key(u):
d[u] += s
else:
d[u] = s
for key in d.keys():
print 'user: %d\nscore: %d\n' % (key,d[key])
I've recently had the very same prob
"Phillip B Oldham" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'd like the community's thoughts/comments on what I've done;
> improvements I can make, "don'ts" I should be avoiding, etc. I'm not
> so much bothered about the resulting data - for the moment it meets my
> needs. Bu
Don't forget that timeit module uses time.clock on windows as well:
if sys.platform == "win32":
# On Windows, the best timer is time.clock()
default_timer = time.clock
else:
# On most other platforms the best timer is time.time()
default_timer = time.time
http://svn.python.org/view/
David C. Ullrich schrieb:
-- care to tell us what "a certain re.sub" is, and
false in what way?
Read the OP.
Well, aren't you funny. Maybe you should have referenced the other
thread so one can find the OP?
Regards,
Johannes
--
"Wer etwas kritisiert muss es noch lange nicht selber besser
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This has been discussed before. While tkInter might not be the greatest
> toolkit out there it has two extreme advantages:
>
> - it is comparably small regarding the footprint. Few external
> dependencies, small lib
"John Salerno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> if domain.endswith(".net"):
>> rec = clean_net(rec)
>>
>> if domain.endswith(".com"):
>> rec = clean_net(rec)
>>
>> if domain.endswith(".tv"):
>> rec = clean_net(rec)
>>
>> if domain.endswith(".co.uk"):
>> rec = clean_co
Parsing TeX is definitely not for the faint-of-heart! You might try
something like QuotedString('$', escQuote='$$') in pyparsing. (I've
not poked at TeX or its ilk since the mid-80's so my TeXpertise is
long rusted away.)
I know of two projects that have taken on the problem using pyparsing
- on
On Jun 12, 2008, at 10:55 AM, Andrea Gavana wrote:
And on a personal note: I find it *buttugly*.
Do you mind explaining "why" you find it *buttugly*? I am asking just
out of curiosity, obviously. I am so biased towards wxPython that I
won't make any comment on this thread in particular, but I
On Jun 12, 4:27 pm, Phillip B Oldham <[EMAIL PROTECTED]> wrote:
> I'm keen on learning python, with a heavy lean on doing things the
> "pythonic" way, so threw the following script together in a few hours
> as a first-attempt in programming python.
>
> I'd like the community's thoughts/comments on
On Jun 12, 3:45 pm, Aidan <[EMAIL PROTECTED]> wrote:
> Aidan wrote:
> > Mark wrote:
> >> John, it's a QuerySet coming from a database in Django. I don't know
> >> enough about the structure of this object to go into detail I'm
> >> afraid.
>
> >> Aidan, I got an error trying your suggestion: 'zip a
Sa¹a Bistroviæ
Antuna Mihanviæa 13
4 Ãakovec
Croatia
[EMAIL PROTECTED]
FPC: Exception : Unknown Run-Time error : 210
Hi, I'm Sa¹a from Croatia.
And I have :
Windows XP PRO SP3.
Pentium II MMX 400MHz.
256 MB of RAM.
I tried to compile fp.pas.
But I get this error message :
'Running "
Hi Ed & All,
On Thu, Jun 12, 2008 at 4:11 PM, Ed Leafe wrote:
> On Jun 12, 2008, at 10:55 AM, Andrea Gavana wrote:
>
>>> And on a personal note: I find it *buttugly*.
>>
>> Do you mind explaining "why" you find it *buttugly*? I am asking just
>> out of curiosity, obviously. I am so biased towards
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Parsing TeX is definitely not for the faint-of-heart! You might try
> something like QuotedString('$', escQuote='$$') in pyparsing. (I've
> not poked at TeX or its ilk since the mid-80's so my TeXpertise is
> long ruste
Andrea Gavana:
> Maybe. But I remember a nice quote made in the past by Roger Binns (4
> years ago):
> """
> The other thing I failed to mention is that the wxPython API isn't very
> Pythonic. (This doesn't matter to people like me who are used to GUI
> programming - the wxPython API is very much
On Jun 11, 9:16 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jun 11, 8:15 pm, bvdp <[EMAIL PROTECTED]> wrote:
>
>
>
> > Matimus wrote:
>
> > > The solution I posted should work and is safe. It may not seem very
> > > readable, but it is using Pythons internal parser to parse the passed
> > > i
In article <[EMAIL PROTECTED]>,
"Andrea Gavana" <[EMAIL PROTECTED]> wrote:
> Hi Diez & All,
>
> > And on a personal note: I find it *buttugly*.
>
> Do you mind explaining "why" you find it *buttugly*?
My guess would be that "buttugly" is a colloquialism
meaning "exquisitely lovely".
>I am a
In article
<[EMAIL PROTECTED]>,
Paul McGuire <[EMAIL PROTECTED]> wrote:
> Parsing TeX is definitely not for the faint-of-heart! You might try
> something like QuotedString('$', escQuote='$$') in pyparsing. (I've
> not poked at TeX or its ilk since the mid-80's so my TeXpertise is
> long rusted
In article <[EMAIL PROTECTED]>,
Johannes Bauer <[EMAIL PROTECTED]> wrote:
> David C. Ullrich schrieb:
>
> >> -- care to tell us what "a certain re.sub" is, and
> >> false in what way?
> >
> > Read the OP.
>
> Well, aren't you funny. Maybe you should have referenced the other
> thread so one c
"Andrea Gavana" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Whether the wxPython style is "Pythonic" or not (whatever "Pythonic"
> means), this is a one-degree-above-insignificant issue for me. What I
> care is the eye pleasing look of my apps and how easy it is to code
> with a
Matimus wrote:
On Jun 11, 9:16 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
On Jun 11, 8:15 pm, bvdp <[EMAIL PROTECTED]> wrote:
Matimus wrote:
The solution I posted should work and is safe. It may not seem very
readable, but it is using Pythons internal parser to parse the passed
in string
In article
<[EMAIL PROTECTED]>,
Nader <[EMAIL PROTECTED]> wrote:
> On Jun 12, 1:41 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> > On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]>
> > wrote:
> >
> > >Hello,
> >
> > >I have a dictionary and will get all keys which have the
1 - 100 of 162 matches
Mail list logo