On Jun 20, 2007, at 2:03 PM, Richard Querin wrote:
> I'm interested in writing a quick script that would run a diff-type
> command that would compare a local directory to a remote one to
> identify the changes in the files within that directory.
>
> I was initially thinking that I would maybe use
On 20/06/07, Norman Khine <[EMAIL PROTECTED]> wrote:
> My question is how to get all the words in the string to start with
> capital letter?
Hmm, well the title() function is a new one to me :-)
More generally, if we have raw = 'one two three', then I would have
done it using raw.split(). i.e.
Iyer wrote:
> if I have a list of lists, that goes like this:
> [[0,['a','b']],[0,['c','d']],[3,['f','g']], [0,['a','b']],[0,['c','d']],
> [3,['f1','f2']], [2,['zz','dd']]]
>
> what could be the best way to reorder this such that the sublists with
> the same first element go into their own sub-
if I have a list of lists, that goes like this:
[[0,['a','b']],[0,['c','d']],[3,['f','g']], [0,['a','b']],[0,['c','d']],
[3,['f1','f2']], [2,['zz','dd']]]
what could be the best way to reorder this such that the sublists with the same
first element go into their own sub-list ?
like,
sublist0
It depends what you want to compare. Here we use Git http://git.or.cz/
it is written in python and basically you can have two repositories on
the different machines, and track the changes. Obviously if you make a
change on a file, this change has to be commited before it can be
accounted for. perha
Richard Querin wrote:
> I'm interested in writing a quick script that would run a diff-type
> command that would compare a local directory to a remote one to
> identify the changes in the files within that directory.
>
> I was initially thinking that I would maybe use the linux diff command
> in c
"Richard Querin" <[EMAIL PROTECTED]> wrote
> I was initially thinking that I would maybe use the linux diff
> command
> in conjunction with the wget command (or something similar) to
> create
> a local copy but that involves downloading files. Is there any way
> in
> python to do a similar thin
What are we comparing? Size of files, number of files in a directory, md5sum
of the files, directory size, etc? What about rsync? You can use rsync to
compare directories between a source and destiantion system and just report
differences. For example, comparing /etc directores between two RHEL
Mike Hoy wrote:
> I have a phonebook program that creates .pb files for each entry that is
> created. One of the features of the program will be to allow the user to
> delete all of the .pb files in the directory. For simplicity I was just
> going to have it delete all the .pb files in the same
On 6/20/07, Mike Hoy <[EMAIL PROTECTED]> wrote:
> I have a phonebook program that creates .pb files for each entry that is
> created. One of the features of the program will be to allow the user to
> delete all of the .pb files in the directory. For simplicity I was just
> going to have it delete a
I'm interested in writing a quick script that would run a diff-type
command that would compare a local directory to a remote one to
identify the changes in the files within that directory.
I was initially thinking that I would maybe use the linux diff command
in conjunction with the wget command (
I have a phonebook program that creates .pb files for each entry that is
created. One of the features of the program will be to allow the user to
delete all of the .pb files in the directory. For simplicity I was just
going to have it delete all the .pb files in the same directory I was
working
pearl jb wrote:
> I wanted to know "How to access the list elements which is in Dictionary"
>
> dict = {'John':['ph=919873673','res=91928827737'] , 'William' :
> ['ph=91983763','res=91837474848'] }
>
>
> I want the output to be
>
> 1. John res=91928827737
> 2. William ph=91983763
You can use
thanks, it is as easy as that ;)
Adam A. Zajac wrote:
> On Wed, 20 Jun 2007 12:32:53 +0200
>
> Norman Khine <[EMAIL PROTECTED]> wrote:
>
>> My question is how to get all the words in the string to start with
>> capital letter?
> title() should do it
>
a = "hello world"
a.title()
On Wed, 20 Jun 2007 12:32:53 +0200
Norman Khine <[EMAIL PROTECTED]> wrote:
> My question is how to get all the words in the string to start with
> capital letter?
title() should do it
>>>a = "hello world"
>>>a.title()
>>>'Hello World'
___
Tutor maillis
I wanted to know "How to access the list elements which is in Dictionary"
dict = {'John':['ph=919873673','res=91928827737'] , 'William' :
['ph=91983763','res=91837474848'] }
I want the output to be
1. John res=91928827737
2. William ph=91983763
-
On
Hello,
I would like to capitalize each word from an input form.
The problem is that the input form can be added as:
"HELLO world"
"hello world"
"HELLO WORLD"
etc..
If I do this:
>>> string = "HELLO world"
>>> print string.capitalize()
Hello world
>>>
only the first word gets capitalized.
My
"Mat Newport" <[EMAIL PROTECTED]> wrote
> Basically the program would scan a specified folder,
> build a list of specific files (.txt in the example below),
Look at the glob module and its glob function.
Or if you want to include subdirectories lkook at the
os.walk function. There are example
18 matches
Mail list logo