On 2007-09-19, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> A.T.Hofkamp a écrit :
>> So if copying all methods of a native dictionary is not enough, what should I
>> do to make my class work as a dictionary WITHOUT deriving from dict (which
>> will
>> obviously work).
>>
Hello all,
Thanks fo
On Sep 20, 4:17 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
[...]
> Data structures don't have problems. Programmers do.
That's QOTW material :-)
> ... And language
> designers with sense build languages that minimize the programmers
> problems, not maximize them.
>
...
>
>
Hello!
I'm using os.popen to perform lengthy operation such as building some
project from source.
It looks like this:
def execute_and_save_output( command, out_file, err_file):
import os
def execute_and_save_output( command, out_file, err_file):
(i,o,e) = os.popen3( command )
try:
On Sep 20, 5:02 am, Karthik Gurusamy <[EMAIL PROTECTED]> wrote:
> In the new model, at the time of addition, you need to remember the
> key at that time. If it's a list, you make a copy of the items.
In other words you ask the dict to freeze any mutable keys given to
it.
Try an implementation and y
On Sep 20, 6:52 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Michele Simionato <[EMAIL PROTECTED]> writes:
> > Since the language we have does have multiple inheritance, let's
> > use it to implement mixins.
> > ...
> > So, multiple inheritance is giving us very little for the point of
> > view of m
2
On Sep 19, 5:08 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Terry Reedy" <[EMAIL PROTECTED]> wrote in message
>
>
> This assumes that comparing versions of 1.5 is still relevant. As far as I
> know, his patch has not been maintained to apply against current Python.
> This tells me that no
My setup.py (with extension) seems to work great for build and
install, but for bdist_rpm, compilation of the extension fails because
some of the headers needed to build the extension aren't in the bdist
tarball.
I've tried adding a 'depends=[]' to the Extension definition with
these header files
Ahmad ㋡ Baitalmal schrieb:
> Hi,
> I'm having a hard time getting python-mcrypt extension to build.
> I installed libmcrypt with --prefix=/usr and I checked that the library
> exists
>
> -rwxr-xr-x 1 root wheel352K Sep 19 16:53
> /usr/lib/libmcrypt.4.4.8.dylib*
> lrwxr-xr-x 1 root whee
Hi, all
I'm recommended GDI website http://www.globalrichonline.com/
You can make the money online 100%
Good day.
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 18 Sep 2007 12:24:46 -0300, Christoph Scheit
<[EMAIL PROTECTED]> escribi�:
>> >> > # add row i and increment number of rows
>> >> > self.rows.append(DBRow(self, self.nRows))
>> >> > self.nRows += 1
>>
>> This looks suspicious, and may indicate that your structure contains
>> cycles, a
On Sep 19, 3:41 pm, Michele Simionato <[EMAIL PROTECTED]>
wrote:
> On Sep 19, 3:22 pm, Sion Arrowsmith <[EMAIL PROTECTED]>
> wrote:
>
> > Ben Finney <[EMAIL PROTECTED]> wrote:
>
> > > If a function is named 'super' and operates on
> > >classes, it's a pretty strong implication that it's about
> >
On Sep 20, 6:52 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Michele Simionato <[EMAIL PROTECTED]> writes:
> > Since the language we have does have multiple inheritance, let's
> > use it to implement mixins.
> > ...
> > So, multiple inheritance is giving us very little for the point of
> > view of m
Michele Simionato <[EMAIL PROTECTED]> writes:
> Since the language we have does have multiple inheritance, let's
> use it to implement mixins.
> ...
> So, multiple inheritance is giving us very little for the point of
> view of mixins; OTOH, multiple inheritance is giving us a lot of
> headaches f
On Sep 19, 5:08 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Terry Reedy" <[EMAIL PROTECTED]> wrote in message
This is a little confusing because google groups does not show your
original post (not uncommon for them to lose a post in a thread - but
somehow still reflect the fact that it exists
On Sep 20, 5:41 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Michele Simionato <[EMAIL PROTECTED]> writes:
> > Ben Finney wrote:
> > > What do you see as an appropriate use of mixin classes, and what
> > > an abuse?
>
> > An example of fine usage of mixin is Tkinter; an example of bad
> > usage if Z
On Sep 20, 5:41 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Okay. How do we use the language we have to achieve what mixin classes
> achieve in Ruby? Can you give an code example that you *would*
> recommend for someone looking to do what mixin classes do?
Since the language we have does have mult
On Thu, 20 Sep 2007 13:36:41 +1000, Ben Finney wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
>> On Thu, 20 Sep 2007 12:00:40 +1000, Ben Finney wrote:
>>
>> > In its latter form, it is worthless to me when I'm looking for "get
>> > superclass of A", but its name and parameters and docume
On Sep 19, 8:54 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 19 Sep 2007 19:14:39 -0700, Paul Rubin wrote:
>
> > etc. is at best an excuse for laziness.
>
> What are you doing about solving the problem? Apart from standing on the
> side-lines calling out "Get yer la
On Sep 19, 7:17 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 19 Sep 2007 20:58:03 +, Karthik Gurusamy wrote:
> > While it's easy to explain the behavior, I think the decision to dis-
> > allow mutable items as keys is a bit arbitrary. There is no need for
> > dict
Karthik Gurusamy wrote:
> While it's easy to explain the behavior, I think the decision to dis-
> allow mutable items as keys is a bit arbitrary.
Furthermore, it's not really true.
class Blurf (object):
def __init__(self, intval):
self.seti(intval)
def seti(se
On Wed, 19 Sep 2007 19:14:39 -0700, Paul Rubin wrote:
> We get cpu speed increases now through parallelism, not mhz. Intel and
> AMD both have 4-core cpu's now and Intel has a 16-core chip coming.
> Python is at a serious disadvantage compared with other languages if the
> other languages keep u
On Sep 19, 5:25 pm, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> On Sep 19, 7:26 pm, Karthik Gurusamy <[EMAIL PROTECTED]> wrote:
>
> > If I did, a = [10, 20] and I did d[a]= 'foo', then a.append(30).
> > If dict complains key error on d[a] now, I won't be surprised. If I do
> > d[[10, 20, 30]], I wi
Michele Simionato <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > What do you see as an appropriate use of mixin classes, and what
> > an abuse?
>
> An example of fine usage of mixin is Tkinter; an example of bad
> usage if Zope 2.
Which parts of those two very large code sets do I need to l
Michele Simionato <[EMAIL PROTECTED]> writes:
> It is already possible to use a syntax like this
>
> class MyClass(Base):
> mixin(Mixin1, Mixin2, ...)
>
> using P.J. Eby's trick for implementing what he calls class
> decorators (see also
> http://www.phyast.pitt.edu/~micheles/python/classin
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Thu, 20 Sep 2007 12:00:40 +1000, Ben Finney wrote:
>
> > In its latter form, it is worthless to me when I'm looking for
> > "get superclass of A", but its name and parameters and
> > documentation all lead me very strongly to believe otherwise.
>
On Thu, 20 Sep 2007 12:00:40 +1000, Ben Finney wrote:
> In its latter form, it is worthless to me when I'm looking for "get
> superclass of A", but its name and parameters and documentation all lead
> me very strongly to believe otherwise.
Why are you looking for the superclass of A?
If it is sp
On Sep 20, 4:55 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Michele Simionato <[EMAIL PROTECTED]> writes:
> > I am not against mixins (even if I am certainly very much against
> > the *abuse* of mixins, such as in Zope 2). What I would advocate
> > (but I realize that it will never happen in Python
On 19 Sep., 22:48, Jonas Maurus <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I'm pondering the following problem:
>
> I want to write a Python program that receives messages via SMTP and
> stores them in a dict or an array. For my purposes it would be
> important that all received mail would b
Michele Simionato <[EMAIL PROTECTED]> writes:
> I am not against mixins (even if I am certainly very much against
> the *abuse* of mixins, such as in Zope 2). What I would advocate
> (but I realize that it will never happen in Python) is single
> inheritance + mixins a la Ruby.
For those unfamili
I am canceling my own article.
--
http://mail.python.org/mailman/listinfo/python-list
I am canceling my own article.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 19, 8:14 pm, Ed Leafe <[EMAIL PROTECTED]> wrote:
> On Sep 19, 2007, at 6:52 AM, Michele Simionato wrote:
>
> > Well, I am personally *against* multiple inheritance (i.e. IMO it
> > gives more troubles than advantages)
>
> For the sorts of examples that have been used in this thread,
On Wed, 19 Sep 2007 20:58:03 +, Karthik Gurusamy wrote:
> While it's easy to explain the behavior, I think the decision to dis-
> allow mutable items as keys is a bit arbitrary. There is no need for
> dict to recompute hash
What???
Of course it does. How else can it look up the key? Because
TheFlyingDutchman <[EMAIL PROTECTED]> writes:
> The very fastest Intel processor of the last 1990's that I found came
> out in October 1999 and had a speed around 783Mhz. Current fastest
> processors are something like 3.74 Ghz, with larger caches. Memory is
> also faster and larger. It appears tha
Scott David Daniels <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > [EMAIL PROTECTED] (Alex Martelli) writes:
> >
> >> In general, "a superclass of foo" means "a class X such that foo is a
> >> sublass of X"
> >
> > Sure. However, this doesn't equate to the assertion that "next class
> > in th
Scott David Daniels <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > [EMAIL PROTECTED] (Alex Martelli) writes:
> >
> >> In general, "a superclass of foo" means "a class X such that foo is a
> >> sublass of X"
> >
> > Sure. However, this doesn't equate to the assertion that "next class
> > in th
Scott David Daniels <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > [EMAIL PROTECTED] (Alex Martelli) writes:
> >
> >> In general, "a superclass of foo" means "a class X such that foo is a
> >> sublass of X"
> >
> > Sure. However, this doesn't equate to the assertion that "next class
> > in th
Hrvoje Niksic <[EMAIL PROTECTED]> writes:
> Ben Finney <[EMAIL PROTECTED]> writes:
>
> > Evan is claiming that "the next class in the MRO _is_ a superclass",
> > apparently by his definition or some other that I've not seen.
>
> The definition of superclass is not the issue, the issue is
> "supe
On Wed, 19 Sep 2007 15:59:59 -0700, TheFlyingDutchman wrote:
> Paul it's a pleasure to see that you are not entirely against
> complaints.
I'm not against complaints either, so long as they are well-thought out.
I've made a few of my own over the years, some of which may have been
less well-tho
Ben Finney wrote:
> [EMAIL PROTECTED] (Alex Martelli) writes:
>
>> In general, "a superclass of foo" means "a class X such that foo is a
>> sublass of X"
>
> Sure. However, this doesn't equate to the assertion that "next class
> in the MRO is the superclass", which is what I was responding to.
>
On Wed, 19 Sep 2007 11:07:48 -0700, TheFlyingDutchman wrote:
> On Sep 19, 8:51 am, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Tue, 18 Sep 2007 18:09:26 -0700, TheFlyingDutchman wrote:
>> > How much faster/slower would Greg Stein's code be on today's
>> > processors versu
I wrote a small C program in Linux and used setenv() from stdlib and
it modified the console's environment. I can also modify the console's
environment from a DOS batch file, so why not in Python?
Guess I'm inexperienced and I just don't get it. :)
On Sep 18, 11:48 am, Steve Holden <[EMAIL PROTEC
On Wed, 19 Sep 2007 21:43:59 +0200, Bruno Desthuilliers wrote:
>> So if copying all methods of a native dictionary is not enough, what
>> should I do to make my class work as a dictionary WITHOUT deriving from
>> dict (which will obviously work).
>>
>>
> Sorry, I missed this last requirement. BT
Hi,
I'm having a hard time getting python-mcrypt extension to build.
I installed libmcrypt with --prefix=/usr and I checked that the
library exists
-rwxr-xr-x 1 root wheel352K Sep 19 16:53 /usr/lib/libmcrypt.
4.4.8.dylib*
lrwxr-xr-x 1 root wheel 21B Sep 19 16:53 /usr/lib/libmcrypt
On Sep 19, 7:26 pm, Karthik Gurusamy <[EMAIL PROTECTED]> wrote:
> If I did, a = [10, 20] and I did d[a]= 'foo', then a.append(30).
> If dict complains key error on d[a] now, I won't be surprised. If I do
> d[[10, 20, 30]], I will be surprised if it doesn't find the item. Of
> course, in today's beh
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
| "TheFlyingDutchman" <[EMAIL PROTECTED]> wrote in message
| news:[EMAIL PROTECTED]
| Since Guido wrote that, there have been put forth more ideas and interest
| and promises of efforts to remove or revise the GIL or do
On Sep 19, 3:06 pm, Paddy <[EMAIL PROTECTED]> wrote:
> On Sep 19, 9:58 pm, Karthik Gurusamy <[EMAIL PROTECTED]> wrote:
>
> > Since we know hashing is used, all that is needed is, a well-defined
> > way to construct a hash out of a mutable. "Given a sequence, how to
> > get a hash" is the problem. I
On Sep 19, 3:41 pm, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 19 Sep, 03:09, TheFlyingDutchman <[EMAIL PROTECTED]> wrote:
>
>
>
> > How much faster/slower would Greg Stein's code be on today's
> > processors versus CPython running on the processors of the late
> > 1990's? And if you decide to ans
On 19 Sep, 20:36, Paul McGuire <[EMAIL PROTECTED]> wrote:
>
> The gumstix buildroot requires a Linux platform - I was able to build
> Python for gumstix using a Debian environment. The gumstix mailing
> list and wiki were very helpful.
The inquirer might also consider crosstool, which is good at
On 19 Sep, 03:09, TheFlyingDutchman <[EMAIL PROTECTED]> wrote:
>
> How much faster/slower would Greg Stein's code be on today's
> processors versus CPython running on the processors of the late
> 1990's? And if you decide to answer, please add a true/false response
> to this statement - "CPython in
Hi, John,
Your comments below are all reasonable. However, I would like to point
out that the purpose of my example was to provide a demonstration of an
algorithm, not an industrial-grade solution to every aspect of the
original poster's problem. I am confident the original poster can deal
w
On Sep 19, 9:58 pm, Karthik Gurusamy <[EMAIL PROTECTED]> wrote:
>
> Since we know hashing is used, all that is needed is, a well-defined
> way to construct a hash out of a mutable. "Given a sequence, how to
> get a hash" is the problem. If later the given sequence is different,
> that's not the dic
Lew wrote:
>> Java is a strongly-typed, compiled language which means it does more
>> static type checking and thus would reject treating a as both an array
>> and a String.
>> In that environment the programmer must choose one or the other.
Ken Bloom wrote:
> In this Java example, a and b are s
On Sep 19, 2007, at 4:01 PM, TheFlyingDutchman wrote:
> On Sep 19, 1:02 pm, Erik Jones <[EMAIL PROTECTED]> wrote:
>> is usually Apache at most sites?
>>
>> No an http server and application server are two different things.
>> An http server services requests of a web server those requests can
>> b
John J. Lee wrote:
> Robin Becker <[EMAIL PROTECTED]> writes:
>
>> I see a folder .python-eggs in my home directory on one of our servers
>> with various .so files
>>
>> ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so
>>
>> are these just left behind from some i
Spring Python 0.3.1 was released today. It contains a quick add-on
feature: DecoratorBasedApplicationContext.
This feature lets you define an IoC container using python code and
decorators instead of an XML flat file. It handles things like
dependency injection and fetches things in order as neede
On Sep 19, 6:16 am, Sion Arrowsmith <[EMAIL PROTECTED]>
wrote:
> sapsi <[EMAIL PROTECTED]> wrote:
> > Why can't lists be hashed?
>
> Several people have answered "because they're mutable" without
> explaining why mutability precludes hashing. So:
>
> Consider a dict (dicts have been in Python a *l
On Sep 19, 1:02 pm, Erik Jones <[EMAIL PROTECTED]> wrote:
> is usually Apache at most sites?
>
> No an http server and application server are two different things.
> An http server services requests of a web server those requests can
> be for static files or for services of a local application
I'm trying to put some values into a struct. Some of these values are NaN
and Inf due to the nature of the data. As you well may know, struct (and
other things) in Python <= 2.4 doesn't support inf and nan float values.
You get the dreaded "SystemError: frexp() result out of range" error.
Befo
2007/9/10, Facundo Batista <[EMAIL PROTECTED]>:
> I modified my tool, whichs makes a summary of all the Python tickets
> (I moved the source where the info is taken from SF to our Roundup).
Based on an idea from Dennis Benzinger, now the temporal bars show the
moments where each comment was made,
Hello everybody,
I'm pondering the following problem:
I want to write a Python program that receives messages via SMTP and
stores them in a dict or an array. For my purposes it would be
important that all received mail would be kept in RAM and not cached
out to disk. If a new message comes in tha
Hello,
I use lxml to parse a document, modify some elements in the tree, run
xinclude on it (thanks to Stefan Behnel for the pointer), and finally use
the data to feed my sax-aware tool.
To report warnings/errors to the user (not related to XML itself, but to
things like missing source for a cros
On Sep 19, 1:11 pm, David <[EMAIL PROTECTED]> wrote:
> On 9/19/07, James Matthews <[EMAIL PROTECTED]> wrote:
>
> > Hi List
>
> > I have a list of files from my current directory:
>
> > import os
>
> > files = os.listdir(os.getcwd())
>
> > Now this list also includes some files that i don't want lik
On 9/19/07, James Matthews <[EMAIL PROTECTED]> wrote:
> Hi List
>
> I have a list of files from my current directory:
>
> import os
>
> files = os.listdir(os.getcwd())
>
> Now this list also includes some files that i don't want like my python
> files... How would i remove them
You can use regular
On Sep 19, 2007, at 2:44 PM, TheFlyingDutchman wrote:
>
>> Have you tried Google "google python". Turns up a lot of links
>> for me.
>>
> I had done it on this newsgroup, but not google. I did find a pretty
> good link:
>
> http://panela.blog-city.com/python_at_google_greg_stein__sdforum.htm
>
I'm struggling with using urllib2 to access the Harvest time-tracking
web service (http://www.getharvest.com/api). GET is working fine.
POST is giving me a problem. Here is an example that creates a new
time-tracking entry using curl.
$ curl http://subdomain.harvestapp.com/daily/add -H 'Accept:
Stéphane Larouche a écrit :
(snip)
>
> funcs = [(lambda i: lambda x: x+i)(i) for i in xrange(10)]
A bit more complex than necessary... The canonical solution is
funcs = [lambda x, i=i: x+i for i in xrange(10)]
--
http://mail.python.org/mailman/listinfo/python-list
Aahz a écrit :
> In article <[EMAIL PROTECTED]>,
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
>
(snip)
>(For those joining only recently, my full legal name is "Aahz", which I
>changed from my former name precisely because of attitudes like Bruno's.)
>>
>>For the record, I usually don
On 9/18/07, Thomas Harding <[EMAIL PROTECTED]> wrote:
> Hi guys, sorry to post another topic on this, as I am aware that it
has
> already been posted a few times, but not with specifically what I
am looking
> for. I want an app that makes a gui interface for python (similar
to
> Microsoft vis
On Tue, 18 Sep 2007 21:06:39 +0100, Jonathan Fine <[EMAIL PROTECTED]> wrote:
>Steve Holden wrote:
>
>> You remind me of the conversation between the philosopher and an
>> attractive lady whom he was seated next to at dinner. He asked her if
>> she would sleep with him for a million dollars, to w
> Have you tried Google "google python". Turns up a lot of links for me.
>
I had done it on this newsgroup, but not google. I did find a pretty
good link:
http://panela.blog-city.com/python_at_google_greg_stein__sdforum.htm
Which says:
"A few services including code.google.com and google groups
A.T.Hofkamp a écrit :
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
(snip)
> So if copying all methods of a native dictionary is not enough, what should I
> do to make my class work as a
Robin Becker <[EMAIL PROTECTED]> writes:
> I see a folder .python-eggs in my home directory on one of our servers
> with various .so files
>
> ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so
>
> are these just left behind from some install process?
Ah, it's abo
Bruno Desthuilliers a écrit :
> A.T.Hofkamp a écrit :
>
(snip)
>> # Below is produced with
>> # print '\n'.join(['self.%s = self.mydict.%s' % (v,v)
>> # for v in dir(dict)])
>> # commented-out functions done by hand
>> #
>> #self.__class__ =
I know. The translation is not so important to me, because this is
going to just a little function that is working in the last step of
the whole proces. The whole implementation wont be published and has
just the meaning to implement a first alpha version of a face
recognition system. It is nearly
Steve Holden a écrit :
> A.T.Hofkamp wrote:
>
(snip)
>> So if copying all methods of a native dictionary is not enough, what
>> should I
>> do to make my class work as a dictionary WITHOUT deriving from dict
>> (which will
>> obviously work).
>>
> You have to overwrite the "__new__" method to r
A.T.Hofkamp a écrit :
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
> Below is a brute-force experiment that cannot deal with "x in obj", plz read
> the explanation below the code:
>
TheFlyingDutchman wrote:
> Around 2000 I heard that Google was using Python to some extent. Now I
> see that Guido Van Rossum works for them as well as Alex Martellis who
> has the title "Uber Technical Lead" which seems to imply some fairly
> heavy Python usage there. I was wondering what is done
[EMAIL PROTECTED] a écrit :
> Hi everybody! Is there anything out there that can validate and parse
> some "onyx-style" xml?
I don't know what's "onyx-style" xml, but if it's xml, any xml parser
will parse it, and any validating parser should be able to validate it
given the correct DTD.
--
htt
Around 2000 I heard that Google was using Python to some extent. Now I
see that Guido Van Rossum works for them as well as Alex Martellis who
has the title "Uber Technical Lead" which seems to imply some fairly
heavy Python usage there. I was wondering what is done at Google with
Python and which P
Hi List
I have a list of files from my current directory:
import os
files = os.listdir(os.getcwd())
Now this list also includes some files that i don't want like my python
files... How would i remove them
Thanks
James
--
http://www.goldwatches.com/
http://www.jewelerslounge.com
--
http://ma
On Sep 19, 12:41 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Rafael Marin Perez schrieb:
>
> > Hello
>
> > I'm Rafael Marin, and work as reseacher in University of Murcia (Spain).
>
> > I want to install and compile modules of python2.4 in a ARMv5b
> > architecture.
>
> > Any idea?
>
> You
> If you'd just search the archives, you would have found this:
>
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/b134b2235e9c19a6/34857fb0b0b2a4b5?lnk=gst&q=prime+number&rnum=1#34857fb0b0b2a4b5
Yeah, but that's no fun. ;o)
--
http://mail.python.org/mailman/listinfo/python
On Sep 19, 12:15 pm, "Shawn Milochik" <[EMAIL PROTECTED]> wrote:
> Okay, I caught one bug already myself:
>
> for y in range(3,(math.sqrt(x) + 1)):
>
> should be
>
> for y in range(3,(int(math.sqrt(x)) + 1)):
If you'd just search the archives, you would have found this:
http://groups.google.com/
On Sep 19, 2007, at 6:52 AM, Michele Simionato wrote:
> Well, I am personally *against* multiple inheritance (i.e. IMO it
> gives more troubles than advantages)
For the sorts of examples that have been used in this thread, it
isn't MI that's problematic; it's the poor quality of the de
On Sep 19, 8:51 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Tue, 18 Sep 2007 18:09:26 -0700, TheFlyingDutchman wrote:
> > How much faster/slower would Greg Stein's code be on today's processors
> > versus CPython running on the processors of the late 1990's?
>
> I think a
Hi all,
I'm working on a project that would benefit very much from Python
Freetype2 bindings (the Fonty Python project). I don't want to
duplicate efforts and wrap the library again if we don't have to.
Interestingly, it seems like there have been lots of attempts at doing
this.
Generally, there
Rafael Marin Perez schrieb:
> Hello
>
> I'm Rafael Marin, and work as reseacher in University of Murcia (Spain).
>
> I want to install and compile modules of python2.4 in a ARMv5b
> architecture.
>
> Any idea?
You might consider looking at the gumstix-project. They feature a
linux-distro inclu
Okay, I caught one bug already myself:
for y in range(3,(math.sqrt(x) + 1)):
should be
for y in range(3,(int(math.sqrt(x)) + 1)):
--
http://mail.python.org/mailman/listinfo/python-list
Here's my attempt:
#!/usr/bin/env python
import math
for x in range(3,1000,2):
isPrime = True
for y in range(3,(math.sqrt(x) + 1)):
if x % y == 0:
isPrime = False
break
if isPrime:
print "%d is prime." % x
Notes: This doesn't bother with ev
I missed the obvious fact there. Thanks. I added it to the PATH and
that fixed everything.
Shankarjee
On 9/19/07, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-09-19, Shankarjee Krishnamoorthi <[EMAIL PROTECTED]> wrote:
>
> > I have a exe made with py2exe for my Python routine. The issue
> >
Hello
I'm Rafael Marin, and work as reseacher in University of Murcia (Spain).
I want to install and compile modules of python2.4 in a ARMv5b
architecture.
Any idea?
Thank for your time.
Regards, Rafa.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 2, 12:51 pm, [EMAIL PROTECTED] wrote:
> ... right-angled triangle puzzle solver
>
> max = 0
> maxIndex = 0
> index = 0
> for solution in solutions:
> if solution > max:
> max = solution
> maxIndex = index
> index += 1
>
> print maxIndex
Not that it solves your slowne
On 2007-09-19, Shankarjee Krishnamoorthi <[EMAIL PROTECTED]> wrote:
> I have a exe made with py2exe for my Python routine. The issue
> I am running into is this. All the exes (mycode.exe and
> other_executable.exe) are placed in a Network drive(Say I:) so
> that people can access it.
>
> When the
exhuma.twn wrote:
[...]
>
> Apparently I am deaf dumb and blind :( Sorry. I grepped several
> times through the PEP for various other reasons, and this little bit
> escaped me.
>
You forgot "stupid" ;-)
> Thanks for being nice guys and answering anyhow. Much appreciated.
>
A pleasure.
bee
Hi
I have a python routine which calls an executable file created by
someone else (I dont have the source code. All I have is an exe file).
I do
# My Python Code
output = os.system('other_executable.exe')
# Rest of my program.
I need to give this routine to others to use it. I have a exe made
[EMAIL PROTECTED] wrote:
>>row = tree.find("//Row")
>>print row.findtext("primaryowner")
>>print row.findtext("customeraddress")
>
> I tried this your way and Laurent's way and both give me this error:
>
> AttributeError: 'NoneType' object has no attribute 'findtext'
Well, error hand
On Sep 19, 5:47 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> exhuma.twn wrote:
> > Plain and simple. What would you use?
>
> > So far I have written everything with psycopg2. One thing that annoys
> > me is that I cannot easily access the column names from a query. I
> > know that this is not part
That's exactly what I needed. Thank you.
Aaron J. M.
--
http://mail.python.org/mailman/listinfo/python-list
hey all,
For my study I'm writing a simple threaded webcrawler and I am trying
to do this in python. But somehow, using threads causes IDLE to crash
on Windows XP (with the latest python distribution 2.5.1). Even a
simple example such as this:
import thread, time
def doSomething():
print "some
1 - 100 of 193 matches
Mail list logo