Le Wed, 25 Feb 2009 00:01:49 -,
"Alan Gauld" s'exprima ainsi:
>
> "nathan virgil" wrote
>
> > I'm not familiar with lambdas yet, and I don't think this book will
> > introduce me to them; they aren't listed in the index, anyway.
>
> lambda is just a fancy mathematical name for a simple
On Wed, Feb 25, 2009 at 2:32 AM, nathan virgil wrote:
> Erm, it's still not working...
>
> Whenever I try to use the talk method (which reports the mood, and doesn't
> take parameters), it says I gave it too many parameters. Maybe it might help
> if I posted the code in it's entirety
>
>
> # C
"nathan virgil" wrote
Whenever I try to use the talk method (which reports the mood, and
doesn't
take parameters), it says I gave it too many parameters.
Sorry, I should have pointed out that you will need to redefine
all your functions to accept a parameter.
Alan G
___
Hello all,
query 1) How should i overwrite the input file
I want to open 5 files one by one, do some operation on the lines and write
the modified lines on the same file (overwritting). Can some please tell me
how to do it.
pat1=" R"
pat2="U5"
pat3="A3"
from sys import argv
files=argv[1:]
for nam
hi
>>> licenseRe = re.compile(r'\(([A-Z]+)\)\s*(No.\d+)?')
>>> for license in licenses:
m = licenseRe.search(license)
print m.group(1, 3)
Traceback (most recent call last):
File "", line 3, in
print m.group(1, 3)
IndexError: no such group
Something wrong with this code.
_
Bala subramanian wrote:
Hello all,
query 1) How should i overwrite the input file
I want to open 5 files one by one, do some operation on the lines and write
the modified lines on the same file (overwritting). Can some please tell me
how to do it.
You cannot write output to a file if you need
hi
for license in licenses:
m = licenseRe.search(license)
print m.group(1, 2)
('ABTA', 'No.56542')
('ATOL', None)
('IATA', None)
('ITMA', None)
Yes It is working
Thank you
Prasad
___
Tutor maillist - Tutor@python.org
http://mail.python.or
Bala subramanian wrote:
Hello all,
query 1) How should i overwrite the input file
I want to open 5 files one by one, do some operation on the lines and
write the modified lines on the same file (overwritting). Can some
please tell me how to do it.
import fileinput
pat1=" R"
pat2="U5"
pat3="A
A.T.Hofkamp wrote:
write the output to a temporary file while reading the input, then
rename the temporary file.
This I believe is what the fileinput module does when you use it with
the inplace parameter set to 1.
--
~noufal
http://nibrahim.net.in/
On Wed, Feb 25, 2009 at 7:46 AM, prasad rao wrote:
> hi
licenseRe = re.compile(r'\(([A-Z]+)\)\s*(No.\d+)?')
for license in licenses:
> m = licenseRe.search(license)
> print m.group(1, 3)
>
> Traceback (most recent call last):
> File "", line 3, in
> print m.group(1, 3)
On Wed, Feb 25, 2009 at 8:26 AM, Noufal Ibrahim wrote:
> Bala subramanian wrote:
>>
>> Hello all,
>>
>> query 1) How should i overwrite the input file
>> I want to open 5 files one by one, do some operation on the lines and
>> write the modified lines on the same file (overwritting). Can some plea
* Dinesh B Vadhia (Fri, 20 Feb 2009 02:52:27 -0800)
> We want to standardize on unicode and utf8
Very good idea.
> and would like to clarify and verify their use to minimize encode
> ()/decode()'ing:
>
> 1. Python source files
> Use the header: # -*- coding: utf8 -*-
Good idea (although only
* spir (Fri, 20 Feb 2009 13:02:59 +0100)
> Le Fri, 20 Feb 2009 02:52:27 -0800,
> "Dinesh B Vadhia" s'exprima ainsi:
>
> > We want to standardize on unicode and utf8 and would like to clarify and
> > verify their use to minimize encode()/decode()'ing:
> >
> > 1. Python source files
> > Use the
* Eric Dorsey (Thu, 19 Feb 2009 12:24:07 -0700)
> Still doesnt work.. I just get this when I hit the up arrow:>>> ^[[A
>
> Bah. It works in the 2.5 version that came packaged with it. Thanks for
> trying :)
There's a log for the ./configure. See if the configure script can find
readline.
Thorst
"Bala subramanian" wrote
query 1) How should i overwrite the input file
I want to open 5 files one by one, do some operation on the lines
and write
the modified lines on the same file (overwritting). Can some please
tell me
how to do it.
You don't really want to do that! Too risky.
Better
On Wed, Feb 25, 2009 at 12:46 PM, Thorsten Kampe
wrote:
> * spir (Fri, 20 Feb 2009 13:02:59 +0100)
>> > Use the header: # -*- coding: utf8 -*-
>>
>> You don't even need fancy decoration:
>>
>> # coding: utf-8
>>
>> is enough.
>
> Sure? Never heard of that. Interesting...
>From PEP 263 (http://ww
On Wed, Feb 25, 2009 at 1:53 PM, Alan Gauld wrote:
>
> "Bala subramanian" wrote
>
>> query 1) How should i overwrite the input file
>> I want to open 5 files one by one, do some operation on the lines and
>> write
>> the modified lines on the same file (overwritting). Can some please tell
>> me
>
i found the solution
This is my first attempt at memcaching html page using cheetah
since cheetah render needs locals() i use getCallerInfo() to get the
locals() and send to memcached
let me know if it is possible to better do this
*notice getCallerInfo
*
*utils.py*
@log_time_func
def renderpage(k
i found the solution
This is my first attempt at memcaching html page using cheetah
since cheetah render needs locals() i use getCallerInfo() to get the
locals() and send to memcached
let me know if it is possible to better do this
*notice getCallerInfo
*
*utils.py*
@log_time_func
def renderpage(k
On Thu, 19 Feb 2009 09:27:34 +0300, Ø²ÙØ§Ø¯ Ø¨Ù Ø¹Ø¨Ø¯Ø§ÙØ¹Ø²Ùز Ø§ÙØ¨Ø§ØªÙÙ wrote:
> On Wed, 18 Feb 2009 20:19:56 -0700
> Eric Dorsey wrote:
>> I did an aptitute install of ibreadline5-dev and then did ./configure
>> and make again, and still don't have any functionality to be able to
>>
Thanks for all your continued insights on this. I'm going to investigate the
.configure log, as well as look around at other readline packages.. But,
noob question, did you just go into something like synaptic to find out what
readline type packages are installed? (Sorry if this is annoying anyone
On Wed, 2009-02-25 at 22:23 -0700, Eric Dorsey wrote:
> Thanks for all your continued insights on this. I'm going to
> investigate the .configure log, as well as look around at other
> readline packages.. But, noob question, did you just go into something
> like synaptic to find out what readline t
hello list,
Below is the sample code of a class.
import
Class ABC:
def __init__(self,a,b,c):
statement 1
statement 2
def func(x,y):
statement 1
state
On Thu, 26 Feb 2009 12:38:27 +0530, Abhishek Kumar wrote:
> hello list,
>
You need to read through the tutorial first: http://docs.python.org/
tutorial/
If there are still things you don't understand, please ask again.
As for your question, here is a sample useless python code:
class MyClass(
On Thu, 26 Feb 2009 12:38:27 +0530, Abhishek Kumar wrote:
> hello list,
>
You need to read through the tutorial first: http://docs.python.org/
tutorial/
If there are still things you don't understand, please ask again.
As for your question, here is a sample useless python code:
class MyClass(
@Abhishek,
On 2/26/09, Abhishek Kumar wrote:
> hello list,
>
> Below is the sample code of a class.
>
>
> import
>
> Class ABC:
> def __init__(self,a,b,c):
> statement 1
> statement 2
> def func(x,y):
>
Here is a good book if you are already familiar with other languages.
http://diveintopython.org/object_oriented_framework/instantiating_classes.html
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
27 matches
Mail list logo