On Fri, Jun 13, 2008 at 7:45 AM, Beema shafreen
<[EMAIL PROTECTED]> wrote:
> ... gi, seq, e_value = line.strip().split('\t')
At this point, e_value contains a string value. You'll need to convert
it to a float before you can meaningfully compare it.
--
Cheers,
Simon B.
[EMAIL PROTECTED]
htt
Umm Tried this out too Laiken heres the error that this
gives..
Traceback (most recent call last):
File "D:\Questions\Gradient and C\Gnuplot\Combining Best fit and
Plotting\combasd.py", line 3, in
combine.show_plots([(2,3), (4,8), (5,9), (6,2)], [(1,7), (3,3),
(4,5), (5,6)], [(1,3),
Hi all,
I have file which includes the e_value
i want to fetch the lines if the line with the e_value which is less than
0.01
so I have script but it doesn't work. can you please tell me is this the
right way. The script does not end up with any error. It work if is give the
condition evalue > 0.0
Gabriel Genellina wrote:
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 l
Duncan Booth wrote:
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__ att
Eric Jonas <[EMAIL PROTECTED]> writes:
>> Try gc.disable() before loading the pickle, and gc.enable() after.
>>
>> > Is cPickle's behavior known to be O(n^2)?
>>
>> No, but the garbage collector's sometimes is.
>
> Wow, that totally fixed it -- we went from 1200 seconds to 60
> seconds.
60 seco
Is there anyway one could find ot the point of intersection between
any two plotted functions and also display them using gnuplot.py??
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hello. Ive got two functions here. Somehow the program does not go in
> to the second function wehn i call it. The bestfit function. Could
> some1 help me identify the problem. Heres the code:
Same problem as before, you have to keep the Gnuplot instance alive if you
wa
While using gnuplot.py if id want to make a straight line supposingly
y = 3 after the point (2,3) (a point on another line) with the same
color as that of the line how wud i do that?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 12, 4:58 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> 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
I am wondering what is the best way to create a timer, like an alarm, once it
reaches a time, it triggers an event. I have a way of doing this but it
seems like it isn't good at all. If it helps at all I am using a Tkinter,
but that probably doesn't mean much. The way I was doing it was using a
wh
Hello. Ive got two functions here. Somehow the program does not go in
to the second function wehn i call it. The bestfit function. Could
some1 help me identify the problem. Heres the code:
import Gnuplot
def bestfit(uinput):
if not isinstance(uinput, list):
return False
else:
On Jun 12, 11:46 pm, "Steven Clark" <[EMAIL PROTECTED]> wrote:
> > Hello ,
> > following scenario
>
> > list_current = [ "welcome", "search", "done", "result"]
> > list_ldap = [ "welcome", "hello"]
>
> > result:
>
> > list_toadd = [ "hello"]
>
> > by words said , i want to check if list item from l
On 17:47, giovedì 12 giugno 2008 Bruno Desthuilliers wrote:
>>> For multiple functions, use classes.
>
> Well... Closures are poor men's objects, or so they say (or is that the
> other way round ?-).
Well, I'd like to know what could be the reason to design a single-call class
instead of a simil
So in the code below, I'm binding some events to a text control in
wxPython. The way I've been doing it is demonstrated with the
Lame_Event_Widget class. I want to factor out the repeating
patterns. Cool_Event_Widget is my attempt at this. It pretty much
works, but I have a feeling there's a be
TJG,
I am trying to save a file, it is working fine.
But if the file is not on the foreground while setting combo box directory,
changing the value in the combo box by setLookIn() appear on the foreground
window.
I am using following functionality to save the file.
def saveAsFile(file
On Jun 12, 9:36 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Paddy" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> |
> | Iam wondering why the peculiar behavior of map when the function in
> | given as None:
>
> The 'peculiar behavior' is the same as zip (except for padding sh
On Jun 12, 9:48 pm, Robert Kern <[EMAIL PROTECTED]> wrote:
> Paddy wrote:
> > On looking up map on Wikipedia there is no mention of this special
> > behaviour,
> > So my question is why?
>
> My question is why you are looking up the semantics of Python functions on
> Wikipedia instead of the Python
No help yet?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 12, 8:55 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
> And the OP's question was about map not being conforming to the
> definition on wikipedia - which I don't think it's not. It is not
> defined what map is to do with None (or NULL or nil or... ) as argument.
>
> Diez
Oh no!
Sorry
On Jun 13, 12:00 pm, "Alan J. Salmoni" <[EMAIL PROTECTED]> wrote:
> My question is how can my program be notified of a change to a class
> attribute that is a list?
You can't. But you can replace lists inside your class with a list
that notifies changes.
Something like this:
class NotifyingList(
You know these application like ICQ or winamp which stay at the front
of the desktop as long as the user doesn't minimize it. I wont to do
the same with my application in python.
I still didn't manage to make pywinauto to auto set my window frame in
focus reliability so I was hoping this will solv
Hello everyone,
I searched through groups to find an appropriate answer to this one
but could only find these which didn't meet my program's needs:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/53a0bfddeedf35b2/5e4b7119afa5f8df?lnk=gst&q=monitor+change+in+mutable#5e4b7119afa
OK it did worked!
I just should have been encoding to cp1255
search=cnrl.GetValue()
search= search.encode("cp1255")
cur.execute('select * from hebrew_words where word like ?',
['%'+search+'%'])
Thank you!
you are the best
--
http://mail.python.org/mailman/listinfo/python-list
Yes, it is 1255 it's surprising you know that.
any way this is the code I tried
search=cnrl.GetValue()
search= search.decode("cp1255")
search=search.encode("utf8")
word=''
category=1
cur.execute('select * from hebrew_words where word like ?',
[''+se
On Jun 12, 8:04 pm, Gandalf <[EMAIL PROTECTED]> wrote:
> now I understand my problem better so their is a good chance you
> manage to help me.
>
> I have a SQlite database full with ANSI Hebrew text , and program that
> uses WXpython
> Now, I use a- 'wx.TextCtrl' item to receive input from the user
On Jun 12, 8:06 pm, bvdp <[EMAIL PROTECTED]> wrote:
> dmitrey wrote:
> > hi all,
> > howto split string with both comma and semicolon delimiters?
>
> > i.e. (for example) get ['a','b','c'] from string "a,b;c"
>
> > I have tried s.split(',;') but it don't work
> > Thx, D.
>
> Howabout:
>
> s
#!python
"""
In the documentation for __del__ (under Python Language Reference/Data
Model), the following warning is indicated:
Warning [Caveat in 2.6]: Due to the precarious circumstances under
which __del__() methods are invoked, exceptions that occur during
their execution are ignored, and a w
David Hláčik wrote:
> Hello ,
> following scenario
>
> list_current = [ "welcome", "search", "done", "result"]
> list_ldap = [ "welcome", "hello"]
>
> result:
>
> list_toadd = [ "hello"]
>
> by words said , i want to check if list item from list_ldap exists in
> list_current if not i want to ad
On Jun 13, 4:31 am, "Sa¹a Bistroviæ" <[EMAIL PROTECTED]>
wrote:
> "Sa¹a Bistroviæ" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
>
>
> > Sa¹a Bistroviæ
> > Antuna Mihanviæa 13
> > 4 Ãakovec
> > Croatia
> > [EMAIL PROTECTED]
>
> > FPC: Exception : Unknown Run-Time err
> Just out of curiosity, what are the chances of this happening (sort of like
> what happened with sqlite)?
As a starting point, the author(s) of wxPython would need to contribute
it to Python (and then also give the PSF the permission to relicense
it). If no such contribution is made, chances ar
On Jun 11, 1:45 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Is it cursed upon? Didn't know that.
I didn't either. Until I asked some people how to do it, and was
admonished for even suggesting the concept.
> However, __import__ only gives you the topmost module - in your case myapp.
ah,
> Hello ,
> following scenario
>
> list_current = [ "welcome", "search", "done", "result"]
> list_ldap = [ "welcome", "hello"]
>
> result:
>
> list_toadd = [ "hello"]
>
> by words said , i want to check if list item from list_ldap exists in
> list_current if not i want to add it to list_toadd.
>
>
Hello ,
following scenario
list_current = [ "welcome", "search", "done", "result"]
list_ldap = [ "welcome", "hello"]
result:
list_toadd = [ "hello"]
by words said , i want to check if list item from list_ldap exists in
list_current if not i want to add it to list_toadd.
Thanks!
D.
--
http://m
On Thu, 12 Jun 2008 21:32:34 +, kj wrote:
> I'm sure this is a simple, but recurrent, problem for which I can't hit
> on a totally satisfactory solution.
>
> As an example, suppose that I want write a module X that performs some
> database access. I expect that 99.999% of the time, during th
I'm sure this is a simple, but recurrent, problem for which I can't
hit on a totally satisfactory solution.
As an example, suppose that I want write a module X that performs
some database access. I expect that 99.999% of the time, during
the foreseeable future, the database connection paramete
On Thu, 2008-06-12 at 20:57 +0200, Hrvoje Niksic wrote:
> Eric Jonas <[EMAIL PROTECTED]> writes:
>
> > I've done some benchmarking while attempting to serialize my (large)
> > graph data structure with cPickle; I'm seeing superlinear performance
> > (plotting it seems to suggest n^2 where n is th
Paddy wrote:
On looking up map on Wikipedia there is no mention of this special
behaviour,
So my question is why?
My question is why you are looking up the semantics of Python functions on
Wikipedia instead of the Python documentation. I don't see any particular
discussion of map() there at
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
| Iam wondering why the peculiar behavior of map when the function in
| given as None:
The 'peculiar behavior' is the same as zip (except for padding short
iterators versus truncating long iterators. Map was added years befo
ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.7.0-0.9.8h-1
An easy to install and use repackaged distribution
of the pyOpenSSL Python interf
Ian Kelly schrieb:
On Thu, Jun 12, 2008 at 1:32 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
Because it is undefined what should happen in case of no function given at
all - and because there is no identity function in python pre-defined, it
could be considered sensible to make None the quiva
The carbonbased lifeform Tim Roberts inspired comp.lang.python with:
> Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>>
>>Hmmm, 10,000,000 cycles (40 ms @2.5GHz) is nowhere near the ~90,000
>>second jump in time.clock() output reported by the OP. I wonder if
>>there could be a different cause?
>
> Ju
Ian Kelly wrote:
On Thu, Jun 12, 2008 at 1:05 PM, Paddy <[EMAIL PROTECTED]> wrote:
Iam wondering why the peculiar behavior of map when the function in
given as None:
Because that's the way it's always been! Seriously, I don't know. I
can tell you that it's going away in Python 3.0, though.
On Thu, Jun 12, 2008 at 1:32 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> Because it is undefined what should happen in case of no function given at
> all - and because there is no identity function in python pre-defined, it
> could be considered sensible to make None the quivalent of that fun
On Thu, Jun 12, 2008 at 1:05 PM, Paddy <[EMAIL PROTECTED]> wrote:
>
> Iam wondering why the peculiar behavior of map when the function in
> given as None:
Because that's the way it's always been! Seriously, I don't know. I
can tell you that it's going away in Python 3.0, though.
Ian
--
http://m
Paddy schrieb:
Iam wondering why the peculiar behavior of map when the function in
given as None:
Help on built-in function map in module __builtin__:
map(...)
map(function, sequence[, sequence, ...]) -> list
Return a list of the results of applying the function to the items
of
the
George Sakkis wrote:
You probably missed the point in the posted examples. A malicious user
doesn't need to modify your program code to have access to far more
than you would hope, just devise an appropriate string s and pass it
to your "safe" eval.
Oppps, I did miss the point. I was assuming
Paul McGuire <[EMAIL PROTECTED]> wrote:
> Instead of all that try/except noise, just use the new defaultdict:
>
> >>> from collections import defaultdict
> >>>
> >>> d = {'a' : 1, 'b' : 3, 'c' : 2,'d' : 3,'e' : 1,'f' : 4}
> >>>
> >>> dd = defaultdict(list)
> >>> for key, value in d.items():
> ..
If you are getting to the point where your data is large enough to
really care about the speed of cPickle, then maybe its time you moved
past pickles for your storage format? 2.5 includes sqlite, so you
could persist them in a nice, indexed table or something. Just a
suggestion.
On Jun 12
On Mon, 09 Jun 2008 10:48:03 -0700, disappearedng wrote:
> I know Python but not Perl, and I am interested in knowing which of
> these two are a better choice.
I'm partial to *Python*, but, the last time I looked, *urllib2* didn't
provide a time-out mechanism that worked under all circumstances.
On Jun 12, 1:51 pm, bvdp <[EMAIL PROTECTED]> wrote:
> 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
> re
dmitrey wrote:
hi all,
howto split string with both comma and semicolon delimiters?
i.e. (for example) get ['a','b','c'] from string "a,b;c"
I have tried s.split(',;') but it don't work
Thx, D.
Howabout:
s = s.replace(";", ",")
s = s.split(",")
--
http://mail.python.org/mail
Iam wondering why the peculiar behavior of map when the function in
given as None:
Help on built-in function map in module __builtin__:
map(...)
map(function, sequence[, sequence, ...]) -> list
Return a list of the results of applying the function to the items
of
the argument sequen
Eric Jonas <[EMAIL PROTECTED]> writes:
> I've done some benchmarking while attempting to serialize my (large)
> graph data structure with cPickle; I'm seeing superlinear performance
> (plotting it seems to suggest n^2 where n is the number of nodes of my
> graph), in the duration of the pickle.dum
now I understand my problem better so their is a good chance you
manage to help me.
I have a SQlite database full with ANSI Hebrew text , and program that
uses WXpython
Now, I use a- 'wx.TextCtrl' item to receive input from the user, and
when I try to search the database he don't understand this c
"Sa¹a Bistroviæ" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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.
> Pent
Hello,
I've done some benchmarking while attempting to serialize my (large)
graph data structure with cPickle; I'm seeing superlinear performance
(plotting it seems to suggest n^2 where n is the number of nodes of my
graph), in the duration of the pickle.dump calls and I can't quite
figure out wh
> howto split string with both comma and semicolon delimiters?
>
> i.e. (for example) get ['a','b','c'] from string "a,b;c"
>
> I have tried s.split(',;') but it don't work
A very pedestrian solution would be:
def multisplit( s, seps ):
words = [ ]
word = ''
for char in s:
if
dmitrey wrote:
hi all,
howto split string with both comma and semicolon delimiters?
i.e. (for example) get ['a','b','c'] from string "a,b;c"
I have tried s.split(',;') but it don't work
Thx, D.
--
http://mail.python.org/mailman/listinfo/python-list
The regular expression module has a split
On Jun 12, 4:14 pm, Gerhard Häring <[EMAIL PROTECTED]> wrote:
> 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
>
> >
hi all,
howto split string with both comma and semicolon delimiters?
i.e. (for example) get ['a','b','c'] from string "a,b;c"
I have tried s.split(',;') but it don't work
Thx, D.
--
http://mail.python.org/mailman/listinfo/python-list
In article
<[EMAIL PROTECTED]>,
Paul McGuire <[EMAIL PROTECTED]> wrote:
> 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 ha
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
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
"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
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
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]>,
"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
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
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
"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
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
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 "
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
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, 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
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
"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
"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
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
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/
"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
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
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
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
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
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
[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
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
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
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
> 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
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
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
> 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
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
"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]
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 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
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
1 - 100 of 162 matches
Mail list logo