<[EMAIL PROTECTED]> wrote by email:

Please keep it on the list...

| Hi,
| Hi and Thanks for all your help,everything work.But I have one
| question,in string I am "new",and I don't know how to exactly split:
|
| example:
|
| '-rw-r--r--   1 [EMAIL PROTECTED]
| v-programs.byethost31.com     2376 Aug 28 08:48 sun.gif'
|
|
| in new entry must write just filename:  sun.gif not:
|
| '-rw-r--r--   1 [EMAIL PROTECTED]
| v-programs.byethost31.com     2376 Aug 28 08:48 sun.gif'
|
| .... so can you help to I split:
|
| '-rw-r--r--   1 [EMAIL PROTECTED]
| v-programs.byethost31.com     2376 Aug 28 08:48 sun.gif'   from that
| import just: sun.gif
|
|                                                               THANK
| YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

IDLE 1.1.3      ==== No Subprocess ====
>>> NameOfString = '-rw-r--r--   1 [EMAIL PROTECTED]
v-programs.byethost31.com     2376 Aug 28 08:48 sun.gif'
>>> NameOfList = NameOfString.split()
>>> print NameOfList[:]
['-rw-r--r--', '1', '[EMAIL PROTECTED]',
'v-programs.byethost31.com', '2376', 'Aug', '28', '08:48', 'sun.gif']
>>> print NameOfList[-1]
sun.gif
>>>

That should see you on yer way... - Have you read the tutorial?

You should also learn to use the interactive interpreter - it is your friend...

- Hendrik



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to