[EMAIL PROTECTED] wrote:
> my friend uses vim
> and i use xemacs
> so our shared python code is a mix of tabs and spaces and it is hard for
> him to edit it in vim
>
> any idea on how to make it clean
> convert it all to 4 spaces?
>
> Thanks
>
:set ts=4
:retab!
:h retab
___
Alan Gauld wrote:
> "Robert Hicks" <[EMAIL PROTECTED]> wrote
>> This is the loop code:
>>
>> for line in f2:
>> for id in idList:
>> if id in line:
>> print "%s: %s" % (id, f2.next())
>>
Kent Johnson wrote:
> Robert Hicks wrote:
>> Kent Johnson wrote:
>>> Robert Hicks wrote:
>>>> idList only has about 129 id numbers in it.
>>> That is quite a few times to be searching each line of the file. Try
>>> using a regular expression search
Kent Johnson wrote:
> Robert Hicks wrote:
>> idList only has about 129 id numbers in it.
>
> That is quite a few times to be searching each line of the file. Try
> using a regular expression search instead, like this:
>
> import re
> regex = re.compile('|
Kent Johnson wrote:
> Robert Hicks wrote:
>> This is the loop code:
>>
>> for line in f2:
>> for id in idList:
>> if id in line:
>> print "%s: %s" % (id, f2.next())
>> found = "%s: %s" % (id, f
Kent Johnson wrote:
> Robert Hicks wrote:
>> I have a script at work where I have a list of id numbers and I am doing a:
>>
>> for line in ehFile:
>
> That is fine
>
>> for id in line:
>
> I don't know what this is for - line is a string, i
I have a script at work where I have a list of id numbers and I am doing a:
for line in ehFile:
for id in line:
I am then going through that file and finding the line the id is on and
printing the next line out. It takes a few seconds to see the output to
the screen (the Perl versi
Vikram Shenoy wrote:
> Hi All,
>
> The link for the python 2.5 quick reference
> (http://rgruet.free.fr/PQR25/PQR2.5.html) doesn't seem to be working.
> Can anybody point me to any mirror link or share the document if you
> have downloaded it already ? A4 PDF version will be great.
>
> Regards