That makes a lot of sense. And if I take the approach that any Py*
function might do this, it actually looks like I can simplify my code
(rather than managing some list of ill-behaved functions or
something.) Thanks!
On Fri, Jan 29, 2010 at 3:58 PM, Duncan Booth
wrote:
> Austin Bingham wrote:
>
The original post was, in a nutshell, the "use case"; it's very scaled
down the from the real example, and not intended to "make sense". The
notion on which I was (apparently incorrectly) basing my exception
translation was that I could 1) get and reset references to the error
indicators, 2) call o
Mr.M, 29.01.2010 23:50:
> I can't figure out if there is a way to run a specialized cleanup
> function when a module needs to be "unloaded" (i.e. just before a
> reload() or when i quit the interpreter).
>
> I'm thinking of something like tp_dealloc.
>
> If I call Py_InitModule3 and look at modul
I came up with this descriptor a few years ago, but never used it for
anything. I've just found an actual use for it in my own code, so I
thought I'd make it public for anyone else who might have a use for it.
Use-case: if you have a class without an __init__ or __new__ method, then
this may be
Blog writes:
> (Debian does ship with 2.5, but the next major release "sid' is due
> out in Q2)
Sid is the perpetual development playground (“unstable”), never released
as a suite, but a proving ground for packages to determine their fitness
for going to the next level of testing.
The next-to-b
On 1/28/2010 8:44 AM, Paul Rubin wrote:
Steve Holden writes:
Kindly confine your debate to the facts and keep the snide remarks to
yourself. Like it or not Python 3 is the future, and unladen swallow's
recent announcement that they would target only Python 3 represented a
ground-breaking advanc
On 1/28/2010 2:56 AM, John Nagle wrote:
Daniel Fetchinson wrote:
1. Python 3 is supported by major Linux distributions.
FALSE - most distros are shipping with Python 2.4, or 2.5 at best.
Where did you come up with that information? Almost all of the major
distros ship with 2.6.x - CentOS, Ope
On Fri, Jan 29, 2010 at 8:37 AM, Alan Harris-Reid <
aharrisr...@googlemail.com> wrote:
> Hi,
>
> I am creating a web application (using Python 3.1 and CherryPy 3.2) where a
> SQLite connection and cursor object are created using the following code
> (simplified from the original):
>
> class MainSi
On Fri, 29 Jan 2010 14:49:06 -0800, Jonathan Gardner wrote:
> On Jan 28, 3:52 pm, elsa wrote:
>>
>> I've got a problem with my program, in that the code just takes too
>> long to run. Here's what I'm doing. If anyone has any tips, they'd be
>> much appreciated!
>>
>>
> First of all, don't play wi
On Jan 28, 9:34 pm, Steven D'Aprano wrote:
> On Thu, 28 Jan 2010 21:21:05 -0800, Tim Roberts wrote:
> > Perl 6, on the other hand, is still fantasyware a decade after its
> > announcement. It is, for the most part, THE canonical example of the
> > wrong way to conduct a development effort.
>
> Ou
On Fri, 29 Jan 2010 18:38:47 -0300, Gabriel Genellina wrote:
>> I'm using the raw_input method and it works fine, but I noted that I
>> can't use backspace and when I accidentally press shift space (because
>> I need to input uppercase letters separated by a space) it writes some
>> strange charac
On Fri, Jan 29, 2010 at 5:29 PM, Ben Finney wrote:
> Duncan Booth writes:
>
>> Here's what I see in the Ubuntu packages. Python 3 seems only to be in the
>> universe repositories so far.
>>
>> Dapper: Python 2.4.2
>> Hardy: Python 2.5.2
>> Intrepid: Python 2.5.2, 3.0~b3 (universe)
>> Jaunty: Pyth
In article <5bfefbb6-89a8-49f6-9f02-7d36dfbc0...@c29g2000yqd.googlegroups.com>,
suresh.amritapuri wrote:
>
>If I am using scipy.ndimage.gaussian_filter() for filtering an image,
>how to do the inverse filtering? In general how to do this using
>scipy.ndimage?
http://projects.scipy.org/mailman/lis
On 1/29/2010 4:43 PM, Andrej Mitrovic wrote:
On Jan 29, 10:07 pm, Steve Holden wrote:
Andrej Mitrovic wrote:
On Jan 29, 6:47 pm, Steve Holden wrote:
Andrej Mitrovic wrote:
I've noticed that when running Python in interactive mode (via cmd on
windows), the first time I hit tab it will move 4
En Fri, 29 Jan 2010 18:25:14 -0300, Austin Bingham
escribió:
Maybe I'm not following what you're saying. In my case, I already know
that an exception has been thrown. In the course of processing that
exception, I call another function which, for whatever reason and even
when it succeeds, clea
[top posting corrected]
From: Steve Holden
Date: Tue, 26 Jan 2010 11:54:23 -0500
Anyway, I suspect your error might go away if you turned the first
argument of hte log.info() call into a format string such as
log.info("refer: %s", ret)
try:
log.info("start")
log.info("refer",ret)
Gabriel Genellina ha scritto:
I think what you want to do isn't possible with Python 2, and it's one
of the reasons the module handling was redesigned in Python 3.x; see PEP
3121.
Thank you Gabriel for your help. Unlucky I can't use Python 3.x in my
project, sob!
Luca.
--
http://mail.python
En Fri, 29 Jan 2010 19:50:52 -0300, Mr.M escribió:
I can't figure out if there is a way to run a specialized cleanup
function when a module needs to be "unloaded" (i.e. just before a
reload() or when i quit the interpreter).
I think what you want to do isn't possible with Python 2, and it'
Hi,
I can't figure out if there is a way to run a specialized cleanup
function when a module needs to be "unloaded" (i.e. just before a
reload() or when i quit the interpreter).
I'm thinking of something like tp_dealloc.
If I call Py_InitModule3 and look at module->ob_type->tp_dealloc, I fin
On Jan 28, 3:52 pm, elsa wrote:
>
> I've got a problem with my program, in that the code just takes too
> long to run. Here's what I'm doing. If anyone has any tips, they'd be
> much appreciated!
>
First of all, don't play with large lists. Large lists have a tendency
to grow larger over time, un
Duncan Booth writes:
> Here's what I see in the Ubuntu packages. Python 3 seems only to be in the
> universe repositories so far.
>
> Dapper: Python 2.4.2
> Hardy: Python 2.5.2
> Intrepid: Python 2.5.2, 3.0~b3 (universe)
> Jaunty: Python 2.6.2, 3.0.1 (universe)
> Karmic: Python 2.6.4rc1, 3.1 (un
On Jan 28, 10:29 pm, "Stephen.Wu" <54wut...@gmail.com> wrote:
> str.find(targetStr)
> str.index(targetStr) with exception
> str.count(targetStr)
> targetStr in str
>
> which is the fastest way to check whether targetStr is in str?
>
The fastest way of all is to forget about this and finish the res
On Jan 29, 12:25 am, "Martin v. Loewis" wrote:
> > Well, I'd consider that an official release. Note that I didn't claim
> > there was no hope PSF wouldn't change it's mind on 2.8.
>
> I'd like to point out that the PSF formally doesn't have any say in
> this.
Doesn't PSF own the Python trademar
On Jan 29, 8:37 am, Alan Harris-Reid
wrote:
>
> Questions...
> 1. Is there a large overhead in opening a new SQLite connection for
> each thread (ie. within each method)?
Yes, but not as bad as some other DBs.
> 2. Is there any way to use the same connection for the whole class (or
> should I
On Jan 29, 8:53 am, "Mr.SpOOn" wrote:
> Hi,
> I need to get keyboard input in a python program. I need it to let the
> user choose some options, for example:
>
> 1) option 1
> 2) option 2
> 3) option 3
>
> and then to input some data to the program.
>
> I'm using the raw_input method and it works
On Jan 29, 3:38 pm, "Gabriel Genellina"
wrote:
> but it's a big
> move. wxPython would let you write a graphical interface (and it's a
> bigger move!)
>
> --
> Gabriel Genellina
*ahem*!, tkinter is just a slightly medium move, and my god it's in
the stdlib for crying out loud!!
--
http://
En Thu, 28 Jan 2010 05:07:00 -0300, Durumdara
escribió:
I have an exotic db, with exotic drivers, and it have buggy ODBC driver.
But I have native driver - under Delphi.
I need to access this DB under Pylons (or mod_python).
[...]
I think to COM/OLE, because it is accessable from all progr
On Jan 29, 10:07 pm, Steve Holden wrote:
> Andrej Mitrovic wrote:
> > On Jan 29, 6:47 pm, Steve Holden wrote:
> >> Andrej Mitrovic wrote:
> >>> I've noticed that when running Python in interactive mode (via cmd on
> >>> windows), the first time I hit tab it will move 4 spaces to the right,
> >>>
En Fri, 29 Jan 2010 13:53:43 -0300, Mr.SpOOn
escribió:
I need to get keyboard input in a python program. I need it to let the
user choose some options, for example:
1) option 1
2) option 2
3) option 3
and then to input some data to the program.
I'm using the raw_input method and it works f
We're currently writing a web application based on a threaded
python web server framework (cherrypy) and would like to
simultaneously support users from multiple locales.
The locale module doesn't appear to be thread safe. Are there 3rd
party libraries or modules that provide locale parsing and
fo
Maybe I'm not following what you're saying. In my case, I already know
that an exception has been thrown. In the course of processing that
exception, I call another function which, for whatever reason and even
when it succeeds, clears the exception indicators. How can I address
this issue by checki
En Thu, 28 Jan 2010 10:25:30 -0300, Richard Lamboj
escribió:
which Method is better to kill a Thread? Using Thread Events, or a
raising a
Exception? Maybe someone has a small example for me?
The best way is simply NOT to do that. You don't kill a thread, you ask it
to commit suicide. T
Andrej Mitrovic wrote:
> On Jan 29, 6:47 pm, Steve Holden wrote:
>> Andrej Mitrovic wrote:
>>> I've noticed that when running Python in interactive mode (via cmd on
>>> windows), the first time I hit tab it will move 4 spaces to the right,
>>> however each new tab will move 8 spaces instead of 4.
En Wed, 27 Jan 2010 00:11:10 -0300, moon sky escribió:
i just want to write a small tool to manage the network, including detect
the ip addr,netmask, and send the arp request to find out locale's
ip-mac
turtple,
is there any way to succeed this exlude 'subprocess call'?
Try scapy: http://
On Jan 29, 6:47 pm, Steve Holden wrote:
> Andrej Mitrovic wrote:
> > I've noticed that when running Python in interactive mode (via cmd on
> > windows), the first time I hit tab it will move 4 spaces to the right,
> > however each new tab will move 8 spaces instead of 4. Why this
> > inconsistent
En Fri, 29 Jan 2010 13:09:40 -0300, Michele Simionato
escribió:
On Jan 29, 2:30 pm, andrew cooke wrote:
Is there any way to change the name of the function in an error
message? In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decora
En Fri, 29 Jan 2010 12:54:23 -0300, Thomas Allen
escribió:
I have a script that runs an instance of SimpleXMLRPCServer and in
general it works as expected. In its __del__, it is supposed to clean
up its PID file (written on boot). I have two problems with this
server instance: The first is th
En Wed, 27 Jan 2010 15:48:23 -0300, George Trojan
escribió:
Arnaud Delobelle wrote:
George Trojan writes:
Inspired by the 'Default path for files' thread I tried to use
sitecustomize in my code. What puzzles me is that the site.py's main()
is not executed. My sitecustomize.py is
That gave
On Jan 29, 7:54 am, Thomas Allen wrote:
> I have a script that runs an instance of SimpleXMLRPCServer and in
> general it works as expected. In its __del__, it is supposed to clean
> up its PID file (written on boot). I have two problems with this
> server instance: The first is that tt doesn't al
En Fri, 29 Jan 2010 11:37:09 -0300, Austin Bingham
escribió:
I've noticed that several (many?) python functions seem to clear the
error/exception indicators when they're called from a C/C++ program.
For example, both PyImport_ImportModule and traceback.extract_tb()
(called via the function ca
Sells, Fred, 29.01.2010 20:31:
> Google is your friend. Elementtree is one of the better documented
> IMHO, but there are many modules to do this.
Unless the OP provides some more information, "do this" is rather
underdefined. And sending someone off to Google who is just learning the
basics of P
Google is your friend. Elementtree is one of the better documented
IMHO, but there are many modules to do this.
> -Original Message-
> From: python-list-bounces+frsells=adventistcare@python.org
> [mailto:python-list-bounces+frsells=adventistcare@python.org] On
> Behalf Of Stefan B
jakecjacobson, 29.01.2010 18:25:
> I need to take a XML web resource and split it up into smaller XML
> files. I am able to retrieve the web resource but I can't find any
> good XML examples. I am just learning Python so forgive me if this
> question has been answered many times in the past.
>
>
On Fri, 2010-01-29 at 10:34 -0800, jakecjacobson wrote:
> On Jan 29, 1:04 pm, Adam Tauno Williams
> wrote:
> > On Fri, 2010-01-29 at 09:25 -0800, jakecjacobson wrote:
> > > I need to take a XML web resource and split it up into smaller XML
> > > files. I am able to retrieve the web resource but I
On Jan 29, 1:04 pm, Adam Tauno Williams
wrote:
> On Fri, 2010-01-29 at 09:25 -0800, jakecjacobson wrote:
> > I need to take a XML web resource and split it up into smaller XML
> > files. I am able to retrieve the web resource but I can't find any
> > good XML examples. I am just learning Python
On Jan 29, 9:33 am, Andreas Tawn wrote:
> > On Jan 28, 4:55 pm, "Gabriel Genellina"
> > wrote:
> > > Please provide more details. What do you want your program to do
> > while
> > > sleeping? What kind of actions do you want a response to?
> > > Do you have a GUI? A curses-based interfase?
>
> >
En Fri, 29 Jan 2010 14:39:31 -0300, MRAB
escribió:
JohnnyFive wrote:
My app is purely console based. I just don't want the console to lock
up (on Windows using time.sleep(x) causes the console to become
unresponsive until the timer is done), and I want people to be able to
CTRL+C to stop th
On Fri, 2010-01-29 at 09:25 -0800, jakecjacobson wrote:
> I need to take a XML web resource and split it up into smaller XML
> files. I am able to retrieve the web resource but I can't find any
> good XML examples. I am just learning Python so forgive me if this
> question has been answered many
> On Jan 28, 4:55 pm, "Gabriel Genellina"
> wrote:
> > Please provide more details. What do you want your program to do
> while
> > sleeping? What kind of actions do you want a response to?
> > Do you have a GUI? A curses-based interfase?
> >
> > --
> > Gabriel Genellina
>
> My app is purely cons
Andrej Mitrovic wrote:
> I've noticed that when running Python in interactive mode (via cmd on
> windows), the first time I hit tab it will move 4 spaces to the right,
> however each new tab will move 8 spaces instead of 4. Why this
> inconsistent behavior? And how could I change this to be consist
JohnnyFive wrote:
On Jan 28, 4:55 pm, "Gabriel Genellina"
wrote:
Please provide more details. What do you want your program to do while
sleeping? What kind of actions do you want a response to?
Do you have a GUI? A curses-based interfase?
--
Gabriel Genellina
My app is purely console based
I've noticed that when running Python in interactive mode (via cmd on
windows), the first time I hit tab it will move 4 spaces to the right,
however each new tab will move 8 spaces instead of 4. Why this
inconsistent behavior? And how could I change this to be consistent
and always move only 4 spac
I need to take a XML web resource and split it up into smaller XML
files. I am able to retrieve the web resource but I can't find any
good XML examples. I am just learning Python so forgive me if this
question has been answered many times in the past.
My resource is like:
...
...
On 2010-01-29 11:00 AM, Mr.M wrote:
I think this sounds like a stupid question, but I searched the C/Api doc
and google but I wasn't able to find any hint:
how can I retrive PyObject pointer if I only know it's name?
What I'd like to do is something like this:
[code]
PyObject* obj = PyFindWhat
On Jan 28, 4:55 pm, "Gabriel Genellina"
wrote:
> Please provide more details. What do you want your program to do while
> sleeping? What kind of actions do you want a response to?
> Do you have a GUI? A curses-based interfase?
>
> --
> Gabriel Genellina
My app is purely console based. I just do
I think this sounds like a stupid question, but I searched the C/Api doc
and google but I wasn't able to find any hint:
how can I retrive PyObject pointer if I only know it's name?
What I'd like to do is something like this:
[code]
PyObject* obj = PyFindWhatImLookingFor("w.z.y.x");
[/code]
Of
Hi,
I need to get keyboard input in a python program. I need it to let the
user choose some options, for example:
1) option 1
2) option 2
3) option 3
and then to input some data to the program.
I'm using the raw_input method and it works fine, but I noted that I
can't use backspace and when I ac
Hi,
I am creating a web application (using Python 3.1 and CherryPy 3.2)
where a SQLite connection and cursor object are created using the
following code (simplified from the original):
class MainSite:
con = sqlite.connect('MyDatabase.db')
cursor = con.cursor()
def index_page():
On Fri, 2010-01-29 at 07:54 -0800, Thomas Allen wrote:
> The second is that when it does crash, I don't know about it...what
> would be sufficient as a "keep-alive" script to restart it? I suppose
> I could use something like EventMachine (already installed on my
> server) to watch the PID file if
Mattsteel wrote:
> Sadly (for me), you're right... then the only way to use doctest to
> work both in 2.6 and 3.1 (without modifications between them) is
> something like this:
>
> #!/usr/bin/env python
> '''
str(concat('hello','world'))
> 'hello world'
> '''
> from __future__ import unicod
Hi Peter.
Sadly (for me), you're right... then the only way to use doctest to
work both in 2.6 and 3.1 (without modifications between them) is
something like this:
#!/usr/bin/env python
'''
>>> str(concat('hello','world'))
'hello world'
'''
from __future__ import unicode_literals
def concat( firs
On Jan 29, 2:30 pm, andrew cooke wrote:
> Is there any way to change the name of the function in an error
> message? In the example below I'd like the error to refer to bar(),
> for example (the motivation is related function decorators - I'd like
> the wrapper function to give the same name)
Us
On Fri, 2010-01-29 at 07:54 -0800, Thomas Allen wrote:
> I have a script that runs an instance of SimpleXMLRPCServer and in
> general it works as expected. In its __del__, it is supposed to clean
> up its PID file (written on boot). I have two problems with this
> server instance: The first is that
I have a script that runs an instance of SimpleXMLRPCServer and in
general it works as expected. In its __del__, it is supposed to clean
up its PID file (written on boot). I have two problems with this
server instance: The first is that tt doesn't always clean up its PID
file; is there a more relia
Mattsteel wrote:
> Hello all.
> I'm using Python 2.6.4 and Python 3.1.1.
> My wish is to code in a 3.1-compliant way using 2.6, so I'm importing
> the __future__ module.
> I've found a funny thing comparing the two folliwing snippets that
> differ for one line only, that is the position of __futur
On Jan 27, 2:56 pm, John Nagle wrote:
> Daniel Fetchinson wrote:
> > Hi folks,
>
> > I was going to write this post for a while because all sorts of myths
> > periodically come up on this list about python 3. I don't think the
> > posters mean to spread false information on purpose, they simply ar
* Steven D'Aprano:
On Fri, 29 Jan 2010 07:10:01 +0100, Alf P. Steinbach wrote:
>>> L = ["æ", "ø", "å"] # This is in SORTED ORDER in Norwegian L
[...]
>>> L.sort( key = locale.strxfrm )
>>> L
['å', 'æ', 'ø']
>>> locale.strcoll( "å", "æ" )
1
>>> locale.strcoll( "æ", "ø"
On 29 Jan, 06:56, Terry Reedy wrote:
> On 1/28/2010 6:47 PM, Paul Boddie wrote:
>
> > What would annoy me if I used Python 3.x would be the apparent lack of
> > the __cmp__ method for conveniently defining comparisons between
> > instances of my own classes. Having to define all the rich compariso
Hello all.
I'm using Python 2.6.4 and Python 3.1.1.
My wish is to code in a 3.1-compliant way using 2.6, so I'm importing
the __future__ module.
I've found a funny thing comparing the two folliwing snippets that
differ for one line only, that is the position of __future__ import
(before or after th
Austin Bingham wrote:
> The functions that do this don't seem to indicate in their
> documentation that this will happen. So first, does anyone know why
> this is happening? Is it because of the context in which I'm making
> the calls? Is there any pattern or reason behind which functions will
>
On 02:10 pm, c...@rebertia.com wrote:
On Fri, Jan 29, 2010 at 5:30 AM, andrew cooke
wrote:
Is there any way to change the name of the function in an error
message? �In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decorators - I'd like
t
Johann Spies wrote:
> On Thu, Jan 28, 2010 at 07:07:04AM -0800, evilweasel wrote:
> > Hi folks,
> >
> > I am a newbie to python, and I would be grateful if someone could
> > point out the mistake in my program. Basically, I have a huge text
> > file similar to the format below:
> >
> > AGACTC
On Fri, Jan 29, 2010 at 6:33 AM, Peter Otten <__pete...@web.de> wrote:
> dirknbr wrote:
>> I am trying to install simplejson on Python 3.1 on Windows. When I do
>> 'python setup.py install' I get 'except DisutilsPlatformError, x:
>> SyntaxError' with a dash under the comma.
>
> You are trying to in
dirknbr wrote:
> I am trying to install simplejson on Python 3.1 on Windows. When I do
> 'python setup.py install' I get 'except DisutilsPlatformError, x:
> SyntaxError' with a dash under the comma.
There is no need to install simplejson yourself. Python 3 and 2.6
already have a JSON package calle
I've noticed that several (many?) python functions seem to clear the
error/exception indicators when they're called from a C/C++ program.
For example, both PyImport_ImportModule and traceback.extract_tb()
(called via the function call methods) do this: if error indicators
are set prior to their cal
dirknbr wrote:
> I am trying to install simplejson on Python 3.1 on Windows. When I do
> 'python setup.py install' I get 'except DisutilsPlatformError, x:
> SyntaxError' with a dash under the comma.
You are trying to install a package written for Python 2.x on 3.x, and some
of the 2.x Syntax is
andrew cooke wrote:
> Is there any way to change the name of the function in an error
> message? In the example below I'd like the error to refer to bar(),
> for example (the motivation is related function decorators - I'd like
> the wrapper function to give the same name)
>
def foo():
> ..
On Fri, 29 Jan 2010 11:23:54 +0200
Johann Spies wrote:
> I know this is a python list but if you really want to get the job
> done quickly this is one method without writing python code:
> [...]
> $ grep -v 0 /tmp/y > tmp/z
There's plenty of ways to do it without writing Python. C, C++, Perl,
Fo
I am trying to install simplejson on Python 3.1 on Windows. When I do
'python setup.py install' I get 'except DisutilsPlatformError, x:
SyntaxError' with a dash under the comma.
Any ideas?
Dirk
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Jan 29, 2010 at 5:30 AM, andrew cooke wrote:
> Is there any way to change the name of the function in an error
> message? In the example below I'd like the error to refer to bar(),
> for example (the motivation is related function decorators - I'd like
> the wrapper function to give the s
Steven D'Aprano wrote:
> If that's too verbose for you, stick this as a helper function in your
> application:
>
>
> def CmpToKey(mycmp):
> 'Convert a cmp= function into a key= function'
> class K(object):
> def __init__(self, obj, *args):
> self.obj = obj
>
On Fri, Jan 29, 2010 at 8:13 AM, Anssi Saari wrote:
> Daniel Fetchinson writes:
>
>>> 1. Python 3 is supported by major Linux distributions.
>>>
>>> FALSE - most distros are shipping with Python 2.4, or 2.5 at best.
>>
>> This latter statement is false, Fedora 11 and 12 come with python 2.6
Anssi Saari wrote:
> Daniel Fetchinson writes:
>
>>> 1. Python 3 is supported by major Linux distributions.
>>>
>>> FALSE - most distros are shipping with Python 2.4, or 2.5 at best.
>>
>> This latter statement is false, Fedora 11 and 12 come with python 2.6.
>
> How does your mention of
andrew cooke wrote:
Is there any way to change the name of the function in an error
message? In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decorators - I'd like
the wrapper function to give the same name)
def foo():
...
Is there any way to change the name of the function in an error
message? In the example below I'd like the error to refer to bar(),
for example (the motivation is related function decorators - I'd like
the wrapper function to give the same name)
>>> def foo():
... return 7
...
>>> foo.__name
On Fri, Jan 29, 2010 at 10:04:33AM +, Steven D'Aprano wrote:
> > I know this is a python list but if you really want to get the job done
> > quickly this is one method without writing python code:
> >
> > $ cat /tmp/y
> > AGACTCGAGTGCGCGGA 0
> > AGATAAGCTAATTAAGCTACTGG 0
> >
Daniel Fetchinson writes:
>> 1. Python 3 is supported by major Linux distributions.
>>
>> FALSE - most distros are shipping with Python 2.4, or 2.5 at best.
>
> This latter statement is false, Fedora 11 and 12 come with python 2.6.
How does your mention of one distro counter that claim? Pe
Stefan Behnel writes:
> 'Stable Debian' has a long tradition of being late and outdated on arrival.
> That doesn't mean you can't use existing Debian packages on it.
Yes, but that's beside the point. No released version of Debian ships
with Python3 or even 2.6.
Oh, and RHEL5 and CentOS5 ship wi
Le Fri, 29 Jan 2010 13:16:11 +1100, Ben Finney a écrit :
>
> I think the reason “date” was initially used is because dates are most
> familiar to us as fleshy, dark brown, wrinkled, compressed points.
>
> My interests in etymology and scatology unite here.
Ah, I suppose it explains the strange A
On 2010-01-29, Neil Hodgson wrote:
> Looks to me like the problem with Perl 6 was that it was too
> ambitious, wanting to fix all perceived problems with the
> language.
I thought Python was Perl with all the perceived problems fixed.
--
Grant
--
http://mail.python.org/mailman/listinfo/pytho
On Fri, 29 Jan 2010 07:10:01 +0100, Alf P. Steinbach wrote:
>>>> L = ["æ", "ø", "å"] # This is in SORTED ORDER in Norwegian L
[...]
>>>> L.sort( key = locale.strxfrm )
>>>> L
>['å', 'æ', 'ø']
>>>> locale.strcoll( "å", "æ" )
>1
>>>> locale.strcoll( "æ", "ø" )
>-1
Le Thu, 28 Jan 2010 22:39:32 -0800, alex23 a écrit :
> On Jan 29, 4:29 pm, "Stephen.Wu" <54wut...@gmail.com> wrote:
>> str.find(targetStr)
>> str.index(targetStr) with exception
>> str.count(targetStr)
>> targetStr in str
>>
>> which is the fastest way to check whether targetStr is in str?
>
[...]
Hi,
I'm using Python 2.6 and using the threading module.
In a python module (parent module) I'm importing main() function from
another python module. I'm runnin this main() function on a Python
thread so that I can periodically check in the parent thread/module if
the new thread is up and running.
alex23 a écrit :
On Jan 29, 4:29 pm, "Stephen.Wu" <54wut...@gmail.com> wrote:
str.find(targetStr)
str.index(targetStr) with exception
str.count(targetStr)
targetStr in str
which is the fastest way to check whether targetStr is in str?
It's generally a lot quicker to investigate this kind of q
On Fri, 29 Jan 2010 11:23:54 +0200, Johann Spies wrote:
> On Thu, Jan 28, 2010 at 07:07:04AM -0800, evilweasel wrote:
>> Hi folks,
>>
>> I am a newbie to python, and I would be grateful if someone could point
>> out the mistake in my program. Basically, I have a huge text file
>> similar to the f
On Thu, Jan 28, 2010 at 07:07:04AM -0800, evilweasel wrote:
> Hi folks,
>
> I am a newbie to python, and I would be grateful if someone could
> point out the mistake in my program. Basically, I have a huge text
> file similar to the format below:
>
> AGACTCGAGTGCGCGGA 0
> AGATAAGCTAATTAAG
Hi,
Thats the output i got in output window.it is not listing the statement
which caused it. copy paste and try it on you setup. it behaves the same
way.
I know that error is in log.info() function call.but it is not caught by
"except". which is not getting logged using log.exception
Thanks
Sidd
Hi,
Thats the output i got in output window.it is not listing the statement
which caused it. copy paste and try it on you setup. it behaves the same
way.
I know that error is in log.info() function call.but it is not caught by
"except". which is not getting logged using log.exception
Thanks
Sidd
On 29 ene, 05:44, Dennis Lee Bieber wrote:
> On Thu, 28 Jan 2010 11:24:28 -0800 (PST), Joan Miller
> declaimed the following in
> gmane.comp.python.general:
>
> > On 28 ene, 19:16, Josh Holland wrote:
> > > On 2010-01-28, Joan Miller wrote:
>
> > > > I've to call to many functions with the form
Ben Finney wrote:
> Peter Otten <__pete...@web.de> writes:
>
>> I can't find the relevant part of the 2.6 documentation, but something
>> like
>>
>> >>> def key(x):
>> ... t = type(x)
>> ... t = compat.get(t, t)
>> ... return t.__name__, id(t), x
>> ...
>> >>> compat = {bool: float, i
1 - 100 of 112 matches
Mail list logo