Thanks a lot everyone. I appreciate your suggestion.
But still, I could not find a simple way using wordnet since each term
might have several part of speech and each one of them can have many
senses. What I want is simply the list of synonyms of each term with
their popularity score in English te
John Machin wrote:
>
>
> Avoid impolite astonishment; RTFloatingM instead:
> """
>
> HTH,
> John
> --
>
>
I guess the key here is that it is not an issue with Python, but C... can I
change 'the underlying C code?' if so, WFM should I read for that!? :p
--
View this message in context:
On Fri, Jun 13, 2008 at 9:27 PM, Ping Zhao <[EMAIL PROTECTED]> wrote:
> However, when I tried to rewrite them in short:
>
> header = struct.unpack('2s1i', self.__read(src, 6))
> ...
> It was weired that the required argument length increased to 8.
This is an alignment issue; if you don't specify a
On Fri, 13 Jun 2008 22:10:51 +0100, Ognjen Bezanov wrote:
> I am building an application using WxWidgets, and its job is to manage
> HTML data in a database. Now I need essentially a HTML editor that I can
> embed into my program, that will parse the HTML and allow the user to
> edit it.
How about
On Jun 14, 1:45 pm, "John [H2O]" <[EMAIL PROTECTED]> wrote:
> I have a script:
>
> from numpy import float
> OutD=[]
> v=['3','43','23.4','NaN','43']
> OutD.append([float(i) for i in v[1]])
>
> On linux:
> Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
> [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4
On Jun 13, 10:45 pm, "John [H2O]" <[EMAIL PROTECTED]> wrote:
> I have a script:
>
> from numpy import float
> OutD=[]
> v=['3','43','23.4','NaN','43']
> OutD.append([float(i) for i in v[1]])
>
> On linux:
> Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
> [GCC 4.1.3 20070929 (prerelease) (Ubuntu
On Jun 14, 12:25 pm, Phillip B Oldham <[EMAIL PROTECTED]>
wrote:
> What would be the optimal/pythonic way to subject an object to a
> number of tests (based on the object's attributes) and redirect
> program flow?
>
> Say I had the following:
>
> pets[0] = {'name': 'fluffy', 'species': 'cat', 'size
I have a script:
from numpy import float
OutD=[]
v=['3','43','23.4','NaN','43']
OutD.append([float(i) for i in v[1]])
On linux:
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
[EMAIL PROTECTED] analysis]$ python jnk.py
[[3.0,
What would be the optimal/pythonic way to subject an object to a
number of tests (based on the object's attributes) and redirect
program flow?
Say I had the following:
pets[0] = {'name': 'fluffy', 'species': 'cat', 'size': 'small'}
pets[1] = {'name': 'bruno', 'species': 'snake', 'size': 'small'}
Thanks for the info. That's working like a charm. Looks as though I'll
be able to handle all request types with that object.
I got a little worried then that the python dev's had missed something
truly important!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> As a new comer to Python I was wondering which is the best to start
> learning. I've read that a number of significant features have
> changed between the two versions. Yet, the majority of Python
> programs out in the world are 2.x and it would be nice to understand
>
>>
>>
>
> Please keep responses to python-list discussion on python-list, not my
> personal mail box. -- Thanks.
>
Sorry. When I hit "reply" on gmail to your message, your personal email
comes up as opposed to the python list address. My apologies for not
looking for closely.
> I'd suggest u
On Fri, 13 Jun 2008 21:59:06 +0530, srinivasan srinivas wrote:
> I am going to do some socket related programming in Python. Before that,
> I wish to know the Gotchas of Python Scoket Programming.
The only gotcha I see is that you won't want to go back to doing it in C.
--
09 F9 11 02 9D 74 E3
You have removed the "archive" attribute from the object to which the
> "Operations" name is referring to.
>
>>>> import Operations.archive
>>
>
> Python keeps a reference to all imported modules in sys.modules; if a
> module was already imported, any subsequent imports of the same module just
Dan Yamins wrote:
What is the principle behind this? And, is there some simple
way (other than restarting the interpreter) of "reloading"
that wipes out the old attributes associated with a given name
so that spurious attributes do not remain?
No.
Con
> checking for wchar.h... yes
> checking for wchar_t... yes
> checking size of wchar_t... configure: error: cannot compute sizeof (wchar_t)
>
> what can I do ?
Read config.log. If that doesn't help, use gcc.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 13 Jun 2008 20:01:56 -0300, Dan Yamins <[EMAIL PROTECTED]>
escribió:
I'm having a problem importing a package in python, deleting some of
what's
been imported, and then reimporting. (I'm the sure the problem is
trivial,
but I just don't understand it.)
I have a directory of pytho
[EMAIL PROTECTED] writes:
> file1.py
> --
> a = 20
> from abc import *
> print "Should this be printed when 'a' is alone imported from this
> module"
>
> file2.py
> --
> from file1 import a
> print a
>
> file2.py is used in a context where 'from abc import *' statement
> doesn't
On Jun 13, 11:38 am, Mike Kent <[EMAIL PROTECTED]> wrote:
> For Python 2.5 and new-style classes, what special method is called
> for mylist[2:4] = seq and for del mylist[2:4] (given that mylist is a
> list, and seq is some sequence)?
>
> I'm trying to subclass list, and I'm having trouble determin
En Fri, 13 Jun 2008 15:38:15 -0300, Mike Kent <[EMAIL PROTECTED]> escribió:
For Python 2.5 and new-style classes, what special method is called
for mylist[2:4] = seq and for del mylist[2:4] (given that mylist is a
list, and seq is some sequence)?
I'm trying to subclass list, and I'm having trou
Dan Yamins wrote:
I also have noticed another (to me) strange thing about module
imports. If anyone could explain this to me, that would be great (I
apologize if it's too elementary for this list.)
Suppose I have a module
#file: testmodule.py
a = 1
When importing this module, obviously
The only time I've ever pulled a HEAD request I've used the httplib
module directly. Ought to be able to do it like so:
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import h
In my attempt to learn python in a weekend, I've fallen foul at line
10 of my second scripting attempt. Basically I'm writing a simple
spider, but currently I'm unable to find any documentation on making
HEAD requests using the urllib2 library to test whether a file exists
on a remote webserver.
I
I also have noticed another (to me) strange thing about module imports. If
anyone could explain this to me, that would be great (I apologize if it's
too elementary for this list.)
Suppose I have a module
#file: testmodule.py
a = 1
When importing this module, obviously 'a' becomes an attrib
On Jun 13, 5:04 pm, [EMAIL PROTECTED] wrote:
> As a new comer to Python I was wondering which is the best to start
> learning. I've read that a number of significant features have
> changed between the two versions. Yet, the majority of Python
> programs out in the world are 2.x and it would be
On Jun 13, 5:52 pm, [EMAIL PROTECTED] wrote:
> file1.py
> --
> a = 20
> from abc import *
> print "Should this be printed when 'a' is alone imported from this
> module"
>
> file2.py
> --
> from file1 import a
> print a
>
> (snipped)
>
> Of course, the option of using if __name__ ==
I'm having a problem importing a package in python, deleting some of what's
been imported, and then reimporting. (I'm the sure the problem is trivial,
but I just don't understand it.)
I have a directory of python modules called Operations. It contains a
python module called archive.py.Here's
On Jun 11, 1:10 pm, 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 (
[EMAIL PROTECTED] wrote:
> As a new comer to Python I was wondering which is the best to start
> learning. I've read that a number of significant features have
> changed between the two versions. Yet, the majority of Python
> programs out in the world are 2.x and it would be nice to understand
>
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| As a new comer to Python I was wondering which is the best to start
| learning. I've read that a number of significant features have
| changed between the two versions. Yet, the majority of Python
| programs out in the world are 2.x
"kj" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| I'm downloading some very large tables from a remote site. I want
| to sort these tables in a particular way before saving them to
| disk. In the past I found that the most efficient way to do this
| was to piggy-back on Unix's
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
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?
Accordin
file1.py
--
a = 20
from abc import *
print "Should this be printed when 'a' is alone imported from this
module"
file2.py
--
from file1 import a
print a
file2.py is used in a context where 'from abc import *' statement
doesn't make sense but it can make sense of (and requires) 'a'
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Is there anyway one could find ot the point of intersection between
| any two plotted functions
Assume you have sequence xi, yi, zi, where yi and zi are function values
corresponding to xi. In general, you will never have exact inter
paramiko is an ssh module
On Fri, Jun 13, 2008 at 2:49 PM, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> "Praveena B" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> when i used paramiko in python2.5 i got the error below.
> File "C:\praveena\python scripts\sshlib\ssh.py", line 5, i
Hi,
when I run configure, it fails at:
checking for wchar.h... yes
checking for wchar_t... yes
checking size of wchar_t... configure: error: cannot compute sizeof (wchar_t)
what can I do ?
Thanks,
Mathieu
--
http://mail.python.org/mailman/listinfo/python-list
"> 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 any situation where a metaclass would be its
> own metaclass except for 'type' itself, but then I think I've got a
>
On 13 Jun, 23:09, "bruce" <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply. Came to the same conclusion a few minutes before I saw
> your email.
>
> Another question:
>
> tr=d.xpath(foo)
>
> gets me an array of nodes.
>
> is there a way for me to then iterate through the node tr[x] to see if a
>
On Jun 13, 4:13 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Jun 13, 4:04 pm, [EMAIL PROTECTED] wrote:
>
> > As a new comer to Python I was wondering which is the best to start
> > learning. I've read that a number of significant features have
> > changed between the two versions. Yet, the majo
On Jun 13, 4:04 pm, [EMAIL PROTECTED] wrote:
> As a new comer to Python I was wondering which is the best to start
> learning. I've read that a number of significant features have
> changed between the two versions. Yet, the majority of Python
> programs out in the world are 2.x and it would be n
Hello Everyone!
I am building an application using WxWidgets, and its job is to manage
HTML data in a database. Now I need essentially a HTML editor that I can
embed into my program, that will parse the HTML and allow the user to
edit it.
Many of these 'WYSIWYG' HTML editors exist for other lang
Hi Paul...
Thanks for the reply. Came to the same conclusion a few minutes before I saw
your email.
Another question:
tr=d.xpath(foo)
gets me an array of nodes.
is there a way for me to then iterate through the node tr[x] to see if a
child node exists???
"d" is a document object, while "tr" w
As a new comer to Python I was wondering which is the best to start
learning. I've read that a number of significant features have
changed between the two versions. Yet, the majority of Python
programs out in the world are 2.x and it would be nice to understand
those as well. Thanks for all the
Thanks for all the suggestions. I have eventually used a heavily
edited version of ExeMaker which seems to do what I want.
Geoff
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Jun 13, 2008 at 2:00 PM, Terry Reedy <[EMAIL PROTECTED]> wrote:
> filter(None, iterable) works the same way: None-> identity function,
> The immediate reason is the Python has no builtin id().
> But apparently there is also historical precedent in the functional
> community for this convent
On Jun 13, 3:49 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Praveena B" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> when i used paramiko in python2.5 i got the error below.
> File "C:\praveena\python scripts\sshlib\ssh.py", line 5, in
> import paramiko
...
> from osrandom
"David C. Ullrich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| In article
| <[EMAIL PROTECTED]>,
| Paddy <[EMAIL PROTECTED]> wrote:
|
| > True, but None is not a function. It's a sentinel value to turn on the
| > functionality.
|
| Uh, thanks. I think I knew that - I was just su
"Praveena B" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
when i used paramiko in python2.5 i got the error below.
File "C:\praveena\python scripts\sshlib\ssh.py", line 5, in
import paramiko
File "C:\Python25\Lib\site-packages\paramiko\__init__.py", line 69, in
from transport im
On 13 Jun, 20:10, "bruce" <[EMAIL PROTECTED]> wrote:
>
> url ="http://www.pricegrabber.com/rating_summary.php/page=1";
[...]
> tr =
> "/html/body/[EMAIL PROTECTED]'pgSiteContainer']/[EMAIL
> PROTECTED]'pgPageContent']/table[2]/tbo
> dy/tr[4]"
>
> tr_=d.xpath(tr)
[...]
> my issu
On Jun 13, 8:11 am, [EMAIL PROTECTED] wrote:
> 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 th
For Python 2.5 and new-style classes, what special method is called
for mylist[2:4] = seq and for del mylist[2:4] (given that mylist is a
list, and seq is some sequence)?
I'm trying to subclass list, and I'm having trouble determining what
special methods I have to override in my class for the abo
On 13 Giu, 07:42, Alexnb <[EMAIL PROTECTED]> 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 isn't good at all. If it helps at all I am using a Tkinter,
> but that probab
BeautifulSoup is a pretty nice python module for screen scraping (not
necessarily well formed) web pages.
On Fri, 13 Jun 2008 11:10:09 -0700, bruce wrote:
> Hi...
>
> got a short test app that i'm playing with. the goal is to get data off
> the page in question.
>
> basically, i should be abl
On Fri, 13 Jun 2008 17:54:32 +, kj wrote:
> I'm downloading some very large tables from a remote site. I want to
> sort these tables in a particular way before saving them to disk. In
> the past I found that the most efficient way to do this was to
> piggy-back on Unix's highly optimized sor
On Fri, 13 Jun 2008 21:59:06 +0530, srinivasan srinivas wrote:
> Hi,
> I am going to do some socket related programming in Python. Before that,
> I wish to know the Gotchas of Python Scoket Programming. Can anyone send
> me any link that satisfies my needs?? Thanks,
> Srini
>
>
> Explore y
Is there a Python programmer living near Bend Oregon that I could call via
phone & ask some questions on how they accomplish certain tasks? I’ve been
programming using several languages for over fifty years, but am unable to get
Python to due what I would like to do! Papa Jackson
From: [EMAIL
there is this good link for explanation on how sockets work,
http://www.tutorialgrub.com/tutorials/Python/Development/Socket-Programming-HOWTO_325.html
--
http://mail.python.org/mailman/listinfo/python-list
So i have a mac and pc, and just found out that os.startfile() doesn't work
on a mac. So is there anything like that besides os.system()?
--
View this message in context:
http://www.nabble.com/os.startfile%28%29-on-a-mac-tp17829335p17829335.html
Sent from the Python - python-list mailing list a
Hi...
got a short test app that i'm playing with. the goal is to get data off the
page in question.
basically, i should be able to get a list of "tr" nodes, and then to
iterate/parse them. i'm missing something, as i think i can get a single
node, but i can't figure out how to display the content
I'm downloading some very large tables from a remote site. I want
to sort these tables in a particular way before saving them to
disk. In the past I found that the most efficient way to do this
was to piggy-back on Unix's highly optimized sort command. So,
from within a Perl script, I'd creat
On Jun 13, 1:12 pm, jzakiya <[EMAIL PROTECTED]> wrote:
> This is to announce the release of my paper "Ultimate Prime Sieve --
> Sieve of Zakiiya (SoZ)" in which I show and explain the development of
> a class of Number Theory Sieves to generate prime numbers. I used
> Ruby 1.9.0-1 as my developme
En Fri, 13 Jun 2008 08:55:30 -0300, Pau Freixes <[EMAIL PROTECTED]>
escribió:
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
Exactly.
--
Gabriel Genellina
--
This is to announce the release of my paper "Ultimate Prime Sieve --
Sieve of Zakiiya (SoZ)" in which I show and explain the development of
a class of Number Theory Sieves to generate prime numbers. I used
Ruby 1.9.0-1 as my development environment on a P4 2.8 Ghz laptop.
You can get the pdf of
Ping Zhao wrote:
> I am writing a small program to decode MS bitmap image. When I use
> statements as follow, it works fine:
>
> header['sig'] = str(struct.unpack('2s', self.__read(src, 2))[0])
> header['len'] = int(struct.unpack('1i', self.__read(src, 4))[0])
>
> However, when I tried to rewr
In article
<[EMAIL PROTECTED]>,
Paddy <[EMAIL PROTECTED]> wrote:
> 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
Sengly wrote:
> Thank you. I have tried but no luck :(
NLTK, maybe? Searching for "synonym" within nltk.org gives
http://nltk.org/doc/en/words.html
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 13, 8:07 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> 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 udn
Le Friday 13 June 2008 18:55:24 Maric Michaud, vous avez écrit :
> > approximately the double amount of memory compared to the other.
>
> I don't see how you came to this conclusion. Are you sure the extra list
> take twice more memory than the extra dictionary ?
twice less, I meant, of course...
Hello,
Le Friday 13 June 2008 17:55:44 Karsten Heymann, vous avez écrit :
> Maric Michaud <[EMAIL PROTECTED]> writes:
> > So, writing C in python, which has dictionnary as builtin type,
> > should be considered "more elegant" ?
>
> IMO that's a bit harsh.
>
harsh ? Sorry, I'm not sure to understa
Hi,
Le Friday 13 June 2008 18:29:06 srinivasan srinivas, vous avez écrit :
> Hi,
> I am going to do some socket related programming in Python. Before that, I
> wish to know the Gotchas of Python Scoket Programming. Can anyone send me
> any link that satisfies my needs??
Yes, the friendly manual :
I wrote a script(1) replacement in python (http://stromberg.dnsalias.org/
~dstromberg/pypty/), but I'm encountering a problem in it.
I think I know the solution to the problem, but I'd've thought python was
high level enough that this solution isn't required, so I wanted to
inquire about it her
I also agree with your point on concatting. I used that syntax because it
seemed more clear, given the already awkward syntax.
And while the original motivation of namedtuple might be to avoid having to
make a class or subclass, subclasses have already emerged even within the
standard library (se
Hi,
I am going to do some socket related programming in Python. Before that, I wish
to know the Gotchas of Python Scoket Programming.
Can anyone send me any link that satisfies my needs??
Thanks,
Srini
Explore your hobbies and interests. Go to
http://in.promos.yahoo.com/groups/
--
http://
On Jun 13, 12:19 pm, Calvin Spealman <[EMAIL PROTECTED]>
wrote:
> On Jun 13, 2008, at 11:56 AM, [EMAIL PROTECTED] wrote:
>
>
>
> > On Jun 13, 11:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
> >>> On Jun 13, 11:21 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> w
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I am writing a small program to decode MS bitmap image. When I use statements
as follow, it works fine:
header['sig'] = str(struct.unpack('2s', self.__read(src, 2))[0])
header['len'] = int(struct.unpack('1i', self.__read(src, 4))[0])
However,
On Jun 13, 2008, at 11:56 AM, [EMAIL PROTECTED] wrote:
On Jun 13, 11:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
[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 cre
On Jun 13, 12:03 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > Thank you, this is much closer to where I need to be...
>
> > The issue is (and this is the part that you don't know, because I
> > didn't tell you!) is that I later need to call methods on
> > "self.checkbox1", for instance:
>
On Jun 13, 2008, at 11:17 AM, Jason R. Coombs wrote:
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.__cl
Thank you. I have tried but no luck :(
Regards,
Sengly
--
http://mail.python.org/mailman/listinfo/python-list
It means your client received a TCP segment with the reset bit sent.
The 'peer' will toss one your way if it determines that a connection
is no longer valid or if it receives a bad sequence number. If I had
to hazard a guess, I'd say it's probably a network device on the
server side trying to stop
In <[EMAIL PROTECTED]> =?iso-8859-1?q?Robin_K=E5veland?= Hansen <[EMAIL
PROTECTED]> writes:
>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 w
Thank you, this is much closer to where I need to be...
The issue is (and this is the part that you don't know, because I
didn't tell you!) is that I later need to call methods on
"self.checkbox1", for instance:
self.checkbox1.GetValue()
to determine if the box is checked or not.
I should hav
Hi Maric,
Maric Michaud <[EMAIL PROTECTED]> writes:
> So, writing C in python, which has dictionnary as builtin type,
> should be considered "more elegant" ?
IMO that's a bit harsh.
> You are comparing apples with lemons, there is no such a difference
> between list index access and dictionnary
On Jun 13, 11:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [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 = ...
Johannes Bauer wrote:
> I'm trying to initialize a connection to a PG database. So help(pgdb)
> says:
>
> pgdb.connect(connect_string) -> connection
> connect_string = 'host:database:user:password:opt:tty'
> All parts are optional. You may also pass host through
>
[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, on
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
> -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):
>
> -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
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 (ve
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 = int(
On Jun 13, 3:19 pm, Bruno Desthuilliers 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 the community'
[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 can
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 __r
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
but
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
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 bot
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
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
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 - 100 of 175 matches
Mail list logo