* * Introduction to Python Masterclass * *
May 11-13, 2009
Chicago, Illinois
with David Beazley, author Python Essential Reference
http://www.dabeaz.com/chicago
Take your Python programming skills to
On Mar 13, 6:39 pm, Roman Medina-Heigl Hernandez ro...@rs-labs.com
wrote:
Hi,
I'm experimenting with Python and I need a little help with this. What I'd
like is to launch an interactive shell, having the chance to send first
several commands from python. I've written the following code:
[Lie Ryan]
My proposition is: make the format specifier a simpler API to locale
aware
You do know that we already have one, right?
That's what the existing n specifier does.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
Colin J. Williams wrote:
Piet van Oostrum wrote:
tinn...@isbd.co.uk (t) wrote:
t I've had this trouble before, how do I find the details of how in
t works in the documentation. E.g. the details of:-
t if string in bigstring:
t It gets a mention in the if section but not a lot.
On Fri, Mar 13, 2009 at 10:29 PM, Paul Rubin http wrote:
Saurabh nirkh...@gmail.com writes:
Hi all,
I am an experienced C programmer, I have done some perl code as well.
But while thinking about large programs,I find perl syntax a
hinderance.
I would say read the online tutorial, then
I am the author of MyHDL, a Python package that turns Python
into a hardware description language (HDL).
Integer arithmetic is very important in hardware design,
but with traditional HDLs such as Verilog and VHDL it is
complicated and confusing. MyHDL has a better solution,
inspired by Python's
In message 302dd4f5-e9b3-4b0a-b80c-
ae43810d8...@e18g2000yqo.googlegroups.com, aiwarrior wrote:
I recently am meddling with threads and wanted to make a threaded
class that instead of processing anything just retrieves data from a
file and returns that data to a main thread that takes all the
I don't get *why* someone would like to write that. Does it look cool? Is
it some kind of Look, ma, I know those hidden names! syndrome? Is it
contagious?
I think thats what it is. It does look cool, thats for telling me about the
fact that
prevents the interpreter from doing many
I'm actually still getting to this section of my code, I've been working a
logging,stdout colors lately, Although I am going to need __import__ in
several places in this program
-Alex Goretoy
http://www.goretoy.com
On Sat, Mar 14, 2009 at 3:05 AM, alex goretoy
aleksandr.gore...@gmail.comwrote:
I can show you people more code if you want :) I like to learn
-Alex Goretoy
http://www.goretoy.com
On Sat, Mar 14, 2009 at 3:09 AM, alex goretoy
aleksandr.gore...@gmail.comwrote:
I'm actually still getting to this section of my code, I've been working a
logging,stdout colors lately,
On Thu, 2009-03-12 at 14:49 -0700, John Machin wrote:
I see that you haven't had the evil spirits exorcised from your mail/
news client ... it's hijacked a thread again :-(
don't worry, won't happen this time.
It seams I did some thing wrong with the settings and it drops out
mails.
Now the
This is a chunk of what its starting to look like now, thanks
from colors import _available_colors as _ck
from has_colors import _has_colors as _ha
from log import _brush as _er
class stdout_colors(object):
def
__init__(self,colors_active=1,output_caller=1,caller_color=red,default=1,
Peter Billam wrote:
I've got this tkinter program which allows you to load a file with
File/LoadFile or Ctrl-L or from the Alt-F menu, as usual. But I'd
also like to be able to invoke it with:
shellprompt midimix x.mid
and have it invoke its usual loadFile method on x.mid
But with the
John Nagle na...@animats.com wrote:
Yes. In COBOL, one writes
PICTURE $999,999,999.99
which is is way ahead of most of the later approaches.
That was fixed width. For zero suppression:
PIC ,$$$,$99.99
This will format 1000 as $1,000.00
For fixed width zero suppression:
PIC
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
Thanks a lot,
Mattia
--
a = eval([%s] %
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC','EGC','SXF','BZR','BIQ','BLL','BHX','BLQ')
a
['AAR', 'ABZ', 'AGA', 'AHO', 'ALC', 'LEI', 'AOC', 'EGC', 'SXF', 'BZR',
'BIQ', 'BLL', 'BHX', 'BLQ']
On Sat, Mar 14, 2009 at 5:09 PM, mattia ger...@gmail.com wrote:
How can I convert the
Peter Billam wrote:
window = MainWindow(application)
if (len(sys.argv) 1) and os.path.exists(sys.argv[1]):
window.loadFile(sys.argv[1])
application.mainloop()
File ./midimix, line 465, in loadFile
space0.grid(row=grid_row,
mattia wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
import string
string.split(a,b,c, ',')
2009/3/14 mattia ger...@gmail.com:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
Thanks a lot,
Mattia
mattia wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
s =
Il Sat, 14 Mar 2009 10:24:38 +0100, Ulrich Eckhardt ha scritto:
mattia wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
Peter Billam wrote:
Peter Billam wrote:
window = MainWindow(application)
if (len(sys.argv) 1) and os.path.exists(sys.argv[1]):
window.loadFile(sys.argv[1])
application.mainloop()
File ./midimix, line 465, in loadFile
space0.grid(row=grid_row,
Karthik Gurusamy escribió:
On Mar 13, 6:39 pm, Roman Medina-Heigl Hernandez ro...@rs-labs.com
wrote:
Hi,
I'm experimenting with Python and I need a little help with this. What I'd
like is to launch an interactive shell, having the chance to send first
several commands from python. I've
On 14 Mar, 02:08, Aaron Brady castiro...@gmail.com wrote:
On Mar 13, 5:42 pm, Matteo tadweles...@gmail.com wrote:
On 13 Mar, 22:35, Aaron Brady castiro...@gmail.com wrote:
On Mar 13, 1:34 pm, Matteo tadweles...@gmail.com wrote:
hmmm... looks like SWIG has a problem with double
Re-posting in more simple and precise terms from a previous thread
http://groups.google.it/group/comp.lang.python/browse_thread/thread/6dd7bd9a09b8a011/5119cf15ebfa38b8
Problem:
SWIG doesn't properly wrap c++ arrays of pointers, therefore when you
try to call a c++ function which requires them, a
Il Sat, 14 Mar 2009 10:30:43 +0100, Vlastimil Brom ha scritto:
2009/3/14 mattia ger...@gmail.com:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
mattia wrote:
Il Sat, 14 Mar 2009 10:30:43 +0100, Vlastimil Brom ha scritto:
2009/3/14 mattia ger...@gmail.com:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
mattia wrote:
Il Sat, 14 Mar 2009 10:30:43 +0100, Vlastimil Brom ha scritto:
2009/3/14 mattia ger...@gmail.com:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
Il Sat, 14 Mar 2009 10:35:59 +0100, Peter Otten ha scritto:
mattia wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
On Mar 14, 7:00 am, Tim Golden m...@timgolden.me.uk wrote:
Well, this may not solve the OP's problem, but the current
(2.7a0) .chm file has a much better index for operators and
keywords. And in is in there. If you're interested in
comparing, there's a copy here:
On 13 mrt, 23:30, Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
En Fri, 13 Mar 2009 17:59:34 -0200, aloons...@gmail.com escribió:
On 12 mrt, 18:43, Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
En Thu, 12 Mar 2009 07:21:35 -0200, arn...@sphaero.org escribió:
I'm not so much
Colin J. Williams c...@ncf.ca wrote:
Piet van Oostrum wrote:
tinn...@isbd.co.uk (t) wrote:
t I've had this trouble before, how do I find the details of how in
t works in the documentation. E.g. the details of:-
t if string in bigstring:
t It gets a mention in the if
mattia wrote:
Il Sat, 14 Mar 2009 10:35:59 +0100, Peter Otten ha scritto:
mattia wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
Il Sat, 14 Mar 2009 12:13:31 +0100, Peter Otten ha scritto:
mattia wrote:
Il Sat, 14 Mar 2009 10:35:59 +0100, Peter Otten ha scritto:
mattia wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into
I'm trying this on Python 3.0.1
Consider the following code:
import multiprocessing as mp
def jambu(b,i,gl):
for n in range(10):
with gl[i]:
b[i]+=2
with gl[3-i]:
b[3-i]-=1
def main():
b = mp.RawArray('i',4)
gl = []
proc = []
for i
jkn wrote:
On Mar 14, 7:00 am, Tim Golden m...@timgolden.me.uk wrote:
Well, this may not solve the OP's problem, but the current
(2.7a0) .chm file has a much better index for operators and
keywords. And in is in there. If you're interested in
comparing, there's a copy here:
Thanks much.
-=roger
Yet more specifically: if the extension module or Python host opens
a file with fopen(), and passes it to PyRun_{Any|Simple}File[Ex][Flags],
Python will crash.
HTH,
Martin
P.S. There may be more cases in which you get crashes - the list above
includes just the known
I found no solution on the net so I am posting my solution here.
It can be called with python cwd 1-1-2009 14-3-2009
from dateutil.rrule import *
from dateutil.parser import *
from datetime import *
from sys import *
start = parse( argv[1] )
#end = datetime.now()
end = parse( argv[2] )
workdays
On Mar 14, 12:04 pm, Chris Rebert c...@rebertia.com wrote:
On Fri, Mar 13, 2009 at 10:29 PM, Paul Rubin http wrote:
Saurabh nirkh...@gmail.com writes:
Hi all,
I am an experienced C programmer, I have done some perl code as well.
But while thinking about large programs,I find perl syntax a
Gary Herron wrote:
Robert Kern wrote:
On 2009-03-06 14:23, Gary Herron wrote:
Robert Kern wrote:
On 2009-03-06 13:46, Gary Herron wrote:
Emanuele D'Arrigo wrote:
Hi everybody,
while testing a module today I stumbled on something that I can work
around but I don't quite understand.
*Do
Paul Rubin wrote:
Steven D'Aprano st...@pearwood.info writes:
It is never
correct to avoid using is when you need to compare for identity.
When is it ever necessary to compare for identity?
For example when providing a unique sentinel value as a function
argument. The parameter must be
Carl Banks wrote:
On Mar 8, 5:32 am, Lie Ryan lie.1...@gmail.com wrote:
Mel wrote:
wrote:
Steven D'Aprano st...@pearwood.info writes:
It is never
correct to avoid using is when you need to compare for identity.
When is it ever necessary to compare for identity?
Ho-hum. MUDD game.
def
Daniel Fetchinson wrote:
I've noticed that Pygame has some similar implementation.
It's a little harder to use, but efficient.
And i think it depends on PIL too.
And Pygame is Python 2.x too...
...
When I asked about it there I was told that some work already has
started on porting PIL to
tinn...@isbd.co.uk wrote:
...
But I was wondering if there's a neater/easier way?
How is if stringA.lower() in stringB.lower(): complex/messy?
Well I guess I was just looking for incase a bit like strcasecmp
in C.
Which locales case folding do you want to have applied?
Tino
smime.p7s
farsi...@gmail.com wrote:
Thanks all, that's very helpful, sorry to waste your time with a
common question. I have tried the decimal module and will definitely
keep using it if I need to do this kind of calculation again.
I have 1 more question that the floating point article that was linked
On Mar 15, 12:13 am, Gonsolo gons...@gmail.com wrote:
I found no solution on the net so I am posting my solution here.
It can be called with python cwd 1-1-2009 14-3-2009
from dateutil.rrule import *
from dateutil.parser import *
from datetime import *
from sys import *
H ... I wonder
Beni Cherniavsky beni.cherniav...@gmail.com wrote:
This proposal outrageously suggests a special syntax for in-line
functions passed as keyword arguments::
sorted(range(9), key(n)=n%3)
[0, 3, 6, 1, 4, 7, 2, 5, 8]
The claim is that such specialization hits a syntax sweet
My new class I've been working on might help you. It does what you are
asking without eval (I'm still working on it) Anyone have any ideas aswell
along with the OP, thank you
#!/usr/bin env python
#
# -*- coding: UTF-8 -*-
#
# PyNutButter BETA Version 0.1.0.1
#
# Copyright 2009 - Infinity by Alex
Tim Golden wrote:
Colin J. Williams wrote:
Piet van Oostrum wrote:
tinn...@isbd.co.uk (t) wrote:
t I've had this trouble before, how do I find the details of how in
t works in the documentation. E.g. the details of:-
t if string in bigstring:
t It gets a mention in the if section
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
self.some_value = 0
self.another_value = None
Similar effect can be achieved by
Hallöchen!
I parse an XML file with ElementTree and get the contets with
the .attrib, .text, .get etc methods of the tree's nodes.
Additionally, I use the find and findtext methods.
My problem is that if there is only ASCII, these methods return
ordinary strings instead of unicode. So sometimes
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
n0 = new_node(id='n0')
n1 = new_node(id='n1')
## Seems OK so far:
n0 # {'id':
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
self.some_value = 0
self.another_value = None
Similar effect
On Sat, Mar 14, 2009 at 12:31 PM, Dan Davison wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
This is something of a FAQ:
Dan Davison wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
n0 = new_node(id='n0')
n1 = new_node(id='n1')
[snip]
See
How about:
from datetime import date, timedelta
# Define the weekday mnemonics to match the date.weekday function
(MON, TUE, WED, THU, FRI, SAT, SUN) = range(7)
def workdays(start_date, end_date, whichdays=(MON,TUE,WED,THU,FRI)):
'''
Calculate the number of working days between two
On 14 Mar, 17:31, Dan Davison davi...@stats.ox.ac.uk wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
Most probably, here is the problem : try this
On Sat, Mar 14, 2009 at 12:50 PM, MRAB goo...@mrabarnett.plus.com wrote:
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
# THIS WORKS OK
from multiprocessing import Pool
N = 400
K = 800
processes = 2
def costlyFunction2(z):
r = 0
for k in xrange(1, K+2):
r += z ** (1 / k**1.5)
return r
class ABC:
def __init__(self): pass
def testParallel(self):
po = Pool(processes=processes)
Krishnakant hackin...@gmail.com writes:
However when I apply the same elements and attributes to the one I am
creating with odfpy, I get attribute not allowed errors.
If some one is interested to look at the code, please let me know, I can
send an attachment off the list so that others are
On Mar 14, 5:30 pm, Nick Craig-Wood n...@craig-wood.com wrote:
BeniCherniavskybeni.cherniav...@gmail.com wrote:
This proposal outrageously suggests a special syntax for in-line
functions passed as keyword arguments::
sorted(range(9), key(n)=n%3)
[0, 3, 6, 1, 4, 7, 2, 5, 8]
Any idea when PyWin32 will be available for Python 3.x?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
Maxim Khitrov:
When the types are immutable, there is no difference.
But you may want different instances to have different immutable data.
Generally if the data (immutable or not) is the same for all the
instances, use class attributes, otherwise use instance attributes.
Bye,
bearophile
--
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
self.some_value = 0
self.another_value = None
Similar effect
Colin J. Williams wrote:
Tim Golden wrote:
Colin J. Williams wrote:
Piet van Oostrum wrote:
tinn...@isbd.co.uk (t) wrote:
t I've had this trouble before, how do I find the details of how in
t works in the documentation. E.g. the details of:-
t if string in bigstring:
t It gets a
On 3/13/2009 10:29 PM, Paul Rubin wrote:
Saurabhnirkh...@gmail.com writes:
Hi all,
I am an experienced C programmer, I have done some perl code as well.
But while thinking about large programs,I find perl syntax a
hinderance.
I would say read the online tutorial, then Python in a
John Nagle wrote:
Any idea when PyWin32 will be available for Python 3.x?
John Nagle
Release 213 is out already:
http://sourceforge.net/project/showfiles.php?group_id=78018package_id=79063release_id=661475
I think it's still considered a little bit beta. There have been a
Jan Decaluwe wrote:
I am the author of MyHDL, a Python package that turns Python
into a hardware description language (HDL).
Integer arithmetic is very important in hardware design,
but with traditional HDLs such as Verilog and VHDL it is
complicated and confusing. MyHDL has a better solution,
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 12:50 PM, MRAB goo...@mrabarnett.plus.com wrote:
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
dmitrey wrote:
# THIS WORKS OK
from multiprocessing import Pool
N = 400
K = 800
processes = 2
def costlyFunction2(z):
r = 0
for k in xrange(1, K+2):
r += z ** (1 / k**1.5)
return r
class ABC:
def __init__(self): pass
def testParallel(self):
po =
bieff...@gmail.com wrote:
On 14 Mar, 17:31, Dan Davison davi...@stats.ox.ac.uk wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
Most probably, here is
dmitrey wrote:
This doesn't work for
costlyFunction2 = lambda x: 11
as well; and it doesn't work for imap, apply_async as well (same
error).
So, isn't it a bug, or it can be somehow fixed?
Thank you in advance, D.
It's not a bug but a limitation of the pickle protocol. Pickle can't
handle
On Sat, Mar 14, 2009 at 2:07 PM, Gary Herron gher...@islandtraining.com wrote:
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def
This is a file that is going into the new version of python-stdout-colors
project location:
http://code.google.com/p/python-stdout-colors/
-Alex Goretoy
http://www.goretoy.com
On Sat, Mar 14, 2009 at 10:45 AM, alex goretoy
aleksandr.gore...@gmail.comwrote:
My new class I've been working
In article mailman.922.1235774125.11746.python-l...@python.org,
Tim Chase python.l...@tim.thechases.com wrote:
I am interested in writing an application that functions like a Unix
or Linux top in the way it displays data.
It should be command-line based but dynamically refreshing.
You might
On Mar 14, 3:01 am, Gabriel Genellina gagsl-...@yahoo.com.ar
wrote:
En Fri, 13 Mar 2009 19:07:46 -0200, aiwarrior zube...@yahoo.com.br
escribió:
I recently am meddling with threads and wanted to make a threaded
class that instead of processing anything just retrieves data from a
file
On Sat, Mar 14, 2009 at 12:32 PM, Maxim Khitrov mkhit...@gmail.com wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
bieff...@gmail.com writes:
On 14 Mar, 17:31, Dan Davison davi...@stats.ox.ac.uk wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
Most probably, here
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
Though several other options have come through:
s =
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 2:07 PM, Gary Herron gher...@islandtraining.com wrote:
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class
Maxim Khitrov wrote:
Perhaps a different example would help explain what I'm trying to do:
class Case1(object):
def __init__(self):
self.count = 0
self.list = []
def inc(self):
self.count += 1
I know that this can be evident for most of the people but i would like to know
the reply and the reasoning if possible:
Should my python application have a difference in speed of execution after
change the encoding header of the file from nothing (ascii) to latin-1 or utf-8?
If yes, only when
Hi David,
based on your code snippid I added a couple of lines to actually center
align text in the merged cell in first row.
Please note in the following code that I have added ParagraphProperties
in the imports and created one style with textalign=center as an
attribute.
*** code follows ***
On Mar 14, 7:11 am, Ahmad Syukri bin Abdollah syoc...@gmail.com
wrote:
I'm trying this on Python 3.0.1
Consider the following code:
import multiprocessing as mp
def jambu(b,i,gl):
for n in range(10):
with gl[i]:
b[i]+=2
with gl[3-i]:
Linos wrote:
I know that this can be evident for most of the people but i would like
to know the reply and the reasoning if possible:
Should my python application have a difference in speed of execution after
change the encoding header of the file from nothing (ascii) to latin-1
or utf-8?
If
Hi,
is tkinter able to start a windows without the frame of the according
window manager? (only needed for Linux, KDE desktop)
The window should only be closed by click on a button within the window!
I should not be moved, it should not be close, ... and so on. The
solution would be: start
Gary Herron gher...@islandtraining.com writes:
But now you are not listening to what people are telling you. It has
*nothing* to do with the mutability/immutability of the integer and the list
your two classes create.
No! Did you run the code he posted? The immutability makes all the
On Sat, Mar 14, 2009 at 4:31 PM, Gary Herron gher...@islandtraining.com wrote:
Perhaps a different example would help explain what I'm trying to do:
class Case1(object):
def __init__(self):
self.count = 0
self.list = []
def inc(self):
On Sat, Mar 14, 2009 at 5:38 PM, Matthew Woodcraft
matt...@woodcraft.me.uk wrote:
Gary Herron gher...@islandtraining.com writes:
I think this code is in poor taste: it's clear that it will confuse
people (which is what Maxim was asking about in the first place).
Yes, I see that now, thanks :)
Hallöchen!
Maxim Khitrov writes:
[...]
The advantage of doing this is that the assignments are evaluated
once and thus the creation of that class is a bit faster. Access
is still performed through self.some_value and
self.another_value. Is there a reason to prefer the first style
over the
Hallöchen!
Stefan Behnel writes:
Torsten Bronger wrote:
[...]
My problem is that if there is only ASCII, these methods return
ordinary strings instead of unicode. So sometimes I get str,
sometimes I get unicode. Can one change this globally so that
they only return unicode?
That's a
Torsten Bronger wrote:
I parse an XML file with ElementTree and get the contets with
the .attrib, .text, .get etc methods of the tree's nodes.
Additionally, I use the find and findtext methods.
My problem is that if there is only ASCII, these methods return
ordinary strings instead of
Krishnakant hackin...@gmail.com writes:
based on your code snippid I added a couple of lines to actually center
align text in the merged cell in first row.
Sorry, guess I should have verified handling all the requirements :-)
I think there's two issues:
* I neglected to add the style I
I'm doing this in my code, how to make it define all this functions for me
with lambda, I've been up for a while and cant seem to figure it out, whats
the most efficient way to do it? with lambda? how? thx
def red(self,value,color='red',level='INFO'):
self.write(value,color,level)
I was going to file a bug report for this, but then I wondered if it was
considered normal behaviour. Am I wrong in thinking there should be a
better error message?
class NoHash:
... def __hash__(self):
... pass
...
frozenset([NoHash()])
Traceback (most recent call last):
File stdin,
Ekkard Gerlach wrote:
Hi,
is tkinter able to start a windows without the frame of the according
window manager? (only needed for Linux, KDE desktop)
The window should only be closed by click on a button within the window!
I should not be moved, it should not be close, ... and so on. The
I'm doing this in my code, how to make it define all this functions for me
with lambda, I've been up for a while and cant seem to figure it out, whats
the most efficient way to do it? with lambda? how? thx
def red(self,value,color='red',level='INFO'):
Martin P. Hellwig schrieb:
Try a google search on:
tkinter overrideredirect
thx! That's it!
--
http://mail.python.org/mailman/listinfo/python-list
I would suggest using functools.partial like this
from functools import partial
class Foo(object):
#...
red = partial(color='red')
--
http://mail.python.org/mailman/listinfo/python-list
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 4:31 PM, Gary Herron gher...@islandtraining.com wrote:
Perhaps a different example would help explain what I'm trying to do:
class Case1(object):
def __init__(self):
self.count = 0
self.list = []
def
1 - 100 of 164 matches
Mail list logo