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
>
> 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 linke
> 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 informat
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 a
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
sock=
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 infor
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 th
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:
>>
>> Appl
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,
luster123 <[EMAIL PROTECTED]> writes:
> Can someone please teach me the basics of Python and Pygame?
Yes, you can do it.
http://docs.python.org/tut/tut.html>
http://www.python.org/doc/>
http://clusty.com/search?query=pygame+tutorial>
--
\ “Too many pieces of music finish too long after th
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 subjec
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
sh
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
>
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.
http://docs.python.org/tut/tut.html>
http://www.python.org/doc/>
http://clusty.com/search?que
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 discover
-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 G
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')
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
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 progr
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 nee
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
>> >> (wch
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, th
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
Type
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?
http://en.wikipedia.org/wiki/Portable_Network_Graphics#Transparency
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 sock
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 it'
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
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 - t
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 r
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:
> > > 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.) Se
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 y
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 w
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 342
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
http://www.ironpythonin
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())
p
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 th
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 i
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
"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
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], tha
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 Py
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 ne
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
exac
Bill Davy wrote:
Traceback (most recent call last):
File "H:/Personal/OutlookIF1/t2.py", line 18, in
outlook = win32com.client.gencache.EnsureDispatch
("Outlook.Application")
File "C:\Python25\Lib\site-packages\win32com\client\gencache.py", line
536, in EnsureDispatch
mod = EnsureM
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, bu
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
Fi
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 prob
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 un
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.
>
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 li
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]
> >>>
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
metaclass
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 do
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 edit
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"
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 t
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
ur
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:
http://lists.njs-javascript.org/cgi-bin/mailman/
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
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:
> result_list.a
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 O
>>>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/u
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 UT
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 b
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 kno
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 c
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
On Jul 11, 1:29 pm, WDC <[EMAIL PROTECTED]> wrote:
> 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?
>
On Jul 11, 11:35 pm, Paddy <[EMAIL PROTECTED]> wrote:
> 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 examp
On Jul 9, 5:34 pm, keith <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
>
> Ethan Furman wrote:
> > writeson wrote:
> >> Guys,
>
> >> Thanks for your replies, they are helpful. I should have included in
> >> my initial question that I don't have as much control ove
Hi ,
I am trying to attach a cairo object into a vbox.I can pack a textbox with the
following code:
entry = gtk.Entry()
entry.set_max_length(50)
entry.connect("activate", self.enter_callback, entry)
entry.set_text("hello")
entry.insert_text(" world", len(entry.get_text()))
> If didn't investigate everything but I solved the problem by adding
> the "-static-libgcc" option:
>
> CFLAGS="-w -static-intel -static-libgcc"
>
> I think one should commit changes so configure can manage this.
I don't think that change should be made. I'm almost certain that it is
correct. M
On 11 Jul., 15:25, Fuzzyman <[EMAIL PROTECTED]> wrote:
> 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
vanam <[EMAIL PROTECTED]> writes:
> hi all
> i am new to python programming a beginner. I Came to know from the
> groups that "How to think like a computer scientist" is preferable for
> begineers. i just looking through that i came to one section where a
> sample program for generation of graphic
1 - 100 of 136 matches
Mail list logo