On 30/08/10 05:00, Thomas Jollans wrote:
On Sunday 29 August 2010, it occurred to L to exclaim:
has anyone successfully installed PyGeo under python 2.7 (prefer ubuntu
10.04) ,
the site says
http://www.wspiegel.de/pymaxima/index_en.html
"Note: The installation of PyGeo work's only under
On Aug 29, 8:33 am, Arnaud Delobelle wrote:
> ernest writes:
> > Hi,
>
> > The operator module provides separate functions for
> > "in place" operations, such as iadd(), isub(), etc.
> > However, it appears that these functions don't really
> > do the operation in place:
>
> > In [34]: a = 4
>
>
Seth Rees wrote:
> On 08/29/10 14:43, Peter Otten wrote:
>> John Nagle wrote:
>>
>>> Is the "in" test faster for a dict or a set?
>>> Is "frozenset" faster than "set"? Use case is
>>> for things like applying "in" on a list of 500 or so words
>>> while checking a large body of text.
>>
>> As
On Aug 29, 5:43 pm, Paul McGuire wrote:
> On Aug 28, 11:23 pm, Paul McGuire wrote:
>
>
>
> > On Aug 28, 11:14 am, agnibhu wrote:
>
> > > Hi all,
>
> > > I'm a newbie in python. I'm trying to create a library for parsing
> > > certain keywords.
> > > For example say I've key words like abc: bcd:
Dear python users,
For passing a variable to a SQL query for psycopg2, I use:
>>> my_var = xyz
>>> print cur.mogrify("SELECT my_values FROM my_table WHERE my_column
= %s",(my_var,))
This returns:
>>> SELECT my_values FROM my_table WHERE my_column = E'xyz'
Where does the "E" in front of '
On Aug 29, 12:12 pm, John Nagle wrote:
> Is the "in" test faster for a dict or a set?
> Is "frozenset" faster than "set"? Use case is
> for things like applying "in" on a list of 500 or so words
> while checking a large body of text.
There is no significant difference.
All three are implemen
Lawrence D'Oliveiro writes:
> static void GetBufferInfo
> ( ...
> do /*once*/
> {
> TheBufferInfo = PyObject_CallMethod(FromArray, "buffer_info", "");
> if (TheBufferInfo == 0)
> break;
> AddrObj = PyTuple_GetItem(TheBufferInfo, 0);
> LenObj
On Sat, Aug 28, 2010 at 19:50, mo reina wrote:
> looking for a python project (preferably something a bit small) that
> is looking for contributors. the small bit is because i've never
> worked in a team before and haven't really read source code that's
> 1000s of lines long, so i'm not too sure
Lawrence D'Oliveiro writes:
>> the CPython API means endlessly finding and fixing refcount bugs that lead
>> to either crashes/security failures, or memory leaks.
>
> I don’t see why that should be so. It seems a very simple discipline to
> follow: initialize, allocate, free. Here’s an example sn
On 08/29/2010 08:21 PM, alex23 wrote:
> kj wrote:
snip
>> Sorry for the outburst, but unfortunately, PIL is not alone in
>> this. Python is awash in poor documentation. [...]
>> I have to conclude that the problem with Python docs
>> is somehow "systemic"...
>
> Yes, if everyone else disagrees wi
Many thanks. It works. You also helped me refactor these
('/([0-9]*)/?([^/]*)',AById),#id2a
('/([0-9]*)',AById)
to just 1
('/([0-9]*)/?([^/]*)',AById),#id2a
It's from the appspot framework.
Sincerely
Niklas R
--
http://mail.python.org/mailman/listinfo/python-list
In message <[email protected]>, Paul Rubin wrote:
> I'd say [reference-counting is] not real gc because 1) it's unsound
> (misses reference cycles), and 2) it requires constant attention from the
> mutator to incr and decr the reference counts. So developing modules for
> the CPy
In message
<45e0772c-24a8-4cbb-a4fc-74a1b6c25...@n19g2000prf.googlegroups.com>,
kevinlcarlson wrote:
> I'm exploring the possibility of developing a helper app for an
> existing internal company website. Basically, it would automatically
> scan the current page contents, including prepopulated f
On Sun, 29 Aug 2010 17:52:38 -0700, Paul Rubin wrote:
>> That's a problem with the CPython API, not reference counting. The
>> problem is that the CPython API is written at too low a level, beneath
>> that at which the garbage collector exists, so naturally you have to
>> manually manage memory.
>
On 30 Αύγ, 06:12, MRAB wrote:
> This part:
>
> ( not mycookie or mycookie.value != 'nikos' )
>
> is false but this part:
>
> re.search( r'(msn|yandex|13448|spider|crawl)', host ) is None
>
> is true because host doesn't contain any of those substrings.
So, the if code does executed bec
In article <40a6bfac-3f4b-43f4-990b-224cb2b65...@i19g2000pro.googlegroups.com>,
Carl Banks wrote:
>
>FWIW, I think it perfectly reasonable to let an application print a
>traceback on an error. I've gotten a few bug reports on a little tool
>I maintain where the user copies the traceback to me, i
On 30/08/2010 03:55, Nik the Greek wrote:
On 30 Αύγ, 05:43, MRAB wrote:
On 30/08/2010 03:07, Nik the Greek wrote:
On 30 Αύγ, 04:51, MRABwrote:
On 30/08/2010 02:14, Νίκος wrote:
On 29 Αύγ, 21:44, MRAB wrote:
On 29/08/2010 06:34, Νίκος wrote:
On 28 Αύγ, 23:15, MRAB
On 30/08/2010 03:40, Niklasro(.appspot) wrote:
Hello, Suspecting it's completely doable combining these 2 regexes to
just 1 expression I'm looking for the working syntax. If you know then
kindly inform. Thanks in advance
('/a/([^/]*)',List), #list
('/a([^/]*)',List), #list
('/a/?([^/]*)', List)
On 30 Αύγ, 05:48, MRAB wrote:
> On 30/08/2010 03:33, Nik the Greek wrote:
>
>
>
>
>
>
>
> > On 30 Αύγ, 05:04, MRAB wrote:
>
> > when iam trying to pass a tuple to the execute methos should i pass it
> > like this?
>
> > cursor.execute(''' SELECT hits FROM counters WHERE page = %s and
> > date = %
On 30 Αύγ, 05:43, MRAB wrote:
> On 30/08/2010 03:07, Nik the Greek wrote:
>
>
>
>
>
>
>
>
>
> > On 30 Αύγ, 04:51, MRAB wrote:
> >> On 30/08/2010 02:14, Νίκος wrote:
>
> >>> On 29 Αύγ, 21:44, MRAB wrote:
> On 29/08/2010 06:34, Νίκος wrote:
>
> > On 28 Αύγ, 23:15, MRAB wrote:
> >>>
On Sun, Aug 29, 2010 at 7:40 PM, Niklasro(.appspot) wrote:
> Hello, Suspecting it's completely doable combining these 2 regexes to
> just 1 expression I'm looking for the working syntax. If you know then
> kindly inform. Thanks in advance
> ('/a/([^/]*)',List), #list
> ('/a([^/]*)',List), #list
E
On 30/08/2010 03:33, Nik the Greek wrote:
On 30 Αύγ, 05:04, MRAB wrote:
when iam trying to pass a tuple to the execute methos should i pass it
like this?
cursor.execute(''' SELECT hits FROM counters WHERE page = %s and
date = %s and host = %s ''' % (page, date, host) )
or like
tuple = (page
Hello, Suspecting it's completely doable combining these 2 regexes to
just 1 expression I'm looking for the working syntax. If you know then
kindly inform. Thanks in advance
('/a/([^/]*)',List), #list
('/a([^/]*)',List), #list
Niklas Rosencrantz
--
http://mail.python.org/mailman/listinfo/python-li
On 30/08/2010 03:07, Nik the Greek wrote:
On 30 Αύγ, 04:51, MRAB wrote:
On 30/08/2010 02:14, Νίκος wrote:
On 29 Αύγ, 21:44, MRABwrote:
On 29/08/2010 06:34, Νίκος wrote:
On 28 Αύγ, 23:15, MRAB wrote:
On 28/08/2010 20:37, Íßêïò wrote:
On 22 Áýã, 10:27, Íßêïòwrote:
On 1
On 30 Αύγ, 05:04, MRAB wrote:
when iam trying to pass a tuple to the execute methos should i pass it
like this?
cursor.execute(''' SELECT hits FROM counters WHERE page = %s and
date = %s and host = %s ''' % (page, date, host) )
or like
tuple = (page, host, date)
cursor.execute(''' SELECT hit
kj wrote:
> Example: I went to the docs page for ImageDraw. There I find that
> the constructor for an ImageDraw.Draw object takes an argument,
> but *what* this argument should be (integer? object? string?) is
> left entirely undefined. From the examples given I *guessed* that
> it was an objec
On 30 Αύγ, 04:51, MRAB wrote:
> On 30/08/2010 02:14, Νίκος wrote:
>
>
>
>
>
>
>
>
>
> > On 29 Αύγ, 21:44, MRAB wrote:
> >> On 29/08/2010 06:34, Νίκος wrote:
>
> >>> On 28 Αύγ, 23:15, MRAB wrote:
> On 28/08/2010 20:37, Íßêïò wrote:
>
> > On 22 Áýã, 10:27, Íßêïò wrote:
> >> On
On 30/08/2010 02:38, Νίκος wrote:
On 29 Αύγ, 21:34, MRAB wrote:
It likes the values to be in a tuple. If there's one value, that's a
1-tuple: (page, ).
I noticed that if we are dealing with just a single value 'page' will
do, no need to tuple for 1-value.
it handles fine as a string.
I tri
On 30/08/2010 02:14, Νίκος wrote:
On 29 Αύγ, 21:44, MRAB wrote:
On 29/08/2010 06:34, Νίκος wrote:
On 28 Αύγ, 23:15, MRABwrote:
On 28/08/2010 20:37, Íßêïò wrote:
On 22 Áýã, 10:27, Íßêïò wrote:
On 16 Áýã, 14:31, Peter Otten<[email protected]> wrote:
Íßêïò wrote:
# in
On 29 Αύγ, 21:34, MRAB wrote:
> It likes the values to be in a tuple. If there's one value, that's a
> 1-tuple: (page, ).
I noticed that if we are dealing with just a single value 'page' will
do, no need to tuple for 1-value.
it handles fine as a string.
> >> cursor.execute('''SELECT hits FROM
On 29 Αύγ, 21:44, MRAB wrote:
> On 29/08/2010 06:34, Νίκος wrote:
>
>
>
>
>
>
>
> > On 28 Αύγ, 23:15, MRAB wrote:
> >> On 28/08/2010 20:37, Íßêïò wrote:
>
> >>> On 22 Áýã, 10:27, Íßêïò wrote:
> On 16 Áýã, 14:31, Peter Otten<[email protected]> wrote:
>
> > Íßêïò wrote:
> >> # ini
Steven D'Aprano writes:
> I could be wrong, but how can they not be subject to the same performance
> issue? If you have twenty thousand components that all have to be freed,
> they all have to be freed whether you do it when the last reference is
> cleared, or six seconds later when the gc doe
Steven D'Aprano writes:
> You can add cycle detection to a reference count gc, at the cost of more
> complexity.
But then it's not purely a refcount gc. ;)
> If you read the Wikipedia article I linked to, tracing algorithms can
> also be unsound: [describes "conservative" gc]
Yeah, whether t
Hans Mulder writes:
> Parallelizable garbage collectors have performance issues, but they're
> not the same issues as mark&sweep collectors have. Parallelizable GCs
> break up their work in a zillion little pieces and allow the VM to do
> some real work after each piece. They won't free your twe
On Sun, 29 Aug 2010 10:36:45 -0700, Baba wrote:
> level: beginner
>
> i would like to return a selection of the Fibonacci series. example:
> start = 5 ; end = 55
> the function should then return [5, 8, 13, 21, 34, 55]
Start with something to lazily generate Fibonacci numbers. It doesn't
matte
On Sun, 29 Aug 2010 06:43:40 -0700, Baba wrote:
> So here's my code. It does still cause me one headache. If i use f(0)=0
> and f(1)=1 as base cases the result will be 144. I was expecting the
> result to be the next value in the series (233)...
That's because you're not generating the Fibonacci
In article <242fd242-5f29-4358-8c12-f5763b7be...@g21g2000prn.googlegroups.com>,
Pramod wrote:
>
>When run the below program in python i got error like this ,
You may want to consider asking future questions on the NumPy list:
http://projects.scipy.org/mailman/listinfo/numpy-discussion
--
Aahz
On Sun, 29 Aug 2010 07:44:47 -0700, ernest wrote:
> Hi,
>
> The operator module provides separate functions for "in place"
> operations, such as iadd(), isub(), etc. However, it appears that these
> functions don't really do the operation in place:
>
> In [34]: a = 4
>
> In [35]: operator.iadd(
On Sunday 29 August 2010 7:09:37 pm Ben Finney wrote:
> David Zaslavsky writes:
> > I recently uploaded a package to PyPI under a name with mixed-case
> > letters, but in retrospect I think it'd be better to have the package
> > name be all lowercase. Is there a way I can change it?
>
> Your ques
On Mon, 30 Aug 2010 01:46:16 +0200, News123 wrote:
> Hi,
>
> Under Linux I'd like to find out, whether I got a file, a character
> device or a socket as a parameter.
See the stat module.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Under Linux I'd like to find out, whether I got a file, a character
device or a socket as a parameter.
What is the right way to do this
How can I found out, whether a path name is:
- a file ( os.isfile() )
- a character device
- a socket
- a named pipe
thanks a lot for pointers
--
http
David Zaslavsky writes:
> I recently uploaded a package to PyPI under a name with mixed-case
> letters, but in retrospect I think it'd be better to have the package
> name be all lowercase. Is there a way I can change it?
Your question is on-topic here. However, you might get a more focussed
dis
On 08/29/10 14:43, Peter Otten wrote:
John Nagle wrote:
Is the "in" test faster for a dict or a set?
Is "frozenset" faster than "set"? Use case is
for things like applying "in" on a list of 500 or so words
while checking a large body of text.
As Arnaud suspects: no significant differenc
Hi everyone,
I recently uploaded a package to PyPI under a name with mixed-case letters,
but in retrospect I think it'd be better to have the package name be all
lowercase. Is there a way I can change it?
Thanks,
:) David
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to All for your kind help!
Baba
--
http://mail.python.org/mailman/listinfo/python-list
Le 29/08/2010 04:54, Dmitry Groshev a écrit :
On Aug 29, 5:14 am, Steven D'Aprano wrote:
On Sat, 28 Aug 2010 21:30:39 +0400, Dmitry Groshev wrote:
Hello all. Some time ago I wrote a little library:
http://github.com/si14/python-functional-composition/, inspired by
modern functional languages l
In article ,
MRAB wrote:
> On 29/08/2010 21:34, Roy Smith wrote:
> > In article<[email protected]>,
> > Gregory Ewing wrote:
> >
> >> Steven D'Aprano wrote:
> >>> I'm not entirely sure what the use-case for swapcase is.
> >>
> >> Obviously it's for correcting things that were
On 29/08/2010 21:34, Roy Smith wrote:
In article<[email protected]>,
Gregory Ewing wrote:
Steven D'Aprano wrote:
I'm not entirely sure what the use-case for swapcase is.
Obviously it's for correcting things that were typed
in with tHE cAPS lOCK kEY oN bY mISTAKE. :-)
So
I have no idea. That's a lower level of programming than I'm used to
dealing with.
Josh
(I also only tried the one value. Had I tried with other strings that
would fail the test, some
functions may have performed better.)
On Aug 29, 2:19 am, Matteo Landi wrote:
> Well, I tried the also the solu
In article <[email protected]>,
Gregory Ewing wrote:
> Steven D'Aprano wrote:
> > I'm not entirely sure what the use-case for swapcase is.
>
> Obviously it's for correcting things that were typed
> in with tHE cAPS lOCK kEY oN bY mISTAKE. :-)
So it would seem (http://bugs.python
John Nagle wrote:
> Is the "in" test faster for a dict or a set?
> Is "frozenset" faster than "set"? Use case is
> for things like applying "in" on a list of 500 or so words
> while checking a large body of text.
As Arnaud suspects: no significant difference:
$ python dictperf.py
dict --> 0
John Nagle writes:
>Is the "in" test faster for a dict or a set?
> Is "frozenset" faster than "set"? Use case is
> for things like applying "in" on a list of 500 or so words
> while checking a large body of text.
>
> John Nagle
IIRC Frozensets are implemented m
Baba writes:
> my questios:
> - would you agree that recursive is not ideal for generating a list?
> (in this particular case and in general)
In Python that is probably correct in the vast majority of cases for two
reasons:
* lists in Python are implemented as arrays;
* there is no tail call op
Is the "in" test faster for a dict or a set?
Is "frozenset" faster than "set"? Use case is
for things like applying "in" on a list of 500 or so words
while checking a large body of text.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
On 29 août, 06:39, Gregory Ewing wrote:
> Steven D'Aprano wrote:
> > I'm not entirely sure what the use-case for swapcase is.
>
> Obviously it's for correcting things that were typed
> in with tHE cAPS lOCK kEY oN bY mISTAKE. :-)
>
+1 QOTW !-)
--
http://mail.python.org/mailman/listinfo/python-l
On 27 août, 20:05, Jussi Piitulainen > def
palindromep(s):
> return ( s == "" or
> ( s[0] == s[-1] and
> palindromep(s[1:-1]) ) )
>
I-can-write-lisp-in-any-language-p !-)
--
http://mail.python.org/mailman/listinfo/python-list
On Sunday 29 August 2010, it occurred to L to exclaim:
> has anyone successfully installed PyGeo under python 2.7 (prefer ubuntu
> 10.04) ,
> the site says
>
> http://www.wspiegel.de/pymaxima/index_en.html
>
> "Note: The installation of PyGeo work's only under Python 2.4 (The
> further developm
On Sun, Aug 29, 2010 at 10:36 AM, Baba wrote:
> level: beginner
>
> i would like to return a selection of the Fibonacci series.
> example:
> start = 5 ; end = 55
> the function should then return [5, 8, 13, 21, 34, 55]
>
> it seems that this is best resolved using an iterative approach to
> gener
On 08/29/2010 07:36 PM, Baba wrote:
> level: beginner
>
> i would like to return a selection of the Fibonacci series.
> example:
> start = 5 ; end = 55
> the function should then return [5, 8, 13, 21, 34, 55]
>
> it seems that this is best resolved using an iterative approach to
> generate the s
On 29/08/2010 06:34, Νίκος wrote:
On 28 Αύγ, 23:15, MRAB wrote:
On 28/08/2010 20:37, Íßêïò wrote:
On 22 Áýã, 10:27, Íßêïòwrote:
On 16 Áýã, 14:31, Peter Otten<[email protected]>wrote:
Íßêïò wrote:
# initializecookie
cookie=Cookie.SimpleCookie()
cookie.load( os.environ.get('
Hi Baba,
> So here's my code. It does still cause me one headache. If i use
> f(0)=0
> and f(1)=1 as base cases the result will be 144. I was expecting the
> result to be the next value in the series (233)...
> If i use f(1)=1 and f(2)=2 as base cases them i get my expected
> result. I assume this
On 29/08/2010 06:13, Νίκος wrote:
On 28 Αύγ, 23:12, MRAB wrote:
On 28/08/2010 20:51, Νίκος wrote:
On 28 Αύγ, 22:35, MRABwrote:
"""When there's more than one value you provide a tuple. It's makes sense
from the point of view of consistency that you also provide a tuple when
ther
Baba writes:
> i would like to return a selection of the Fibonacci series.
> example:
> start = 5 ; end = 55
> the function should then return [5, 8, 13, 21, 34, 55]
[...]
> my questios:
> - would you agree that recursive is not ideal for generating a list?
> (in this particular case and in gene
level: beginner
i would like to return a selection of the Fibonacci series.
example:
start = 5 ; end = 55
the function should then return [5, 8, 13, 21, 34, 55]
it seems that this is best resolved using an iterative approach to
generate the series. In another post (http://groups.google.ie/group/
On 29/08/2010 15:22, naugiedoggie wrote:
Hello,
I'm having a problem with using a function as the replacement in
re.sub().
Here is the function:
def normalize(s) :
return
urllib.quote(string.capwords(urllib.unquote(s.group('provider'
This normalises the provider and returns only tha
Baba writes:
> Level: beginner
>
> I would like to know how to approach the following Fibonacci problem:
> How may rabbits do i have after n months?
>
> I'm not looking for the code as i could Google that very easily. I'm
> looking for a hint to put me on the right track to solve this myself
> wi
On 8/29/2010 10:22 AM, naugiedoggie wrote:
Hello,
I'm having a problem with using a function as the replacement in
re.sub().
Here is the function:
def normalize(s) :
return
urllib.quote(string.capwords(urllib.unquote(s.group('provider'
To debug your problem, I would start with print
Hi John,
> Hi,
>
>>From a python script I'd like to be able to move the mouse to certain
> absolute coordinates on the screen.
>
>
> There's no problems calling an external program with subprocess.popen,
> as I do not want to perform many movements.
>
> The mouse can jump it doesn't have to vi
ernest writes:
> Hi,
>
> The operator module provides separate functions for
> "in place" operations, such as iadd(), isub(), etc.
> However, it appears that these functions don't really
> do the operation in place:
>
> In [34]: a = 4
>
> In [35]: operator.iadd(a, 3)
> Out[35]: 7
>
> In [36]: a
>
On 29 Ago, 17:00, Peter Otten <[email protected]> wrote:
> ernest wrote:
> > The operator module provides separate functions for
> > "in place" operations, such as iadd(), isub(), etc.
> > However, it appears that these functions don't really
> > do the operation in place:
>
> > In [34]: a = 4
>
> >
In article
<[email protected]>,
naugiedoggie wrote:
> Hello,
>
> I'm having a problem with using a function as the replacement in
> re.sub().
>
> Here is the function:
>
> def normalize(s) :
> return
> urllib.quote(string.capwords(urllib.unq
ernest wrote:
> The operator module provides separate functions for
> "in place" operations, such as iadd(), isub(), etc.
> However, it appears that these functions don't really
> do the operation in place:
>
> In [34]: a = 4
>
> In [35]: operator.iadd(a, 3)
> Out[35]: 7
>
> In [36]: a
> Out[36
Hi,
The operator module provides separate functions for
"in place" operations, such as iadd(), isub(), etc.
However, it appears that these functions don't really
do the operation in place:
In [34]: a = 4
In [35]: operator.iadd(a, 3)
Out[35]: 7
In [36]: a
Out[36]: 4
So, what's the point? If you
Gelonida writes:
> Hi,
>
>>From a python script I'd like to be able to move the mouse to certain
> absolute coordinates on the screen.
>
>
> There's no problems calling an external program with subprocess.popen,
> as I do not want to perform many movements.
xte?
sudo apt-get install xautomation
Hello,
I'm having a problem with using a function as the replacement in
re.sub().
Here is the function:
def normalize(s) :
return
urllib.quote(string.capwords(urllib.unquote(s.group('provider'
The purpose of this function is to proper-case the words contained in
a URL query string param
On Aug 29, 3:25 am, Steven D'Aprano wrote:
> Mathematically, there is nothing wrong with overlapping recursion. It
> will work, and Python can handle it easily.
Based on the advice by Steven and Mel i tried my initial 'guess' and
it does seem to work fine. When looking at it using pencil and pap
On 27 août, 18:20, Mark Lawrence wrote:
> On 27/08/2010 15:43, Bruno Desthuilliers wrote:
>
> > Dave Angel a écrit :
> > (snip)
>
> >> or (untested)
> >> def is_palindrom(s):
> >> s = s.lower()
> >> return s == s[::-1]
>
> > Right, go on, make me feel a bit more stupid :-/
> > Who's next ?
>
> It
Hi,
>From a python script I'd like to be able to move the mouse to certain
absolute coordinates on the screen.
There's no problems calling an external program with subprocess.popen,
as I do not want to perform many movements.
The mouse can jump it doesn't have to visibly move to the target coor
Re-hi and thank you.
That solved my problem.
I can now see that the base_plugin.Plugin is loaded several times.
The numeric id(the_class) is not the same in all places.
Anyway, I thought that a class is always the same if it has been loaded
from the same module (in Linux/Unix; from the same file
On Aug 28, 11:23 pm, Paul McGuire wrote:
> On Aug 28, 11:14 am, agnibhu wrote:
>
>
>
>
>
> > Hi all,
>
> > I'm a newbie in python. I'm trying to create a library for parsing
> > certain keywords.
> > For example say I've key words like abc: bcd: cde: like that... So the
> > user may use like
> >
On 08/29/2010 01:12 AM, Baba wrote:
> Level: beginner
>
> I would like to know how to approach the following Fibonacci problem:
> How may rabbits do i have after n months?
>
> I'm not looking for the code as i could Google that very easily. I'm
> looking for a hint to put me on the right track to
Osmo Maatta wrote:
> Hello,
>
> Sub class test fails.
> ==
> I have a program that needs to load plugin-classes during runtime.
>
> The program has these subdirectories (modules).
>
> $ tree
> .
> `-- test.py
> |
> |-- plugins
> | |-- base_plugin.py
> | |-- base_plugin.p
is it possible to build python setuptools with msvc?
> On Monday, July 12, 2010 4:59 PM Alf P. Steinbach /Usenet wrote:
> I let the setup.py script talk:
>
>
>
>
> from distutils.core import setup, Extension
> import distutils.ccompiler
>
> compilerName = distutils.ccompiler.get_default_comp
I thought they reached you. Here they are again:
def palindrome(str, i=0, j=-1):
try:
if str[i] == str[j]:
return palindrome(str, i + 1, j - 1)
return False
except IndexError:
return True
def palindrome(str, i=0, j=-1):
try:
Osmo Maatta writes:
> Hello,
>
> Sub class test fails.
> ==
> I have a program that needs to load plugin-classes during runtime.
>
> The program has these subdirectories (modules).
>
> $ tree
> .
> `-- test.py
> |
> |-- plugins
> | |-- base_plugin.py
> | |-- base_plug
Matteo Landi writes:
> Well, I tried the also the solution posted above (recursive w/o
> slicing and iterative), and I discovered they were the slowest..
>
> is_palindrome_recursive 2.68151649808
> is_palindrome_slice 0.44510699381
> is_palindrome_list 1.93861944217
> is_palindrome_reversed 3.289
Steven D'Aprano wrote:
On Sat, 28 Aug 2010 00:33:10 -0700, Paul Rubin wrote:
If you drop the last reference
to a complex structure, it could take quite a long time to free all the
components. By contrast there are provably real-time tracing gc
schemes, including some parallelizeable ones.
I
Hello,
Sub class test fails.
==
I have a program that needs to load plugin-classes during runtime.
The program has these subdirectories (modules).
$ tree
.
`-- test.py
|
|-- plugins
| |-- base_plugin.py
| |-- base_plugin.pyc
| |-- __init__.py
| `-- oca
|
Steven D'Aprano wrote:
I'm not entirely sure what the use-case for swapcase is.
Obviously it's for correcting things that were typed
in with tHE cAPS lOCK kEY oN bY mISTAKE. :-)
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Well, I tried the also the solution posted above (recursive w/o
slicing and iterative), and I discovered they were the slowest..
is_palindrome_recursive 2.68151649808
is_palindrome_slice 0.44510699381
is_palindrome_list 1.93861944217
is_palindrome_reversed 3.28969831976
is_palindrome_recursive_no_
has anyone successfully installed PyGeo under python 2.7 (prefer ubuntu
10.04) ,
the site says
http://www.wspiegel.de/pymaxima/index_en.html
"Note: The installation of PyGeo work's only under Python 2.4 (The
further development of pygeo seems to be stopped)"
is this to do with re-org of sit
Chris Rebert writes:
> On Sat, Aug 28, 2010 at 2:37 PM, David ROBERT wrote:
>> Hi all,
>>
>> I want to use an InteractiveConsole at some stage in a program to
>> interact with the local namespace: access, but also modify objects.
>> When the interactive console ends (ctrl-d) I want the program t
hox Shoes (http://
www.brandtrade66.com/)
shoes shox shoes (http://
www.brandtrade66.com/)
nike shox shoe (http://
www.brandtrade66.com/)
nike shox shoes ( http://www.brandtrade66.com/
)
shox shoe ( http://www.brandtrade66.com/
)
LV,coach,chanel boots wholesale (
http://www.brandtrade66.com/ )
air
> looking for a python project (preferably something a bit small) that
> is looking for contributors. the small bit is because i've never
> worked in a team before and haven't really read source code that's
> 1000s of lines long, so i'm not too sure i can keep up.
>
> my python fu is decent (i thin
94 matches
Mail list logo