Hello i have been working on an interactive programme,i wish to use a small
amount of Tk.Which i have taken from a tutorial.
from Tkinter import *
root = Tk()
w =Label(root, text="Congratulations you have made it this far,just a few more
questions then i will be asking you some")
w.pack()
root.ma
Ben Finney <[EMAIL PROTECTED]> wrote:
> "James Thiele" <[EMAIL PROTECTED]> writes:
>
> > I'd like to access the name of a function from inside the function.
>
> A function, like most other objects in Python, can have any number of
> names bound to it without the object being informed. Any of tho
I am pleased to announce a new release of InformixDB, the DB-API 2.0 module
for connecting to IBM Informix database engines.
Changes since version 2.1:
- Support for BOOLEAN columns
- DECIMAL and MONEY columns can be fetched as decimal.Decimal instances
if the decimal module is available
- auto
Thanks Rune. I've already checked out Django and TG and have found both
the projects to be a little misguided. I think the one great thing they
have over Rails is the use of SQLObject because the implicit mapping of
data models via the "plural" approach of Rails is a bit of a quirk to
me, I just do
gangesmaster wrote:
> but __mro__ is a readonly attribute, and deriving from instances is
> impossible (conn.modules.wx.Frame is a PROXY to the class)...
Maybe I'm misunderstanding, but why is an instance a proxy to a class?
Why don't you make a class a proxy to the class?
STeVe
--
http://mail.
To reduce the color depth of an image in PIL:
im = im.convert(mode="P", palette=Image.ADAPTIVE)
--
http://mail.python.org/mailman/listinfo/python-list
Felipe Almeida Lessa schrieb:
> Em Sáb, 2006-03-25 às 21:33 -0800, DrConti escreveu:
> [snip]
> > There was also a suggestion to write a real problem where referencing
> > is really needed.
> > I have one...:
> [snap]
>
> There are loads of discussions about the code you wrote... but... isn't
> ba
Em Sáb, 2006-03-25 às 21:33 -0800, DrConti escreveu:
[snip]
> There was also a suggestion to write a real problem where referencing
> is really needed.
> I have one...:
[snap]
There are loads of discussions about the code you wrote... but... isn't
bad practice to put the same data in two places? O
Dear Python developer community,
I'm quite new to Python, so perhaps my question is well known and the
answer too.
I need a variable alias ( what in other languages you would call "a
pointer" (c) or "a reference" (perl))
I read some older mail articles and I found that the offcial position
about
Dennis Lee Bieber wrote:
> WinXP? What error do you get from the wizard? (You are running in an
> Admin privilege I presume).
Yes, WinXP and admin.
At first, when Norton was running, I got a 1045 error message saying to
allow TCP port 3306. I tried creating a rule to do this, but it didn
[EMAIL PROTECTED] wrote:
> Please let me state off the cuff that I'm not after a big "Python Vs
> Ruby" war or anything here! I'm trying to make the switch to Python for
> my web development work as I've been using it for quite some time for
> other programming work (albeit mainly hobby and person
Please let me state off the cuff that I'm not after a big "Python Vs
Ruby" war or anything here! I'm trying to make the switch to Python for
my web development work as I've been using it for quite some time for
other programming work (albeit mainly hobby and personal interest
projects) as I'm getti
emacs
google: python-mode
- Original Message -
From: [EMAIL PROTECTED]
Date: Saturday, March 25, 2006 6:10 pm
Subject: Re: What's The Best Editor for python
To: python-list@python.org
> > Can one of you say to me what's the best editor for
> > editing the python programs( for linux or wi
If you want something that won't get in your way, you should really
use /bin/ed. It's probably simpler to use then searching the archives.
/bin/ed will also run in cygwin for windows.
>> Can one of you say to me what's the best editor for
>> editing the python programs( for linux or windows )
-
Dennis Lee Bieber wrote:
> On Sat, 25 Mar 2006 16:07:56 -0500, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>> My web server told me it isn't, which is why they are sticking with
>> MySQL 4.0 for now, but I'm obsessed with using the latest versions, so I
>> j
Ravi Teja wrote:
> Ah! An overzealous firewall! My sympathies :-). I am using the free
> Kerio personal firewall on Windows.
>
Actually, I'm a little confused now. I turned off Norton completely (as
far as I can tell), restarted, and the configuration wizard of MySQL
still fails at the "Start s
> Can one of you say to me what's the best editor for
> editing the python programs( for linux or windows )
The Zeus for Windows IDE has support for Python:
http://www.zeusedit.com/python.html
It does Python code folding, smart indenting and syntax
highlighting. It also has features like proj
Except for the fact that I don't have any idea where "given"
variable comes from. This works perfectly for me. It writes
data into /xrefs/given.log perfectly.
In the future you should cut/paste your code so we can see
enough to help better. Here is my code with a few changes.
import os
import s
On Sun, 26 Mar 2006 10:19:36 +1000, Ben Finney wrote:
> "James Thiele" <[EMAIL PROTECTED]> writes:
>
>> I'd like to access the name of a function from inside the function.
>
> A function, like most other objects in Python, can have any number of
> names bound to it without the object being infor
First, what version of python are you using? 2.4.2 (and some previous
versions) use file() instead of open(), although open may still work.
also, if your code in the previous post is still using:
outputFname = given + '.log'
outputFile = open(os.path.join(xrefs,outputFname), 'w')
I hope you have
smtplib docs http://python.active-venture.com/lib/SMTP-example.html
say that the to should be a list of addresses (your emails);
s.sendmail(msg['From'], emails, msg.as_string())
-Larry Bates
Kun wrote:
> Kun wrote:
>> i have the following code:
>>
>> --
>> import
25 Mar 2006 13:58:17 -0800, Ziga Seilnacht <[EMAIL PROTECTED]>:
> No, you don't have to:
Okay, but I'd prefer! ;)
> [a lot of python code]
That's what I wanted to avoid. Additionally, the possibility to do it
this way doesn't make it reasonable that is
inheritable. Are there any reasons for tha
On Wed, 22 Mar 2006 13:59:00 -0800, Chris Lasher wrote:
> Two things:
> 1) math.floor returns a float, not an int. Doing an int() conversion on
> a float already floors the value, anyways.
No it doesn't, or rather, int() is only equivalent to floor() if you limit
the input to non-negative numbers
"Scott Souva" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Your script may be working properly, but XP simply removes the window
> after the script runs. Here is a simple fix that will stop at the end
> of the script and leave the Command window open:
>
> print "Hello World"
> r
I understand that but I'm still puzzled. Is this the reason why I can't
write files to this directory?
The xrefs directory is created the way I expect it would be using mkdir
but I can't seem to write to it. I thought that my results would be
written to the xrefs directory here but they're ending
John J. Lee wrote:
> [EMAIL PROTECTED] (Alex Martelli) writes:
>>you should be using pychecker or pylint
>
> I'm curious, as somebody who doesn't regularly use these tools: How do
> they fit into your workflow? Do you run them every few hours, every
> day, every time you run functional tests, eve
"James Thiele" <[EMAIL PROTECTED]> writes:
> I'd like to access the name of a function from inside the function.
A function, like most other objects in Python, can have any number of
names bound to it without the object being informed. Any of those
names can then be used to reference the object,
i was taking about python...
--
http://mail.python.org/mailman/listinfo/python-list
Kun wrote:
> i have the following code:
>
> --
> import smtplib
>
> from email.MIMEText import MIMEText
> fp = open('confirmation.txt', 'rb')
> msg = MIMEText(fp.read())
>
> From = '[EMAIL PROTECTED]'
>
> msg['Subject'] = 'Purchase Confirmation'
> msg ['From'] = Fr
if (os.path.isdir(xrefs) == 0):
os.mkdir(xrefs)
os.path.isdir(stuff) returns
True or False
--
http://mail.python.org/mailman/listinfo/python-list
John J. Lee <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Alex Martelli) writes:
> [...]
> > you should be using pychecker or pylint
> [...]
>
> I'm curious, as somebody who doesn't regularly use these tools: How do
> they fit into your workflow? Do you run them every few hours, every
> day, e
Ah! An overzealous firewall! My sympathies :-). I am using the free
Kerio personal firewall on Windows.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] (Alex Martelli) writes:
[...]
> you should be using pychecker or pylint
[...]
I'm curious, as somebody who doesn't regularly use these tools: How do
they fit into your workflow? Do you run them every few hours, every
day, every time you run functional tests, every release, every
regarding the constants, this is more for the "vm" (and type safety).
actually enums, constants and symbols can prolly be implemented more or
less the same.
--
http://mail.python.org/mailman/listinfo/python-list
Kun wrote:
> i have the following code:
>
> --
> import smtplib
>
> from email.MIMEText import MIMEText
> fp = open('confirmation.txt', 'rb')
> msg = MIMEText(fp.read())
>
> From = '[EMAIL PROTECTED]'
>
> msg['Subject'] = 'Purchase Confirmation'
> msg ['From'] =
i have the following code:
--
import smtplib
from email.MIMEText import MIMEText
fp = open('confirmation.txt', 'rb')
msg = MIMEText(fp.read())
From = '[EMAIL PROTECTED]'
msg['Subject'] = 'Purchase Confirmation'
msg ['From'] = From
msg['To'] = emails
s = smtplib
Kun wrote:
> hey guys, here's my code,
>
> senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
> <[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS
> (FROM)] {37}', 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')']
> print senders
> parsed_senders = []
> sender = ""
> for i
gangesmaster wrote:
> let's start with a question:
>
> ==
>
class z(object):
>
> ... def __init__(self):
> ... self.blah=5
> ...
>
class x(object):
>
> ... def __init__(self):
> ... z.__init__(self)
> ...
>
y=x()
>
> Traceback (most recent
>>> senderlist="na nu [EMAIL PROTECTED] hu [EMAIL PROTECTED] [EMAIL PROTECTED]
>>> fa hu"
>>> print [ s[0] for s in re.findall("(\w+@(\w+\.)+\w+)",senderlist) ]
['[EMAIL PROTECTED]', '[EMAIL PROTECTED]']
--
http://mail.python.org/mailman/listinfo/python-list
Ravi Teja wrote:
> Yes! It does.
>
> Assuming that you are not terribly bandwidth constrained, isn't it
> easier for you to try it
> yourself on your own machine than wait for other people to assure you,
> given that both are free and pretty much run on any platform?
>
Yeah, actually I went ahea
Fabiano Sidler wrote:
[snipped]
> The problem with this is that the func_code attribute would contain
> the code of PrintingFunction instead of func. What I wanted to do, is
> to keep the original behaviour, i.e. set the variable __metaclass__ to
> DebugMeta and so get debug output, without chang
In <[EMAIL PROTECTED]>, oluoluolu
wrote:
> I have been programming in Python for many years, and I generally have
> run into alot of the same problems repeatedly.
>
> What is the consensus on these ideas please?
>
> * enums
There's a cookbook recipe:
http://aspn.activestate.com/ASPN/Cookbook/P
[EMAIL PROTECTED] wrote:
> From: In Need - view profile
> Date: Fri, Mar 24 2006 10:39 pm
> Email: "In Need" <[EMAIL PROTECTED]>
> Groups: hfx.forsale
> Not yet ratedRating:
> show options
>
>
> Reply | Reply to Author | Forward | Print | Individual Message | Show
> original | Report Abuse
Hi,
I'm trying to write a script that will create a new directory and then
write the results to this newly created directory but it doesn't seem
to work for me and I don't know why. I'm hoping someone can see my
mistake or at least point me in the right direction.
I start like this capturing the
Yes! It does.
Assuming that you are not terribly bandwidth constrained, isn't it
easier for you to try it
yourself on your own machine than wait for other people to assure you,
given that both are free and pretty much run on any platform?
--
http://mail.python.org/mailman/listinfo/python-list
i have a regular expression that searches a string and plucks out email
addresses however it doesn't work for email addresses w/a subdomain e.g.
[EMAIL PROTECTED]
emails = re.findall('([EMAIL PROTECTED])', senderlist) <-- my code
is there any way to modify that to include email addresses that
Kent Johnson <[EMAIL PROTECTED]> wrote:
> You could do this with a simple decorator:
> http://wiki.python.org/moin/PythonDecoratorLibrary#head-d4ce77c6d6e75aad25baf982f6fec0ff4b3653f4
>
> or I think your class PrintingFunction would work as
> class PrintingFunction(object):
>def __init__(self,
Generally, to remove a substring (like ">") from a string you can use
the replace method (that returns a new string):
>>> s = "...anon.wharton.com>..."
>>> s.replace(">", "")
'...anon.wharton.com...'
You can use it with something like:
print [s.replace(">", "") for s in parsed_senders]
or you ca
My web server told me it isn't, which is why they are sticking with
MySQL 4.0 for now, but I'm obsessed with using the latest versions, so I
just want to be sure. According to the mysqldb download page at
sourceforge, it is compatible with 5.0
Thanks.
--
http://mail.python.org/mailman/listinfo
Duncan Booth wrote:
> John Salerno wrote:
>
>> I'm interested in trying out Linux, probably Ubuntu, but I was wondering
>> which distribution you guys like to use (because it's a pain trying to
>> decide!) and you guys are smart.
>
> If you just want to try out Linux then a very easy way is to
I have been programming in Python for many years, and I generally have
run into alot of the same problems repeatedly.
What is the consensus on these ideas please?
* enums
* constants
* an imagefile ala smalltalk
* symbols ala lisp/scheme
thx in advance
--
http://mail.python.org/mailman/listinf
hey guys, here's my code,
senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
<[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS
(FROM)] {37}', 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')']
print senders
parsed_senders = []
sender = ""
for item in senders:
if isinst
John Salerno wrote:
> I'm interested in trying out Linux, probably Ubuntu, but I was wondering
> which distribution you guys like to use (because it's a pain trying to
> decide!) and you guys are smart.
If you just want to try out Linux then a very easy way is to use VMWare
Player: download it
Tim Golden wrote:
> BWill wrote:
>> Hi, I'm writing a file browser, but I'm not sure how I could go about
>> detecting the drives available on windows and linux systems (preferably
>> using the standard modules if possible). I guess I could just try to
>> list root on each letter of the alphabet fo
let's start with a question:
==
>>> class z(object):
... def __init__(self):
... self.blah=5
...
>>> class x(object):
... def __init__(self):
... z.__init__(self)
...
>>> y=x()
Traceback (most recent call last):
File "", line 1, in ?
File "", line 3, in
Christoph Haas wrote:
> On Sat, Mar 25, 2006 at 03:09:53PM -0500, John Salerno wrote:
>> I'm interested in trying out Linux, probably Ubuntu, but I was wondering
>> which distribution you guys like to use (because it's a pain trying to
>> decide!) and you guys are smart.
>
> We had this discussi
Em Sáb, 2006-03-25 às 09:11 -0800, Ziga Seilnacht escreveu:
> Python has a special internal list of integers in which it caches
> numbers smaller than 1000 (I'm not sure that the number is correct),
> but that is an implementation detail and you should not rely on it.
By testing:
>>> a = 10
>>> b
BWill wrote:
> Hi, I'm writing a file browser, but I'm not sure how I could go about
> detecting the drives available on windows and linux systems (preferably
> using the standard modules if possible). I guess I could just try to
> list root on each letter of the alphabet for windows and see if it
On Sat, Mar 25, 2006 at 03:09:53PM -0500, John Salerno wrote:
> I'm interested in trying out Linux, probably Ubuntu, but I was wondering
> which distribution you guys like to use (because it's a pain trying to
> decide!) and you guys are smart.
We had this discussion a couple of time during the
I'm interested in trying out Linux, probably Ubuntu, but I was wondering
which distribution you guys like to use (because it's a pain trying to
decide!) and you guys are smart.
And to keep it Python related, I'll also ask, is there anything special
I need to know about using Python on Linux? Do
[EMAIL PROTECTED] wrote:
> Well, I don't get the prize for most elegant.
>
> But that's partly because I included the ooloop6
> function.
:: snip a bunch of scary code :: :)
Wow, that's impressive. My solution looks a whole lot simpler than
yours, but I certainly could not have done it witho
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Paul McGuire wrote:
> > The alternatives I've come up with for the user to enable this packrat
parse
> > mode are:
> >
> > 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement
class,
> > to modify the Parse
OK. But that's just as ugly as my attempt.
--
http://mail.python.org/mailman/listinfo/python-list
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Paul McGuire wrote:
> > The alternatives I've come up with for the user to enable this packrat
parse
> > mode are:
> >
> > 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement
class,
> > to modify the Parse
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Paul McGuire wrote:
> > The alternatives I've come up with for the user to enable this packrat
parse
> > mode are:
> >
> > 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement
class,
> > to modify the Parse
James Thiele wrote:
> I'd like to access the name of a function from inside the function.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062
Kent
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire wrote:
> The alternatives I've come up with for the user to enable this packrat parse
> mode are:
>
> 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement class,
> to modify the ParserElement defintion of the internal (non-packrat) parse()
> method. This method essent
Hi, I'm writing a file browser, but I'm not sure how I could go about
detecting the drives available on windows and linux systems (preferably
using the standard modules if possible). I guess I could just try to
list root on each letter of the alphabet for windows and see if it
works, but that s
From: In Need - view profile
Date: Fri, Mar 24 2006 10:39 pm
Email: "In Need" <[EMAIL PROTECTED]>
Groups: hfx.forsale
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author
We are hiri
James Thiele wrote:
> Is there a standard way of getting the name of a function from inside
> the function?
No, there isn't.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Ron Garret wrote:
> [EMAIL PROTECTED] (Alex Martelli) wrote:
>
>> > One other question I did not get answered: is there any
>> > simple example of a Pythonic use of __slots__ that does NOT
>> > involve the creation of **many** instances.
>>
>> Since the only benefit of __slots__ is saving a fe
Grazie ALex, for your comment.
--
http://mail.python.org/mailman/listinfo/python-list
I'd like to access the name of a function from inside the function. My
first idea didn't work.
>>> def foo():
... print func_name
...
>>> foo()
Traceback (most recent call last):
File "", line 1, in ?
File "", line 2, in foo
NameError: global name 'func_name' is not defined
My second atte
Larry,
I actually did not find what I needed in PIL (missed it ?) but found this
package quite usefull: http://www.imagemagick.org/script/index.php
Philippe
Larry Bates wrote:
> Philippe Martin wrote:
>> Hi,
>>
>> I need to write a script to reduce the resolution/color depth of an image
>>
Ron Garret <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Alex Martelli) wrote:
>
> > > One other question I did not get answered: is there any
> > > simple example of a Pythonic use of __slots__ that does NOT
> > > involve the creation of **many** instances.
"Kun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i have a list of that is:
>
> [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
> <[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS (FROM)] {37}',
> 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')']
>
>
> how do i pa
"senders" is list, that is why that regex does not work. I don't like regexes that much so you can try this:parsed_senders = []sender = ""for item in senders: if isinstance(item,tuple):
item= ''.join(item) if item==')': parsed_senders.append(sender[sender.find('From:')+5:].strip())
Salvatore <[EMAIL PROTECTED]> wrote:
> Thank's everybody :-)
>
>
> Here is a type définition I've found on the net which I agree with :
>
> Attribute of a variable which determines the set of the values this
> variabe can take and the
> operations we can apply on it.
Hmmm -- that doesn't work
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Alex Martelli) wrote:
> > One other question I did not get answered: is there any
> > simple example of a Pythonic use of __slots__ that does NOT
> > involve the creation of **many** instances.
>
> Since the only benefit of __slots__ is saving
I have a new enhancement to pyparsing that doubles the parse speed (using a
technique called "packrat parsing"), but which is not suitable for all
parsers, specifically those that have complex parse actions. I don't want
to just enable this feature by default - I think there is too much risk of
it
Helmut Jarausch schrieb:
> Hi,
> sorry, this seems to be a FAQ but I couldn't find anything
>
> I need to check if an object is a compiled regular expression
>
> Say
> import re
> RX= re.compile('^something')
>
> how to test
>
> "if RX is a compiled regular expression"
>
> type(RX) says
>
>
David Isaac wrote:
> "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > >>> a = 1
> > >>> b = 1
> > >>> a == b
> > True
> > >>> a is b
> > False
>
> Two follow up questions:
>
> 1. I wondered about your example,
> and noticed
> >>> a = 10
> >>> b = 10
> >>> a
Thank's everybody :-)
Here is a type définition I've found on the net which I agree with :
Attribute of a variable which determines the set of the values this
variabe can take and the
operations we can apply on it.
--
http://mail.python.org/mailman/listinfo/python-list
Salvatore wrote:
> Hello,
>
> I've read several articles where it's said that Python is weakly typed.
> I'm a little surprised. All objects seem to have a perfectly defined
> type
>
> Am i wrong?
>
> Regards
>
Aye, the other posters are right about you being right. This is just one
of the grea
This is crude, but works:
>>> import re
>>> RX= re.compile('^something')
>>> str(RX).find("<_sre.SRE_Pattern") == 0
True
--
http://mail.python.org/mailman/listinfo/python-list
"dongdong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> for example:
> re.sub(']+)+\s?>[^<^>]*','',' asd ga href="http://www.sine.com"; class="wordstyle"> asdgasdghae rha')
>
> I wish to get the return value "asd ga asdgasdghae rha",how do do?
> I have a impression on "%" and "{nu
Grzegorz Smith wrote:
> Hi all. I'm trying get data from text field in MySQl 5.0 with my National
> characters. Data are stored in utf8 encodings. Here is the script:
> import MySQLdb, MySQLdb.cursors
> conn = MySQLdb.connect(host='localhost', user='root', passwd='123456',
> db='profile_locale')
>
On 3/25/06, David Isaac <[EMAIL PROTECTED]> wrote:
> "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > >>> a = 1
> > >>> b = 1
> > >>> a == b
> > True
> > >>> a is b
> > False
>
> Two follow up questions:
>
> 1. I wondered about your example,
> and noticed
>
Hi,
sorry, this seems to be a FAQ but I couldn't find anything
I need to check if an object is a compiled regular expression
Say
import re
RX= re.compile('^something')
how to test
"if RX is a compiled regular expression"
type(RX) says
but
if isinstance(RX,_sre.SRE_Pattern)
and
if isinstanc
David Isaac <[EMAIL PROTECTED]> wrote:
...
> Does this beg the question of whether __slots__
> *should* break with inheritance?
How would you expect the following code to behave:
class Base(object):
def __init__(self): self.x = 23
class Derived(Base):
__slots__ = 'y',
? I would expe
"Ziga Seilnacht" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >>> a = 1
> >>> b = 1
> >>> a == b
> True
> >>> a is b
> False
Two follow up questions:
1. I wondered about your example,
and noticed
>>> a = 10
>>> b = 10
>>> a is b
True
Why the difference?
2. If I really w
Lonnie Princehouse <[EMAIL PROTECTED]> wrote:
> There is a sets.Set class built in to Python. You might want to use
In 2.4, there's also a set builtin type -- you can keep using the sets
module from the standard library, but the built-in set is faster.
If you need compatibility with both 2.3 an
"Aahz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Because __slots__ breaks with inheritance.
I believe that was the point of Ziga's example,
which I acknowledged as a good one in my reply.
So there still appears to be this single reason, which
applies if your class may be subcla
gene tani wrote:
> Christoph Zwerschke wrote:
> > Just because nobody has mentioned them so far:
> >
http://spyced.blogspot.com/2006/02/pycon-python-ide-review.html
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 25 Mar 2006 14:45:34 +0100, "Jean-Claude Garreau"
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>I'm a beginner with python 2.4. I use it on Win XP Pro. I have no problems
>with the GUI IDLE, but
>when I copy the instructions in a script file, say 'test.py' and double
>click on the file, I have just
Christoph Zwerschke wrote:
> Just because nobody has mentioned them so far:
>
> - SciTe is a perfect editor for Pyhton on Win and Linx
> - PyScripter is a wonderful IDE (but only on Win)
> - DrPython is a nice platform independent editor/mini-IDE
>
http://www.artima.com/forums/flat.jsp?forum=106
Thank you for your answer. I did it. It executes perfectly in IDLE. I made a
copy/paste
from IDLE into the 'test.py' and I obseved the behavior I discribed. The
script is extremely simple
(it is just a test):
n=0
while( n<10 ):
print n,n*n
n+=1
<[EMAIL PROTECTED]> a écrit dans le mes
On Sat, 25 Mar 2006 07:06:59 +0100, Fredrik Lundh wrote:
> Michael Sperlle wrote:
>
>> I need to write out a file containing the # comment. When I try to
>> specify it as part of a literal, everything afterward turns into a
>> comment.
>
> "turns into a comment" in what sense ? from your descri
there seems to be an error in your script.
Why don't you execute it directly from IDLE (F5) ? There, you should
see where the problem is.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm a beginner with python 2.4. I use it on Win XP Pro. I have no problems
with the GUI IDLE, but
when I copy the instructions in a script file, say 'test.py' and double
click on the file, I have just a
console window for a few moments, no output shown and the window closes
automatically be
1 - 100 of 121 matches
Mail list logo