We'll be holding our regular Toronto Python User's Group (PyGTA) this
upcoming Tuesday the 15th 7pm at Linux Caffe, on the corner of Grace and
Harbord Street. At the moment we don't have a confirmed speaker, so I
was thinking we might try the following (inspired by one of Greg
Wilson's recent
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Last year, I was humbly honored to be awarded the 2007 Antonio
Pizzigati Prize for Software in the Public Interest. This year, I am
honored to serve on the awards committee for the 2008 prize.
From the PDF flyer:
The Tides Foundation is
2008/7/11, Alex Bryan [EMAIL PROTECTED]:
I am just wondering how you get an integer value for how many items there
are in a list, preferably w/o a for loop.
--
http://mail.python.org/mailman/listinfo/python-list
Use len
len([1,2,3])
3
vbr
--
Terry Reedy [EMAIL PROTECTED] writes:
Ben Finney wrote:
Can anyone see a reason to believe the above wiki page's statement
about the 'string' module being removed? More to the point, can
anyone see a reason why that statement should remain on that page?
Removing string and moving the
Xah Lee wrote:
«
... emacs program and tutorial that does archiving a website for
offline reading. (See http://xahlee.org/emacs/make_download_copy.html
)
»
Sashi wrote:
«Why not use wget or curl?»
The Emacs lisp program makes a archive of parts of website you own, so
that readers of your website
I am working in an organization, which is using a very strict
webcontent filter management suite. Due to this i am unable to
download any exe file, or surf web (even the necessary downloads from
sourceforgenet are blocked). I was wondering, if python could be of
any help. Say i have a python
On 1 Jul., 15:15, Mel [EMAIL PROTECTED] wrote:
rocksportrockerwrote:
Hi,
the following code does not work until I ommit the a=0 statement.
def test():
exec a=3 in locals()
print a
a=0
test()
print raises:
UnboundLocalError: local variable
Trent Mick wrote:
Stef Mientki wrote:
one small remark,
If I want to browse 200 recipes, at 10 per page
... please make something like 100 available per page,
are internet is fast enough nowadays.
Touche. Done:
http://code.activestate.com/recipes/?paginate_by=100
The old
Thank you Martin. How can I remove -lgcc_s and use the Intel equivalent ?
I'm not so sure that there is anything wrong in configure. configure
doesn't pass -lgcc_s to icc; instead, icc is making this up on its
own. So I would guess you need to get libgcc_s onto you system in a
way that the
This is rather disappointing. Is that entire page suspect?
All documentation about Python 3 is suspect until Python 3 gets
actually released (nobody can say for sure how the release will
look like in all details).
Wiki pages, traditionally, are always suspect for incorrect
or outdated
On Jul 11, 11:42 am, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
I am working in an organization, which is using a very strict
webcontent filter management suite. Due to this i am unable to
download any exe file, or surf web (even the necessary downloads from
sourceforgenet are blocked). I
En Wed, 09 Jul 2008 15:02:56 -0300, Mirko Vogt [EMAIL PROTECTED] escribi�:
it seems that the socket-module behaves differently on unix / windows
when a timeout is set.
[...]
Now I will change the code slightly - to be precise I set a timeout on
the socket:
# test.py
import socket
Greetings, List!
Still working on my Measure class, and my next question is... (drum roll
please ;)
What are the advantages of using __[eq|ne|lt|gt|le|ge]__ vs __cmp__?
Thanks in advance!
--
Ethan
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis [EMAIL PROTECTED] writes:
This is rather disappointing. Is that entire page suspect?
All documentation about Python 3 is suspect until Python 3 gets
actually released (nobody can say for sure how the release will
look like in all details).
Is there a better information
Uwe Schmitt wrote:
Apparently, exec in locals() knows nothing about slots (because locals()
is the only dictionary in the universe where slots would be involved ? --
perhaps not, but close).
Mel.
Thanks for your answer. I wonder if this is a bug, or did I miss
something in the docs ???
En Thu, 10 Jul 2008 14:02:29 -0300, Bhagwat Kolde [EMAIL PROTECTED]
escribi�:
What is the correct process of installing any external python module?
Once we downloaded any python module,
Q1) Where this module should be placed in python installation file
structure?
If it is a single Python
Thin Myrna wrote:
The old cookbook offered choices by category. Did you drop that feature?
Looks like categories have become tags:
http://code.activestate.com/recipes/tags/
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Tim Golden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Bill Davy wrote:
I'm not sure OL2003 can read news. I think perhaps some later OL can
(added tot he View menu, perhaps?). So I use OL Express to read news.
The OL with which I wish to communicate is:
Application name
Hi
I need to use a .dll from a python script.I have installed pywin.But
in the program ,which is like:
import dllName
I get :
Import Error : DLL not found
Please suggest a solution!
--
http://mail.python.org/mailman/listinfo/python-list
Hey,
Can someone please teach me the basics of Python and Pygame?
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 10 Jul 2008 18:10:46 -0300, Guy Davidson [EMAIL PROTECTED]
escribi�:
On Jul 10, 12:38 pm, samwyse [EMAIL PROTECTED] wrote:
On Jul 10, 1:50 pm, Guy Davidson [EMAIL PROTECTED] wrote:
My code (attached below) us supposed to read an HTTP Post message
coming from a power meter, parse
luster123 [EMAIL PROTECTED] writes:
Can someone please teach me the basics of Python and Pygame?
Yes, you can do it.
URL:http://docs.python.org/tut/tut.html
URL:http://www.python.org/doc/
URL:http://clusty.com/search?query=pygame+tutorial
--
\ “Too many pieces of music finish too long
P4D = E4X style embedded DSL for Python but without E and X.
For more information see:
http://pypi.python.org/pypi/P4D/1.1-py2.5
--
http://mail.python.org/mailman/listinfo/python-list
moijes12 wrote:
I need to use a .dll from a python script.I have installed pywin.But
in the program ,which is like:
import dllName
I get :
Import Error : DLL not found
Please suggest a solution!
Well, the short answer is: use the ctypes module.
The longer answer is: read around the
En Thu, 10 Jul 2008 17:37:42 -0300, Ethan Furman [EMAIL PROTECTED]
escribi�:
Greetings, List!
Still working on my Measure class, and my next question is... (drum roll
please ;)
What are the advantages of using __[eq|ne|lt|gt|le|ge]__ vs __cmp__?
If your objects obey the trichotomy law
En Thu, 10 Jul 2008 22:20:21 -0300, Alok Kumar [EMAIL PROTECTED]
escribi�:
I need to have a python webserver which can handle Get request from the
clients and upload the *files* from 4 different directories.
Can someone please point me what to exactly look for.
Look at SimpleHTTPServer.py
Hey All
Just been messing around with django and found that can not seam to get
admin to work how, it does not support multilayer input I want it I know
there is some way of writing your own view, but wondering would it be
possible to write a multilayer setup or what is the wok around or what
En Fri, 11 Jul 2008 03:51:39 -0300, Uwe Schmitt
[EMAIL PROTECTED] escribi�:
On 1 Jul., 15:15, Mel [EMAIL PROTECTED] wrote:
rocksportrockerwrote:
the following code does not work until I ommit the a=0 statement.
def test():
exec a=3 in locals()
print a
a=0
En Fri, 11 Jul 2008 05:49:23 -0300, Ben Finney
[EMAIL PROTECTED] escribi�:
luster123 [EMAIL PROTECTED] writes:
Can someone please teach me the basics of Python and Pygame?
Yes, you can do it.
URL:http://docs.python.org/tut/tut.html
URL:http://www.python.org/doc/
First I'll introduce myself. I normally programm in C/C++ and Java.
Sometimes I have to mix them (normally using C/C++ in java, because in
java is easier to make portable graphic user interfaces). However to
use C/C++ code in java is really complex and difficult.
Not too much time ago, I
-On [20080711 06:18], YIN Ming ([EMAIL PROTECTED]) wrote:
2. use new version of gcc (rather than odd version)
See
http://www.in-nomine.org/2008/04/11/python-26a2-execution-times-with-various-compilers/
that I wrote a while ago.
Basically for Python GCC 3.4.6 outperformed the newer GCCs. So
pauladospublicidad schrieb:
First I'll introduce myself. I normally programm in C/C++ and Java.
Sometimes I have to mix them (normally using C/C++ in java, because in
java is easier to make portable graphic user interfaces). However to
use C/C++ code in java is really complex and difficult.
Not
Hi all,
Had a simple problem that turned into an interesting solution and I
thought I would share it here.
I had a list of tuples that I needed to get the first value from and
generate a list.
tuple_list = (
('John', 'Doe'),
('Mark', 'Mason'),
('Jeff', 'Stevens'),
('Bat', 'Man')
for python2.5 compilation on
Solarissparc/x86, AIX, Linux
-On [20080711 06:18], YIN Ming ([EMAIL PROTECTED]) wrote:
2. use new version of gcc (rather than odd version)
See
http://www.in-nomine.org/2008/04/11/python-26a2-execution-times-with-various-compilers/
that I wrote a while ago.
Basically
James Fassett:
# the first Pythonic attempt using comprehensions
result_list = [x[0] for x in tuple_list]
# the final functional way
[result_list, _] = zip(*tuple_list)
I really like how Python allows me to do what I feel is the most
natural solution (for a seasoned procedural programmer)
2008/7/11 Martin v. Löwis [EMAIL PROTECTED]:
Thank you Martin. How can I remove -lgcc_s and use the Intel equivalent ?
I'm not so sure that there is anything wrong in configure. configure
doesn't pass -lgcc_s to icc; instead, icc is making this up on its
own. So I would guess you need to get
2008/7/11 WDC [EMAIL PROTECTED]:
On Jul 10, 6:57 pm, Mathieu Prevot [EMAIL PROTECTED] wrote:
2008/7/10 Martin v. Löwis [EMAIL PROTECTED]:
I have the following error when I run configure:
checking size of wchar_t... configure: error: cannot compute sizeof
(wchar_t)
what can I do ?
On Jul 11, 2:09 pm, Tim Golden [EMAIL PROTECTED] wrote:
moijes12 wrote:
I need to use a .dll from a python script.I have installed pywin.But
in the program ,which is like:
import dllName
I get :
Import Error : DLL not found
Please suggest a solution!
Well, the short answer is:
Hello Everyone,
I want to serialize and deserialize the objects into Memory not into
file. How can i do that?
Best Regards,
--
http://mail.python.org/mailman/listinfo/python-list
hardemr schrieb:
Hello Everyone,
I want to serialize and deserialize the objects into Memory not into
file. How can i do that?
Use pickle module StringIO/cStringIO as file-to-memory-object.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am running Python and MySQL on Ubuntu and have installed MySQLdb. If I
try to import MySQLdb I get the following error:
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 16:42:08)
[GCC 3.3.1 (SuSE Linux)] on linux2
Type help, copyright,
martinnorth schrieb:
Hi,
I am running Python and MySQL on Ubuntu and have installed MySQLdb. If I
try to import MySQLdb I get the following error:
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 16:42:08)
[GCC 3.3.1 (SuSE Linux)] on linux2
Is it possible the module was installed with priviledges set too
strict? Perhaps the interpreter cannot see the module when it is run
from a normal user account.
--
http://mail.python.org/mailman/listinfo/python-list
Durand wrote:
I posted this too soon. Converting the images to png with image magick's
convert did the trick...However, I'm still not sure why I need to convert the
images in the first place. Are there different types of PNGs?
Gabriel Genellina wrote:
En Wed, 09 Jul 2008 15:02:56 -0300, Mirko Vogt [EMAIL PROTECTED] escribi�:
it seems that the socket-module behaves differently on unix / windows
when a timeout is set.
[...]
Now I will change the code slightly - to be precise I set a timeout on
the socket:
#
In Python programs, you will quite frequently find code like the
following for removing a certain prefix from a string:
if url.startswith('http://'):
url = url[7:]
Similarly for stripping suffixes:
if filename.endswith('.html'):
filename = filename[:-5]
My problem with this is that
martinnorth wrote:
Hi,
I am running Python and MySQL on Ubuntu and have installed MySQLdb. If I
try to import MySQLdb I get the following error:
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 16:42:08)
[GCC 3.3.1 (SuSE Linux)] on linux2
Jeff schrieb:
Is it possible the module was installed with priviledges set too
strict? Perhaps the interpreter cannot see the module when it is run
from a normal user account.
Possible - certainly. Yet unrealistic, because usually root access is
*required* to system-wide install a package -
Following links from this thread:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/179e1a45485ab36a#
I have found this perfect hash (minimal too) implementation:
http://burtleburtle.net/bob/hash/perfect.html
I have already translated part of it to D, and it seems to work well
On Jul 11, 3:06 am, Ben Finney [EMAIL PROTECTED]
wrote:
Martin v. Löwis [EMAIL PROTECTED] writes:
This is rather disappointing. Is that entire page suspect?
All documentation about Python 3 is suspect until Python 3 gets
actually released (nobody can say for sure how the release will
Christoph Zwerschke a écrit :
In Python programs, you will quite frequently find code like the
following for removing a certain prefix from a string:
if url.startswith('http://'):
url = url[7:]
DRY/SPOT violation. Should be written as :
prefix = 'http://'
if url.startswith(prefix):
On Jul 11, 12:27 am, eliben [EMAIL PROTECTED] wrote:
snip 2) What is the meaning of the comment in astgen.py ? Are the Python
maintainers unhappy with the design of the AST ?3
Node, I think, is talking about a node in the parse tree. (AST is
generated from another parse tree.) See PEP
hardemr wrote:
Hello Everyone,
I want to serialize and deserialize the objects into Memory not into
file. How can i do that?
You want to serialize the objects, but only keep them in memory? That
hardly makes any sense. Serialization is need if you want to store your
objects in a file or if
Tim Mitchell wrote:
Thanks for all the replies - they have all been helpful.
On reflection I think our problems are probably design and people related.
I strongly agree. Scalability is becoming a buzzword lately, which is
meaningless unless qualified what exactly is meant.
It's overused
On Jul 11, 12:58 pm, hardemr [EMAIL PROTECTED] wrote:
Hello Everyone,
I want to serialize and deserialize the objects into Memory not into
file. How can i do that?
pickle.dumps and pickle.loads.
--Inyeol
--
http://mail.python.org/mailman/listinfo/python-list
Bill Davy wrote:
and since then have been busy with work, and my other job, and the garden.
Aha! So you're English, are you? Looks like you're in the West Country.
Weather map suggests you're not short of rain over there :)
Now I am back looking at this (and using WInUSB to talk to a Maxim
Hello,
I can not find out how to read a file into a list of lists. I know how
to split a text into a list
sentences = line.split(\n)
following text for example should be considered as a list of lists (3
columns and 3 rows), so that when I make the print statement list[0]
[0], that the word pear
On Jul 11, 10:09 am, Kay Schluehr [EMAIL PROTECTED] wrote:
P4D = E4X style embedded DSL for Python but without E and X.
For more information see:
http://pypi.python.org/pypi/P4D/1.1-py2.5
That looks a lot like YAML. Any reason to use it over YAML?
Michael Foord
Hello,
A way to do it
===
from __future__ import with_statement
res = []
with open(sentences.txt,r) as f:
sentences = [elem for elem in f.read().split('\n') if elem]
for sentence in sentences:
res.append(sentence.split())
On 11 Lug, 15:15, antar2 [EMAIL PROTECTED] wrote:
Hello,
I can not find out how to read a file into a list of lists. I know how
to split a text into a list
sentences = line.split(\n)
following text for example should be considered as a list of lists (3
columns and 3 rows), so that when I
Diez B. Roggisch wrote:
Is it possible the module was installed with priviledges set too
strict? Perhaps the interpreter cannot see the module when it is run
from a normal user account.
Possible - certainly. Yet unrealistic, because usually root access is
required to system-wide install a
Trying to read a pickled filed and list contents.
The attached program works using pprint, but I want to write to my frame.
WriteText only produces half of the records.
What is happening?
(See attached file: ReadDB_b.py)
D. J. Webre, Jr. PE PLS
Director of Engineering Technical Support
On Jul 11, 2:15 pm, antar2 [EMAIL PROTECTED] wrote:
Hello,
I can not find out how to read a file into a list of lists. I know how
to split a text into a list
sentences = line.split(\n)
following text for example should be considered as a list of lists (3
columns and 3 rows), so that when
Tim Golden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Bill Davy wrote:
and since then have been busy with work, and my other job, and the
garden.
Aha! So you're English, are you? Looks like you're in the West Country.
Weather map suggests you're not short of rain over there
antar2 wrote:
Hello,
I can not find out how to read a file into a list of lists. I know how
to split a text into a list
sentences = line.split(\n)
following text for example should be considered as a list of lists (3
columns and 3 rows), so that when I make the print statement list[0]
[0],
On Jul 11, 6:26 am, Benjamin [EMAIL PROTECTED] wrote:
On Jul 11, 3:06 am, Ben Finney [EMAIL PROTECTED]
wrote:
Martin v. Löwis [EMAIL PROTECTED] writes:
This is rather disappointing. Is that entire page suspect?
All documentation about Python 3 is suspect until Python 3 gets
I'm by no means a testing expert, but I'll take a crack at it.
Casey McGinty wrote:
I'm familiar with the unittest module in Python, however I'm hoping
someone can point me to some examples of more advanced usages of the
framework. For example:
1. Using the framework to test a package with
Bruno Desthuilliers schrieb:
DRY/SPOT violation. Should be written as :
prefix = 'http://'
if url.startswith(prefix):
url = url[len(prefix):]
That was exactly my point. This formulation is a bit better, but it
still violates DRY, because you need to type prefix two times. It is
Bill Davy wrote:
Traceback (most recent call last):
File H:/Personal/OutlookIF1/t2.py, line 18, in module
outlook = win32com.client.gencache.EnsureDispatch
(Outlook.Application)
File C:\Python25\Lib\site-packages\win32com\client\gencache.py, line
536, in EnsureDispatch
mod =
On Fri, 11 Jul 2008 16:45:20 +0200, Christoph Zwerschke wrote:
Bruno Desthuilliers schrieb:
DRY/SPOT violation. Should be written as :
prefix = 'http://'
if url.startswith(prefix):
url = url[len(prefix):]
That was exactly my point. This formulation is a bit better, but it
still
Laurent Rahuel wrote that antar2 wrote:
following text for example should be considered as a list of lists (3
columns and 3 rows), so that when I make the print statement list[0]
[0], that the word pear appears
pear noun singular
books nouns plural
table noun singular
File objects are
After spending the morning debugging where I had misspelled the name of an
attribute (thus adding a new attr instead of updating an existing one), I
would like a way to decorate a class so that attributes cannot be (easily)
added.
I guess class decorators are not available yet (pep 3129), but
Editra is a multi-platform text editor with an implementation that focuses
on creating an easy to use interface and features that aid in code
development. Currently it supports syntax highlighting and variety of other
useful features for over 60 programming languages.
Editra is freely available
It has been already in wxpython-doc-demos package.
On Fri, Jul 11, 2008 at 11:38 PM, Henry Read [EMAIL PROTECTED] wrote:
Editra is a multi-platform text editor with an implementation that focuses
on creating an easy to use interface and features that aid in code
development. Currently it
On Jul 11, 5:29 pm, Neal Becker [EMAIL PROTECTED] wrote:
After spending the morning debugging where I had misspelled the name of an
attribute (thus adding a new attr instead of updating an existing one), I
would like a way to decorate a class so that attributes cannot be (easily)
added.
I
In article [EMAIL PROTECTED],
Terry Reedy [EMAIL PROTECTED] wrote:
David C. Ullrich wrote:
In article
[EMAIL PROTECTED],
ssecorp [EMAIL PROTECTED] wrote:
I am never redefining the or reassigning the list when using validate
but since it spits the modified list back out that
In article
[EMAIL PROTECTED],
ssecorp [EMAIL PROTECTED] wrote:
def mod(x,y):
return x.append(y)
mod([1,2],3)
k=[1,2,3]
k
[1, 2, 3]
l = mod(k,4)
l
k
[1, 2, 3, 4]
l
k==l
False
mod(k,5)
k
[1, 2, 3, 4, 5]
mod(l,4)
Traceback (most recent call last):
File
Michele Simionato wrote:
This article could give you same idea (it is doing the opposite,
warning you
if an attribute is overridden):
http://stacktrace.it/articoli/2008/06/i-pericoli-della-programmazione-con-i-mixin1/
There is also a recipe that does exactly what you want by means of a
I am currently learning, and loving, Python and have a question about
random().
Right now, what I have to do to get a whole number and not a decimal
using random.random() is this:
random.random()
0.84765728501856734
_ * 10**17
84765728501856734.0
Is there a better way to do that besides doing
Hello,
I'm having terrible problems building C++ extension to Python 2.4 using
SWIG. I'd appreciate if somebody knowledgeable at the subject took a
look at it. swig-1.3.29, g++ (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52).
I used following commands to build C++ extension:
# swig -c++ -python
On Jul 11, 6:38 pm, Robert Bossy
I don't get it. Why use a metaclass? Wouldn't the following be the same,
but easier to grasp:
class Frozen(object):
def __setattr__(self, name, value):
if not hasattr(self, name):
raise AttributeError, cannot add attributes to %s % self
On Jul 11, 3:36 am, [EMAIL PROTECTED] wrote:
James Fassett:
# the first Pythonic attempt using comprehensions
result_list = [x[0] for x in tuple_list]
# the final functional way
[result_list, _] = zip(*tuple_list)
I really like how Python allows me to do what I feel is the most
And what's infuriating is that the .o files do contain the necessary symbol:
# grep _Z13edit_distanceRSsS_ *
Binary file edit_distance.o matches
Binary file _edit_distance.so matches
Binary file edit_distance_wrap.o matches
--
http://mail.python.org/mailman/listinfo/python-list
spam
--
http://mail.python.org/mailman/listinfo/python-list
Christoph Zwerschke [EMAIL PROTECTED] wrote:
In Python programs, you will quite frequently find code like the
following for removing a certain prefix from a string:
if url.startswith('http://'):
url = url[7:]
If I came across this code I'd want to know why they weren't using
NJSModule?
http://en.wikipedia.org/wiki/NJS
Daniel Fetchinson wrote:
This seems to be very good indeed. Just downloaded njs but the only
njsmodule version I could find was for python 2.1. Does anyone have a
recent copy?
1. You might ask here:
Peter Otten wrote:
Thin Myrna wrote:
The old cookbook offered choices by category. Did you drop that feature?
Looks like categories have become tags:
http://code.activestate.com/recipes/tags/
Yes, that is correct. I should document the tag names to category
mapping that I've used (mostly
You wrote...
Is there a better way to do that besides doing this:
random.randint(0, 9)
09657398671238769
Maybe this?
random.randint(0, 9e16)
--
The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
On Jul 11, 12:00 pm, James Fassett [EMAIL PROTECTED] wrote:
tuple_list = (
('John', 'Doe'),
('Mark', 'Mason'),
('Jeff', 'Stevens'),
('Bat', 'Man')
)
# what I'd do in C or other procedural languages
result_list = []
for item in tuple_list:
On Jul 11, 2:15 pm, Michiel Overtoom [EMAIL PROTECTED] wrote:
You wrote...
Is there a better way to do that besides doing this:
random.randint(0, 9)
09657398671238769
Maybe this?
random.randint(0, 9e16)
--
The ability of the OSS process to
NJSModule?
http://en.wikipedia.org/wiki/NJS
This seems to be very good indeed. Just downloaded njs but the only
njsmodule version I could find was for python 2.1. Does anyone have a
recent copy?
1. You might ask here:
http://lists.njs-javascript.org/cgi-bin/mailman/listinfo/users
2. Did
Hi,
I am having a little trouble figuring out how to convert a python
datetime to UTC. I have a UTC date (e.g. 2008-07-11 00:00:00). I would
like to create a UTC date so that when I send it to MySQL (which
treats all dates at local dates by default), it will already have
incorporated the proper
I'm trying to read mail using the imaplib module. I can get the subject and
date, but not the body, have not found any example on how to do that and I
don't know much about imap. Here's what I have, working as noted...
If anyone can show me what I'm missing in order to get the body of a mail
Ben Finney wrote:
Martin v. Löwis [EMAIL PROTECTED] writes:
This is rather disappointing. Is that entire page suspect?
All documentation about Python 3 is suspect until Python 3 gets
actually released (nobody can say for sure how the release will
look like in all details).
Is there a
Alex Bryan wrote:
I am just wondering how you get an integer value for how many items
there are in a list, preferably w/o a for loop.
Read the library reference sections on built-in functions and classes.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
James Fassett:
# the first Pythonic attempt using comprehensions
result_list = [x[0] for x in tuple_list]
This has the virtue of working for tuples of any length and doing the
minimal work required.
# the final functional way
[result_list, _] = zip(*tuple_list)
Hi,
I am using a gtk.filechooser dialog to open and save files.How do I add a
filter so that only images are filtered ?I did something like this:
def get_save_filename(self):
filename = None
chooser = gtk.FileChooserDialog(Save File..., self.window,
On Fri, Jul 11, 2008 at 3:09 PM, Mr SZ [EMAIL PROTECTED] wrote:
ff = gtk.FileFilter.add_pixbuf_formats()
The documentation doesn't say anything about an argument to be passed:
http://www.pygtk.org/docs/pygtk/class-gtkfilefilter.html#method-gtkfilefilter--add-pixbuf-formats
I don't know
Robert Bossy wrote:
class Foo(Freezeable):
def __init__(self):
self.bar = 42
self.freeze() # ok, we set all variables, no more from here
x = Foo()
print x.bar
x.bar = -42
print x.bar
x.baz = OMG! A typo!
Pretty nice, but unfortunately the subclass has to remember to call freeze
in
On Jul 11, 2:53 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Alex Bryan wrote:
I am just wondering how you get an integer value for how many items
there are in a list, preferably w/o a for loop.
Read the library reference sections on built-in functions and classes.
Quite simple.
If I
1 - 100 of 185 matches
Mail list logo