code('utf-8')
>>u'INBOX'
Tn that case id.decode('hex') doesn't return a unicode, but a utf-8
encoded string.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
t;> msg.set_payload(body)
Thats all. Though some smtp servers needs a Date header too, to work.
>>> from time import gmtime, strftime
>>> msg['Date'] = strftime("%a, %d %b %Y %H:%M:%S +", gmtime())
Sending the message via the smtp module is even simpler.
>>> import smtplib
>>> server = smtplib.SMTP('localhost')
>>> server.sendmail(fromaddr, [to], msg.as_string())
>>> server.quit()
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
thods?
"""
from datetime import datetime, timedelta
class myDatetime(datetime):
pass
class myTimedelta(timedelta):
pass
if __name__ == "__main__":
import os.path, doctest, dtime
# import and test this file
doctest.testmod(dtime)
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
)))
except:
raise ValueError, 'Wrong format'
return vDatetime(*timetuple)
fromstring = staticmethod(fromstring)
def __str__(self):
return self.strftime("%Y%m%dT%H%M%S")
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Jan Dries wrote:
[EMAIL PROTECTED] wrote:
And there is hope for Python, as Guido has recently been seen with a
beard :-)
http://www.tbray.org/ongoing/When/200x/2004/12/08/-big/IMG_3061.jpg
LOL, he is working on linux, isn't he?
So it was about bloody time.
--
hilsen/regards Max M, Denmark
Kurt B. Kaiser wrote:
Remove witty comment in pydoc.py (2005-01-01)
CLOSED http://python.org/sf/1094007 opened by Reinhold Birkenfeld
This is not a joke? :-)
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
etimetuple)
class date2(date):
def datetimetuple(self):
return self.timetuple()[:6] + (0, None)
def from_datetimetuple(dt_tuple):
return date2(*dt_tuple[:3])
from_datetimetuple = staticmethod(from_datetimetuple)
#from datetime import datetime
#
#ical = Calendar()
#print ical.ical()
if
Serge Orlov wrote:
Max M wrote:
Yes, you did. datetime.timetuple is those who want *time module* format, you should use datetime.data, datetime.time, datetime.year
and so on...
As they say, if the only tool you have is timetuple, everything looks like tuple
Try this:
dt = datetime(2005, 1, 1
Api is pretty stable, and will probably not change much.
I would like anybody interrested to give it a test drive before I finish
it off and make it a 1.0.
http://www.mxm.dk/products/public/ical/
Any feedback would be welcome.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Sc
Roger Binns wrote:
"Max M" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
http://www.mxm.dk/products/public/ical/
Any feedback would be welcome.
How well do you cope with the crud that real programs generate? Does it work
with the different dialects uses out there?
bad practice to do it like that.
If you need variables that you don't know that name of, you should put
them in a dictionary. They are made for that exact purpose.
>>> unkown_vars = {}
>>> unkown_vars['variable'] = 42
>>> 'variable' in unkown
Nico Grubert wrote:
If it's not to learn, and you simply want it to work, try out this library:
http://zope.org/Members/chrisw/StripOGram/readme
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
g cookie in your file?
Try adding this as the first or second line.
# -*- coding: cp850 -*-
Python will then know how your file is encoded
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
ll not be as
> mysterious or dangerous.
I agree. The language is more important than the gui. It is not very
hard to make good applikations in eg. Tkinter, and you will understand
evey part of it.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.
gestion to start with.
ctypes certainly. Even though it can crash Python. People using ctypes
would be aware of this.
Another good bet is BeautifulSoup, which is absolutely great for
scraping content from webpages.
http://crummy.com/software/BeautifulSoup/index.html
--
hilsen/regards
objects can then be called eg. from a web browser
with different parameters. But you can also use other protocols than
http like dav, ftp etc.
This is a very effective way to build web applications, and does not
need sql-object remapping as normal web apps does.
--
hilsen/regards Max
rom a reference!
If you want to try out re interactively you could use:
\Tools\Scripts\redemo.py
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
on but I cann't
> get solution for it.
Why not just use the smtp module? It's a tad easier.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Scott David Daniels <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> max wrote:
>> Larry Bates <[EMAIL PROTECTED]> wrote in
>> news:[EMAIL PROTECTED]:
>>>Python has built in eval function and doesn't require a library.
>>
>> Are you
uments. You can get
those from your original image...
>>> from PIL import Image
(skip me loading an image into im)
>>> im
>>> im.mode
'RGB'
>>> im.size
(510, 800)
>>> im2=Image.new(im.mode,im.size)
>>> seq=im.getdata()
>>&g
at', *sigh*!
bye
max
ps: in perl you ca do this:
...
while ($line = )
{
print STDOUT ("$line");
}
...
--
http://mail.python.org/mailman/listinfo/python-list
gt; draw=ImageDraw.Draw(wm)
>>> draw.text((0,0),'Watermark',(0,0,0),font)
>>> wm.show()
>>> en=ImageEnhance.Brightness(wm)
>>> mask=en.enhance(0.5)
>>> im.paste(wm,(25,25),mask)
>>> im.show()
>>>
Here, the alpha channel of 'mask' is used as the mask.
max
--
http://mail.python.org/mailman/listinfo/python-list
t be made easily or more compactly? i am a
python regexp novice.
bye
max
ps: i was trying to pythonate this kind of perl code:
$riga =~ s/%([A-Fa-f0-9][A-Fa-f0-9])/chr(hex($1))/ge;
--
http://mail.python.org/mailman/listinfo/python-list
y exception even if *some_system_command* does not
exist/work...
any help?
thanks a lot
max
--
http://mail.python.org/mailman/listinfo/python-list
bruno modulix wrote:
> max(01)* wrote:
>
>>hi.
>
>
> (snip)
>
>
>>it doesn't work, since "*do_something*" and *do_something_more* are
>>always executed (it seems like
>>
>>MYPIPE = os.popen("*some_system_command*", &
"*some_system_command*", "r")
if not CMD_STDERR.readlines():
...
*do_something*
...
for answer in CMD_STDOUT:
print answer,
...
*do_something_more*
...
else:
...
*do_something_else*
...
CMD_STDIN.close()
CMD_STDOUT.close()
CMD_STDERR.close()
bye
max
--
http://mail.python.org/mailman/listinfo/python-list
max(01)* wrote:
> infidel wrote:
>
>> Here's one technique I use to run an external command in a particular
>> module:
>>
>> stdin, stdout, stderr = os.popen3(cmd)
>> stdin.close()
>> results = stdout.readline
many thanks to all the fellows who cared to answer!
bye
max
--
http://mail.python.org/mailman/listinfo/python-list
TonyHa wrote:
> Hello,
>
> Does any one have using Python to write a Unix "diff" command for
> Window?
I generally just us the diff built into tortoiseSVN. That way it's only
a rightclick away.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Sc
>
> So my question is that am I doing something wrong or there is a
> different way to modify the color of a charater through COM.
>
try GetCharacters(1,1)
max
--
http://mail.python.org/mailman/listinfo/python-list
/bitworking.org/projects/sparklines/
It is a script very similar to what you want to do.
The difference between your script and sparklines is mostly that it
sends:
print "Content-type: image/png"
instead of:
print 'Content-type: text/html'
max
--
http://mail.python.org/mailman/listinfo/python-list
ing to it, I just
wondered what experiences other users might have when using it for
production. Being that my text editing environment is my bread and butter.
Is it stable/effective etc?
Anybody cares to share?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
Fabio Zadrozny wrote:
> Hi Max,
>
> I may be a little (or maybe a lot) biased for it (as I'm its
> maintainer), but as I do 'eat my own dogfood', I though I might share it
> with you...
Enthusiasm doesn't disqualify ;-)
> At my company, everybody that
hi there.
i have some problems understanding following behaviour.
consider this:
...
$ cat file_input_3.pl
#!/usr/bin/perl
open MIAPIPE, "una_pipe";
while ($riga = )
{
print STDOUT ("$riga");
}
$ cat file_input_3.py
#!/usr/bin/python
import sys
MIAPIPE = open("una_pipe", "r")
fo
Eric Nieuwland wrote:
> max(01)* wrote:
>
>> $ cat file_input_3.py
>> #!/usr/bin/python
>>
>> import sys
>>
>> MIAPIPE = open("una_pipe", "r")
>>
>> for riga in MIAPIPE:
>>print riga,
>> ...
>> [...]
t D.copy()
> returns a shallow copy of D, or did I misunderstand the
> difference between a deep and shallow copy?
Sort of, some examples:
Here d1 and d2 are copies. They can be independently changed to
refer to different objects:
>>> d1={'a':1,'b':2}
>>> d2=d1.copy()
>>> d1['a']=3
>>> d2['b']=4
>>> d1
{'a': 3, 'b': 2}
>>> d2
{'a': 1, 'b': 4}
Again, d3 and d4 are copies, but instead of changing the objects
they refer to, we change the contents of the objects they refer to:
>>> d3={'c':[3],'d':[4]}
>>> d4=d3.copy()
>>> d3['c'][0]=5
>>> d4['d'][0]=6
>>> d3
{'c': [5], 'd': [6]}
>>> d4
{'c': [5], 'd': [6]}
Both cases are shallow copies. In a deep copy, altering the contents
of d3['c'] would have no impact on the contents of d4['c'].
max
--
http://mail.python.org/mailman/listinfo/python-list
grepped for datetime in
the library & found plenty of references to it but no module
definition. Where is it defined?
4) How does the python interpreter resolve the statement "import
datatime"?
Thanks,
Max
Code don't lie. Manuals Lie. I'm highly suspicious of browsers.
--
http://mail.python.org/mailman/listinfo/python-list
(row1value1, row1value2,
> row1value3),(row2value1, row2value2, row2value3),...,
> (rowNvalue1, rowNvalue2, rowNvalue3)]
tuple() will consume a list.
>>> tuple([1,2,3])
(1, 2, 3)
>>> tuple([(1,2),(3,4),(5,6)])
((1, 2), (3, 4), (5, 6))
max
--
http://mail.python.org/mailman/listinfo/python-list
blank strings. The default false value indicates that
blank values are to be ignored and treated as if they were
not included.
strict_parsing: flag indicating what to do with parsing errors.
If false (the default), errors are silently ignored.
ob on pydev!
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
and save that to a file.
http://docs.python.org/lib/module-pickle.html
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
s it would normally look:
def func(*arg)
That should work just as well for those cases.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
you've got any ideas.
strings are slicable:
>>> s='a string of characters'
>>> s[:10]
'a string o'
>>> s[-10:]
'characters'
>>>
As far as your other problem, it might make sense(I don't know...) to
just gener
"james hal-pc.org" wrote in
news:[EMAIL PROTECTED]:
> Max Erickson wrote:
>>>>the entire 26 character string from site A, but [1] how do i
>>>>crop it to 10 characters.
>>
>> strings are slicable:
>
> The only reason i've gotten this
Nick Vargish <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> I've been trying to figure out how to do something that seems
> relatively simple, but it's just not coming together for me. I'm
> hoping someone will deign to give me a little insight here.
>
> The problem: We have XML document
27;
>
>
> Does f = open('/tmp/myfile', 'w') overwrite the existing file
> or does f.writelines('456') replace the first line in the
> existing file?
>
> Nico
There is a good explanation in the tutorial:
http://docs.python.org/tut/node9.html#SECTION00920
and more detail is available in the docs for builtin functions:
http://docs.python.org/lib/built-in-funcs.html
(look under file() but probably still use open())
That said, open(file, 'a') will open an existing file to append.
max
--
http://mail.python.org/mailman/listinfo/python-list
Tor Erik Sønvisen wrote:
> Hi
>
> Is there any simpler way to convert a unicode numeric to an int than:
>
> int(u'1024'.encode('ascii'))
why doesn't:
int(u'104')
work for you?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
I
x27;t work. You have to suggest that it 'try ... except', which is
really offensive. If I want to beg my computer to run programs, I know
where to find Intercal with its "PLEASE" and "DO PLEASE" constructions.
Wasn't there talk about a "try harder" recently
developing something like a
desktop application that you want to sell for money, using the GPL is a
bad idea.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
7;
Is this really that hard to do, that you want it in the library?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
ist()
>>> for r, ds, fs in os.walk('c:\\bin\\gtest'):
keptfiles.extend(fs)
keptdirs.extend(ds)
>>> keptfiles
['P4064013.JPG', 'P4064015.JPG', 'Thumbs.db', 'P4064026.JPG',
'Thumbs.db', 'Thum
.append(part.get_payload(decode=1))
return attachments
return []
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
a string. In one of the forms:
'1,2,3,4' or '1:4'
The numbers can be either message sequence numbers or uids.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
g an encoding:
ust = unicode(st)
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
able.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
hared effort" in the
single sub-project, it might very well be on a higher level.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
you might also want to take a look at
http://unxutils.sourceforge.net/
where are the tools are available in a single zip file.
max
--
http://mail.python.org/mailman/listinfo/python-list
can be a little simpler:
listA = list(Set(listA))
You don't even need to convert it to a list. You can just iterate over
the set.
>>> la = [1,2,3,4,3,2,3,4,5]
>>> from sets import Set
>>> sa = Set(la)
>>> for itm in sa:
... print itm
1
2
3
filename):
ns=dict()
execfile(filename, ns)
print ns['testvar']
should at least get you going. There is probably a way to pass the
namespace of the function to execfile, but I do not know it.
max
--
http://mail.python.org/mailman/listinfo/python-list
ted sub entries into a list
of strings?
In Twisteds protocols/imap4.py module there is a function called
parseNestedParens() that can be ripped out of the module.
I have used it for another project and put it into this attachment.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad S
x27;t support unicode, but you should not have problem
importing/exporting encoded strings.
I have imported utf-8 encoded string with no trouble. But I might just
have been lucky that they are inside the latin-1 range?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Scien
to check out freevo at http://freevo.sourceforge.net/ as it is
quite similar to what you are describing and they are quite far along.
max
--
http://mail.python.org/mailman/listinfo/python-list
Gregor Horvath wrote:
thanks are given to all
"problem" solved...
Personally I add a , after every list/tuple item. Also the last.
It also makes copy/pasting code easier.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/
Convention
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Brian Quinlan wrote:
> Max M wrote:
>
>> Is there any codec available for handling The special UTF-7 codec for
>> IMAP?
> Is there something special do you need or is recipe OK?
>
> >>> u"\u00ff".encode('utf-7')
> '+AP8-'
A
dice1, dice2 = rolldice()
roll += 1
if dice1 + dice2 == 7:
print 'Too bad, you loose in roll %s' % roll
result = None
elif (dice1, dice2) == (first1, first2):
print 'Congratulations, you win in roll %s' % roll
result = None
Hopefully h
Dan Perl wrote:
"Max M" <[EMAIL PROTECTED]> wrote in message
Most of us here have been students (or still
are) and may sympathize with the OP, but personally I have been also a TA so
I have seen the other side and that's where my sympathy lies now.
My reply was a joke... M
://initd.org/projects/psycopg1
Postgres runs fine on Windows now in a native version. And pgAdmin is a
pretty nice tool.
A precompiled psycopg is the missing link. Thanks. I will try it out.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/ma
app and restart it later, there'd be a way to bring d back
into the process and have that Frob instance be there.
Have you considdered using the standalone ZODB from Zope?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
u might be more comfortable with:
data = [['foo','bar','baz'],['my','your'],['holy','grail']]
result = []
for l in data:
result += l
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
Max M wrote:
I tried funnies like [[w for w in L] for L in data],
That is absolutely correct. It's not a funnie at all.
well, syntactically correct or not, it doesn't do what he want...
Doh! *I* might not be used to list comprehensions then... You are right.
Th
nd stuff. You should get tons of answers.
##
st = '80 00 00 00'
import binascii
import struct
s = ''.join([binascii.a2b_hex(s) for s in st.split()])
v = struct.unpack("f", s)[0]
print v
##
regards Max M
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
ftware/BeautifulSoup/
I will most likely do what you want in 2 or 3 lines of code.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
t the time taken to convert a list into a tuple.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
return st_encoded, encoding
except UnicodeError:
pass
st = 'Test characters æøå ÆØÅ'
encodings = ['utf-8', 'latin-1', 'ascii', ]
print get_encoded(st, encodings)
(u'Test characters \xe6\xf8\xe5 \xc6\xd8\xc5', '
using those email adresse, or you don't log on
with the correct credentials.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
The entity Fredrik Lundh wrote:
Isn't it about time you became xml avare, and changed that to:
?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
Max M wrote:
Isn't it about time you became xml avare, and changed that to:
Yeah, but give the guy a break, we've all made feeble attempts at humor
from time to time.
Hey, what's wrong with a little nørd humor...
I just found it amusing that somenone like Fred
to find those than it is to use them as the
sender.
Most email clients can fetch the settings from other mail clients, so
it's been done before.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
project which does that on different platforms. But I am
not aware how well they work.
The best place to ask is probably on the Python Midi list at:
http://sourceforge.net/mail/?group_id=113783
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/ma
len(RecipWork)
# Formulate the recipients
MapiRecipDesc_A = MapiRecipDesc * len(RecipWork)
rda = MapiRecipDesc_A()
for rd, ra in zip(rda, RecipWork):
rd.ulReserved = 0
rd.ulRecipClass = MAPI_TO
rd.lpszName = None
rd.lpszAddress = ra
rd.ulEIDSize = 0
rd.lpEntryID = None
recip = rda
# send the message
msg
Steve Holden wrote:
Max M wrote:
Lenard Lindstrom wrote:
So what is this, some kind of competition? If you really though Lenard's
quoting was a sin (since I took your remarks to be sardonic), how much
more so was your gratuitous repetition thereof?
I thought that showing by example might h
Tian wrote:
How can I create an instance of an object from a string?
For example, I have a class Dog:
class Dog:
def bark(self):
print "Arf!!!"
def Factory(class_name):
classes = {
'Dog':Dog
}
return classes[class_name]
dog = Factory('Dog&
hello everybody.
i am a a bit of a newbie in python/tkinter,and i am experimenting a bit
with widgets like checkbuttons.
in python, you can create a checkbutton instance like this:
self.tergicristalli = IntVar()
self.b1 = Checkbutton(self.pulsanti_spunta)
self.b1.configure(
text = "Tergicr
hi there!
this post is somewhat a generalization of one previous question.
i was wondering if it is possible to pass an argument list as a
parameter to a function. example:
def fun_con_pc(pc1 = "Ciao!", pc2 = 42):
print pc1
print pc2
fun_con_pc()
fun_con_pc(pc1 = "Addio...")
fun_con_pc(pc2 = 66
hi people.
when i create a widget, such as a toplevel window, and then i destroy
it, how can i test that it has been destroyed? the problem is that even
after it has been destroyed, the instance still exists and has a tkinter
name, so testing for None is not feasible:
>>> import Tkinter
>>> fin
Eric Brunel wrote:
On Tue, 29 Mar 2005 10:37:10 GMT, max(01)* <[EMAIL PROTECTED]> wrote:
hi people.
when i create a widget, such as a toplevel window, and then i destroy
it, how can i test that it has been destroyed? the problem is that even
after it has been destroyed, the instance still
Fredrik Lundh wrote:
"max(01)*" <[EMAIL PROTECTED]> wrote:
see what i mean?
not really, but maybe
arg = {"pc2": 666, "pc1": "Addio..."}
fun_con_pc(**arg)
is what you want?
precisely! thanks a lot!
macs
--
http://mail.python.org/mailman/listinfo/python-list
hello.
the following code:
1 from Tkinter import *
2
3 class MiaApp:
4 def __init__(self, genitore):
5 self.mioGenitore = genitore
6 self.i = IntVar()
7 self.i.set(42)
8 self.s = StringVar()
9 self.s.set("Baobab")
10
hello.
the following code:
1 from Tkinter import *
2
3 class MiaApp:
4 def __init__(self, genitore):
5 self.mioGenitore = genitore
6 self.i = IntVar()
7 self.i.set(42)
8 self.s = StringVar()
9 self.s.set("Baobab")
10
ror
Why do you need the 'HEADER'
Wouldn't this be enough?
resp, items = server.search(None, 'Message-id', msgID)
I am note shure if the msgId should be quoted. I assume not, as it will
allways be an integer.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Pierre Quentel wrote:
Instead of indexing self.lab by strings, you can index them by the
attributes themselves : self.lab[self.i], and change line 23 into
for var in (self.s, self,i)
For your example, I wouldn't have used the "text" option in the
definition of the labels, then "textvariable
Eric Brunel wrote:
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel
<[EMAIL PROTECTED]> wrote:
[...]
mr brunel,
i thank you for prompt reply. i will take my time to read it carefully.
meanwhile, i inform you and the ng that someone else gave me a quick and
dirty answer to my problem, namely sub
are you going to fix it?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
_string, substring) # note the order
searched_string=""
print string.find(searched_string, substring)
You will not make that error if you use the string method instead.
searched_string.find(substring)
And you don't have to import anything either..
--
hilsen/regards Max M, Denmar
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it uses
names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion of modules in c is a purely preproces
Eric Brunel wrote:
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel
<[EMAIL PROTECTED]> wrote:
Instead of indexing self.lab by strings, you can index them by the
attributes themselves : self.lab[self.i], and change line 23 into
for var in (self.s, self,i)
I really think this is asking fo
aining files owned by a specific user, do something
like:
>>> files=[line.split()[-1] for line in a if owner in line]
>>> len(files)
118
This is throwing away directory information, but using os.walk()
instead of the /s switch to dir should work, if you need it...
max
--
http://mail.python.org/mailman/listinfo/python-list
Tim Jarman wrote:
max(01)* wrote:
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it uses
names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion of
Peter Hansen wrote:
max(01)* wrote:
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it
uses names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion
101 - 200 of 1012 matches
Mail list logo