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
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
[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
want
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
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 seconds is still a
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__
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 like
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
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 module
combine.show_plots([(2,3), (4,8), (5,9), (6,2)], [(1,7), (3,3),
(4,5), (5,6)],
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]
On 15:11, giovedì 12 giugno 2008 Dennis Lee Bieber wrote:
Word spaced line justification is only feasible if one is using a
fixed width font and have a line length defined in characters/line.
===8==8==8==8==8==8==8==8==8==8
line= 'fixed width font and have
Duncan Booth a écrit :
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
http://bugs.python.org/issue1097597
in my python 2.5.2, i still find these code in SimpleHTTPServer.py,
is that deliberate?
ctype = self.guess_type(path)
if ctype.startswith('text/'):
mode = 'r'
else:
mode = 'rb'
try:
f =
En Thu, 12 Jun 2008 12:38:34 -0300, Sa¹a Bistroviæ
[EMAIL PROTECTED] escribió:
FPC: Exception : Unknown Run-Time error : 210
Wrong list... you are probably looking for
http://lists.freepascal.org/mailman/listinfo/fpc-pascal/
--
Gabriel Genellina
--
On 14:49, giovedì 12 giugno 2008 Chris wrote:
You should strip all extraneous white space from code though.
For my taste, trailing spaces will be removed by my editor (Kate :) )
Other space tabulators are an issue which won't suite my needs.
--
Mailsweeper Home :
You can think of doing with import time module and time.sleep(n) but
you have to calculate n in seconds.
Subhabrata.
Alexnb wrote:
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
Dear Members of the group,
I have a small question, if you can help me to find the answer.
I have one function:
def add_string(n):
print “Print Two strings”
print “Print the First String”
a1=raw_input(“PRINT THE FIRST STRING”)
a2=raw_input(“PRINT THE SECOND STRING”)
Hi,
I am new to python.I have installed Biopython in Windows.I am working
using IDLE.When I want to get structure of local pdb file it is showing
error that no such file or directory.Can anybody tell what is the
problem.
--
This message has been scanned for viruses and
dangerous content by
[EMAIL PROTECTED] wrote:
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 module
combine.show_plots([(2,3), (4,8), (5,9), (6,2)],
Islam is a nice religion if you read The quran. Militancy is their in
every religion. But unfortunately, Islam is getting a bad name. It is
good to see that some one like you is trying to let us know the good
part of it. But this may not be a room for that. You might have been
wrongly directed
On Jun 13, 12:13 pm, Peter Otten [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
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,
You can see the file whether it is loaded in C:\Python and you entered
it correctly. Problem should not occur.
Else you may refer Python docs for Error and Exception handling.
Regs,
Subhabrata.
[EMAIL PROTECTED] wrote:
Hi,
I am new to python.I have installed Biopython in Windows.I am working
En Fri, 13 Jun 2008 01:55:58 -0300, gopal mishra [EMAIL PROTECTED]
escribió:
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'm pleased to announce pdfposter 0.4.2, a tool to scale and tile PDF
images/pages to print on multiple pages.
http://pdfposter.origo.ethz.ch/download/
This version fixes a view minor bugs
- some media-/poster-sizes (eg. Letter) have not beeb recogniced
- some PDF files crashed the tool.
when i used paramiko in python2.5 i got the error below.
File C:\praveena\python scripts\sshlib\ssh.py, line 5, in module
import paramiko
File C:\Python25\Lib\site-packages\paramiko\__init__.py, line 69, in
module
from transport import randpool, SecurityOptions, Transport
File
Hi,
while testing my program I found some strange happening with pdb and pydb.
I like pydb because let me restart the program and nicer features, but if
errors pop up, then it will forget all variables (globals and locals gone).
I've to go for pdb because it isn't affected by that problem, but
En Fri, 13 Jun 2008 02:42:53 -0300, Alexnb [EMAIL PROTECTED] escribió:
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
Hello,
I read some files name from a directory and then I put these name in a
list. I will check whether it is empty or not, and I would do it with
an exception. With if statement it is very simple:
If list_of_files != :# this can be if list_of_files !=
[]:
get the files
elas:
Thanks guys. Those comments are really helpful. The odd semi-colon is
my PHP background. Will probably be a hard habbit to break, that
one! ;) If I do accidentally drop a semi-colon at the end of the line,
will that cause any weird errors?
Also, Chris, can you explain this:
a, b = line.split(':
eGenix Team: M.-A. Lemburg wrote:
ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.7.0-0.9.8h-1
An easy to install and use repackaged distribution
[EMAIL PROTECTED] wrote:
Tried that out too. No error however, best fit lines still not being
made on the graph. Only the 3 plot lines show up.
Sorry, I don't know gnuplot, so I can't help you with any but the obvious
(read: Python) errors.
Peter
--
[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 Gnuplot
def plot(original,
On Jun 13, 9:38 am, Phillip B Oldham [EMAIL PROTECTED] wrote:
Thanks guys. Those comments are really helpful. The odd semi-colon is
my PHP background. Will probably be a hard habbit to break, that
one! ;) If I do accidentally drop a semi-colon at the end of the line,
will that cause any weird
Phillip B Oldham a écrit :
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,
John Machin sjmachin at lexicon.net writes:
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
Hi
Let your 2 functions be f(x) and g(x). Then you have to solve the
equation f(x) = g(x).
For some functions it will be easier to determine intervals of the
real line where f(x)-g(x) 0 and where f(x)-g(x) 0 and to find an
interval in which the 2 intersect, which would probably be good enough
TheSaint a écrit :
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
[EMAIL PROTECTED] wrote:
Still confused though i get the instance part ur trying to tell me.
Tried that out too. No error however, best fit lines still not being
made on the graph. Only the 3 plot lines show up.
Gave it another shot. You might want something like
from __future__ import
I'm sure I'll soon figure out how to find these things out for myself,
but I'd like to get the community's advice on something.
I'm going to throw together a quick project over the weekend: a
spider. I want to scan a website for certain elements.
I come from a PHP background, so normally I'd:
-
Chris wrote:
On Jun 13, 9:38 am, Phillip B Oldham [EMAIL PROTECTED] wrote:
Thanks guys. Those comments are really helpful. The odd semi-colon is
my PHP background. Will probably be a hard habbit to break, that
one! ;) If I do accidentally drop a semi-colon at the end of the line,
will that
HI all, I'm a bit stuck with how to work out boolian logic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't seem to get my head around it. I'm
pretty sure I need to know what is calulated first i.e the
En Fri, 13 Jun 2008 04:02:48 -0300, Leo Jay [EMAIL PROTECTED]
escribió:
http://bugs.python.org/issue1097597
in my python 2.5.2, i still find these code in SimpleHTTPServer.py,
is that deliberate?
According to http://bugs.python.org/issue839496 it should have been
corrected, but
On 2008-06-13 09:39, Helmut Jarausch wrote:
eGenix Team: M.-A. Lemburg wrote:
ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.7.0-0.9.8h-1
An easy to
if a != b and a != c and a != d:
doStuff()
else:
doOtherStuff()
Cheers,
Drea
HI all, I'm a bit stuck with how to work out boolian logic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't
En Fri, 13 Jun 2008 04:37:44 -0300, Nader [EMAIL PROTECTED] escribió:
Hello,
I read some files name from a directory and then I put these name in a
list. I will check whether it is empty or not, and I would do it with
an exception. With if statement it is very simple:
If list_of_files != :
marc wyburn wrote:
HI all, I'm a bit stuck with how to work out boolian logic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't seem to get my head around it. I'm
pretty sure I need to know what is
On 13 Jun, 10:34, Aidan [EMAIL PROTECTED] wrote:
marc wyburn wrote:
HI all, I'm a bit stuck with how to work outboolianlogic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't seem to get my
marc wyburn wrote:
HI all, I'm a bit stuck with how to work out boolian logic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't seem to get my head around it. I'm
pretty sure I need to know what is
En Fri, 13 Jun 2008 06:15:52 -0300, marc wyburn
[EMAIL PROTECTED] escribió:
HI all, I'm a bit stuck with how to work out boolian logic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't seem to get my
On 2008-06-13 11:27, eGenix Team: M.-A. Lemburg wrote:
On 2008-06-13 09:39, Helmut Jarausch wrote:
eGenix Team: M.-A. Lemburg wrote:
ANNOUNCING
eGenix.com pyOpenSSL Distribution
On Jun 13, 11:34 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Fri, 13 Jun 2008 04:37:44 -0300, Nader [EMAIL PROTECTED] escribió:
Hello,
I read some files name from a directory and then I put these name in a
list. I will check whether it is empty or not, and I would do it with
an
Got the problem solved finally. Missed out theses two lines:
plot1 = Gnuplot.PlotItems.Data(original, title=Original)
plot2 = Gnuplot.PlotItems.Data(expected, title=Expected)
plot3 = Gnuplot.PlotItems.Data(actual, title=Acutal)
plot4 = Gnuplot.PlotItems.Func('%f *
marc wyburn schreef:
HI all, I'm a bit stuck with how to work out boolian logic.
I'd like to say if A is not equal to B, C or D:
do something.
I've tried
if not var == A or B or C:
and various permutations but can't seem to get my head around it. I'm
pretty sure I need to know what is
if var not in (A, B, C):
do_something()
And this is why I love python.
--
http://mail.python.org/mailman/listinfo/python-list
Couple of things, Gopal, which you might want to remember
when posting to mailing lists etc. One is that it's *much* better
(and more considerate) to post in plain text, not in HTML. (You
should be able to tell Outlook to use plain text). *Especially* when
posting code. And even *more*
TheSaint [EMAIL PROTECTED] writes:
Hi,
while testing my program I found some strange happening with pdb and pydb.
I like pydb because let me restart the program and nicer features, but if
errors pop up, then it will forget all variables (globals and locals gone).
I'm not completely sure
On Jun 13, 6:23 pm, anton [EMAIL PROTECTED] wrote:
John Machin sjmachin at lexicon.net writes:
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
[EMAIL PROTECTED] schrieb:
Dear Members of the group,
I have a small question, if you can help me to find the answer.
I have one function:
def add_string(n):
print “Print Two strings”
print “Print the First String”
a1=raw_input(“PRINT THE FIRST STRING”)
On Thu, 12 Jun 2008 12:05:02 -0700 (PDT), Paddy
[EMAIL PROTECTED] wrote:
Iam wondering why the peculiar behavior of map when the function in
given as None:
If you start with a value x and then apply no function
at all to it, what results is x.
Help on built-in function map in module
Hi,
When you say this C extensions (usually) release the GIL when they don't
call into any Python code do you talk about this macros ?
Py_BEGIN_ALLOW_THREADS
Py_END_ALLOW_THREADS
On Wed, Jun 11, 2008 at 3:52 AM, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Mon, 09 Jun 2008 15:26:09 -0300,
I am not going to reverse engineer your code, but it looks like your
writing your own least-squares fitting algorithm and doing some simple
plots. Also, from your many posts last days, it looks like you are a
newbie struggling with a python interface to gnuplot.
May I suggest that you have a look
Phillip B Oldham wrote:
I'm going to throw together a quick project over the weekend: a
spider. I want to scan a website for certain elements.
I come from a PHP background, so normally I'd:
- throw together a quick REST script to handle http request/responses
Use the urllib/urllib2 module
On Fri, 13 Jun 2008 10:19:38 +0200
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Ok, since you asked for it, let's go:
Good commentary. One small improvement:
REC_CLEANERS = {
'.net' : clean_net,
'.com' : clean_com,
'.tv' : clean_net,
'.uk' : clean_co_uk,
(etc...)
}
Hi Mark,
Mark [EMAIL PROTECTED] writes:
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
On Fri, Jun 13, 2008 at 2:12 PM, Karsten Heymann
[EMAIL PROTECTED] wrote:
Although your problem has already been solved, I'd like to present a
different approach which can be quite a bit faster. The most common
approach seems to be using a dictionary:
summed_up={}
for user,vote in pairs:
On Thu, Jun 12, 2008 at 3:48 PM, 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 3
4
Greetings *.*:
The following program caused an error and puzzled me to no end. Any help
immensely appreciated.
(Thanks)^2
- Yet Another Dummy Python User
(Python version:
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
)
BJörn Lindqvist wrote:
[...]
Here is another solution:
from itertools import groupby
from operator import itemgetter
users = [1, 1, 1, 2, 2, 3, 4, 4, 4]
scores = [0, 1, 5, 3, 1, 2, 3, 3, 2]
for u, s in groupby(zip(users, scores), itemgetter(0)):
print u, sum(y for x, y in s)
Except that
On Jun 12, 11:04 pm, Gandalf [EMAIL PROTECTED] wrote:
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
On Jun 13, 9:34 am, Hyuga [EMAIL PROTECTED] wrote:
On Jun 12, 11:04 pm, Gandalf [EMAIL PROTECTED] wrote:
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
Good day,
I just installed pyinotify on my gentoo box.
When I test the library through pyinotify.pv -v /tmp under root,
everything works great, but when I try the same thing under my local
user account, I receive the following error:
Error: cannot watch . (WD=-1)
Not very helpful. I've tried
On Jun 12, 4:11 am, 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 I want \ while I
On Jun 12, 10:04 pm, Gandalf [EMAIL PROTECTED] wrote:
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
Hi,
I'm new to Python and I need to do the following:
from this: s = 978654321
to this : [978, 654, 321]
Any help is appreciated
Thanks,
Eric
--
http://mail.python.org/mailman/listinfo/python-list
Hi Björn,
BJörn Lindqvist [EMAIL PROTECTED] writes:
On Fri, Jun 13, 2008 at 2:12 PM, Karsten Heymann
[EMAIL PROTECTED] wrote:
summed_up={}
for user,vote in pairs:
if summed_up.has_key(user):
summed_up[user]+=vote
else:
summed_up[user]=vote
You'll save even more by using:
if
Hi,
I have a small Python script to fetch some pages from the internet.
There are a lot of pages and I am looping through them and then
downloading the page using urlretrieve() in the urllib module.
The problem is that after 110 pages or so the script sort of hangs and
then I get the following
On Jun 13, 3:15 pm, ericdaniel [EMAIL PROTECTED] wrote:
Hi,
I'm new to Python and I need to do the following:
from this: s = 978654321
to this : [978, 654, 321]
What are your criteria for splitting this string? Every 3 characters?
If there isn't an even multiple of 3, which group
On Jun 13, 4:15 pm, ericdaniel [EMAIL PROTECTED] wrote:
Hi,
I'm new to Python and I need to do the following:
from this: s = 978654321
to this : [978, 654, 321]
Any help is appreciated
Thanks,
Eric
What you could do is iterate over the string appending the characters
1 at a
ericdaniel wrote:
I'm new to Python and I need to do the following:
from this: s = 978654321
to this : [978, 654, 321]
Use a loop:
s = 978654321
items = []
for start in range(0, len(s), 3):
... items.append(s[start:start+3])
...
items
['978', '654', '321']
or a list
Hello group,
I've run into a small problem with pgdb which is actually not PostgreSQL
specific - I just do not understand the Python syntax at one point.
I'm trying to initialize a connection to a PG database. So help(pgdb) says:
pgdb.connect(connect_string) - connection
On Jun 14, 12:15 am, ericdaniel [EMAIL PROTECTED] wrote:
Hi,
I'm new to Python and I need to do the following:
from this: s = 978654321
to this : [978, 654, 321]
Any help is appreciated
Homework?
Have you read the Python tutorial (section 3.1.2 Strings)?
--
Hi Chris,
Thank you very much, that was exactly what I needed.
Eric
On Jun 13, 9:29 am, Chris [EMAIL PROTECTED] wrote:
On Jun 13, 4:15 pm, ericdaniel [EMAIL PROTECTED] wrote:
Hi,
I'm new to Python and I need to do the following:
from this: s = 978654321
to this : [978, 654,
On Jun 13, 4:21 pm, [EMAIL PROTECTED] wrote:
Hi,
I have a small Python script to fetch some pages from the internet.
There are a lot of pages and I am looping through them and then
downloading the page using urlretrieve() in the urllib module.
The problem is that after 110 pages or so the
Hi list,
I'm thinking to spend my last credits* into my Universitiy writing a
unofficial and brief python internal paper. I'm crasy love with Python, non
only because it's a stupidly easy language, because when I'm programming I
have the opportunity to think how is implemented :)
My idea is
On Jun 13, 12:49 pm, David C. Ullrich [EMAIL PROTECTED] wrote:
On Thu, 12 Jun 2008 12:05:02 -0700 (PDT), Paddy
[EMAIL PROTECTED] wrote:
Iam wondering why the peculiar behavior of map when the function in
given as None:
If you start with a value x and then apply no function
at all to it,
On Jun 13, 1:12 pm, Karsten Heymann [EMAIL PROTECTED]
wrote:
Hi Mark,
Mark [EMAIL PROTECTED] writes:
I have a scenario where I have a list like this:
UserScore
1 0
1 1
1 5
2 3
2 1
3
for i in xrange(0, len(texts)):
texts[i] = yes
for i in texts:
i = no
why is the first one working but not the second. i mean i see why the
firts one works but i dont udnerstand why the second doesnt.
--
http://mail.python.org/mailman/listinfo/python-list
cirfu schrieb:
for i in xrange(0, len(texts)):
texts[i] = yes
for i in texts:
i = no
why is the first one working but not the second. i mean i see why the
firts one works but i dont udnerstand why the second doesnt.
Because in the second you only bind the contents of texts to a
On Jun 12, 10:10 pm, John Salerno [EMAIL PROTECTED] wrote:
Phillip B Oldham [EMAIL PROTECTED] wrote in messagenews:[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
Le Friday 13 June 2008 14:12:40 Karsten Heymann, vous avez écrit :
Hi Mark,
Mark [EMAIL PROTECTED] writes:
I have a scenario where I have a list like this:
User Score
1 0
1 1
1 5
2 3
2 1
I have twenty-five checkboxes I need to create (don't ask):
self.checkbox1 = ...
self.checkbox2 = ...
.
.
.
self.checkbox25 = ...
Right now, my code has 25 lines in it, one for each checkbox, since
these are all variables.
Is there a way to write a loop so that I can have fewer lines of code
I see a new function in (python 2.6) lib/collections called
namedtuple. This is a great function. I can see many places in my
code where this will be immensely useful.
I have a couple of suggestions.
My first suggestion is to use self.__class__.__name__ instead of the
hard-coded typename in
[EMAIL PROTECTED] schrieb:
I have twenty-five checkboxes I need to create (don't ask):
self.checkbox1 = ...
self.checkbox2 = ...
.
.
.
self.checkbox25 = ...
Right now, my code has 25 lines in it, one for each checkbox, since
these are all variables.
Is there a way to write a loop so that I
On Jun 13, 3:19 pm, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
Phillip B Oldham a écrit :
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
Hi,
Le Friday 13 June 2008 15:24:31 Dummy Pythonese Luser, vous avez écrit :
Greetings *.*:
The following program caused an error and puzzled me to no end. Any help
immensely appreciated.
class Second(First):
def __init__(self, datestr):
y = int(datestr[0:4])
m =
Paddy [EMAIL PROTECTED] writes:
How does your solution fare against the defaultdict solution of:
d = collections.defaultdict(int)
for u,s in zip(users,score): d[u] += s
list: 0.931s
dict + in: 1.495s
defaultdict : 1.991s
dict + if: ~2s
dict + try: ~4s
I've posted the (very rough)
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of Diez B. Roggisch
Sent: Friday, June 13, 2008 11:21 AM
To: python-list@python.org
Subject: Re: Iterate creating variables?
[EMAIL PROTECTED] schrieb:
I have twenty-five checkboxes I need
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, June 13, 2008 11:11 AM
To: python-list@python.org
Subject: Iterate creating variables?
I have twenty-five checkboxes I need to create (don't ask):
On Jun 13, 11:21 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] schrieb:
I have twenty-five checkboxes I need to create (don't ask):
self.checkbox1 = ...
self.checkbox2 = ...
.
.
.
self.checkbox25 = ...
Right now, my code has 25 lines in it, one for each
[EMAIL PROTECTED] schrieb:
On Jun 13, 11:21 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] schrieb:
I have twenty-five checkboxes I need to create (don't ask):
self.checkbox1 = ...
self.checkbox2 = ...
.
.
.
self.checkbox25 = ...
Right now, my code has 25 lines in it, one
1 - 100 of 257 matches
Mail list logo