Re: How can I get the names of the files in a directory?

2005-01-15 Thread Egor Bolonev
On Sat, 15 Jan 2005 15:16:02 GMT, .removethis. <"(.removethis.)kartic.krishnamurthy"@gmail.com> wrote: Sara Fwd said the following on 1/15/2005 8:10 AM: Can you guys also help me find a module that looks in a directory and print out the names of the files in there? You can use glob: >>> import

lambda

2005-01-13 Thread Egor Bolonev
why functions created with lambda forms cannot contain statements? how to get unnamed function with statements? -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie q

2005-01-12 Thread Egor Bolonev
"Stephen Thorne" <[EMAIL PROTECTED]> ÑÐÐÐÑÐÐ/ÑÐÐÐÑÐÐÐ Ð ÑÐÐÐÑÑÑÐÐ: news:[EMAIL PROTECTED] On Thu, 13 Jan 2005 15:55:10 +1000, Egor Bolonev <[EMAIL PROTECTED]> wrote: how to get rid of 'for' operator in the code? import os, os.path def _test(): src = &

newbie q

2005-01-12 Thread Egor Bolonev
how to get rid of 'for' operator in the code? import os, os.path def _test(): src = 'C:\\Documents and Settings\\Егор\\My Documents\\My Music\\' for i in [x for x in os.listdir(src) if os.path.isfile(os.path.join(src, x)) and len(x.split('.')) > 1 and x.split('.')[-1].lower() == 'm3u']:

FutureWarning

2004-12-24 Thread Egor Bolonev
= C:\Documents and Settings\┼уюЁ\My Documents\Scripts\octopus_eye\1\oct_eye_db.py: 213: FutureWarning: hex()/oct() of negative int will return a signed string in P ython 2.4 and up if hex(binascii.crc32(data))[0] == '-': = hex() will return numbers like -0xa1?

Re: [PIL] is there a downloadable docs for PIL

2004-12-24 Thread Egor Bolonev
On Fri, 24 Dec 2004 10:00:39 +0100, Michel Claveau - abstraction meta-galactique non triviale en fuite perpetuelle. <[EMAIL PROTECTED]> wrote: Is that ? http://www.pythonware.com/products/pil/pil-handbook.pdf yes. thanks -- http://mail.python.org/mailman/listinfo/python-list

[PIL] is there a downloadable docs for PIL

2004-12-23 Thread Egor Bolonev
sometimes a have no internet access, but want to work :) -- http://mail.python.org/mailman/listinfo/python-list

Re: list IndexError

2004-12-22 Thread Egor Bolonev
On Thu, 23 Dec 2004 06:56:02 +1030, Ishwor <[EMAIL PROTECTED]> wrote: l ['a', 'b', 'c', 'd', 'e'] for x in l[:]: if x == 'd': l.remove('d'); l ['a', 'b', 'c', 'e'] This code is so clean and looks very healthy. Python will live a long way because its a cute language. imho the

[dictionary] how to get key by item

2004-12-13 Thread Egor Bolonev
saluton al ciuj i know how to get item by key == dict = {10 : 50, 2 : 12, 4 : 43} print dict[2] 12 but i wonder how to get key by item print dict[12] 2 == is there a more fast way than that one (my dictionary is really big) == dict = {10 : 50, 2 : 12,

Re: newsgroups

2004-12-12 Thread Egor Bolonev
On Sun, 12 Dec 2004 14:57:50 -0500, Francis Lavoie <[EMAIL PROTECTED]> wrote: Do we need a special account or something to use the newsgroup instead of the mailling list? why we use newsgroup instead of mailing list? -- http://mail.python.org/mailman/listinfo/python-list

Re: threading problem

2004-12-10 Thread Egor Bolonev
On Fri, 10 Dec 2004 00:12:16 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: I think if you change the call to look like: threading.Thread(target=run, args=(os.path.join('c:\\', path),)).start() oh i see now. thanks s='sdgdfgdfg' s == (s) True s == (s,) False -- http://mail.python.org/mailman/li

threading problem

2004-12-09 Thread Egor Bolonev
hi all my program terminates with error i dont know why it tells 'TypeError: run() takes exactly 1 argument (10 given)' =program import os, os.path, threading, sys def get_all_files(path): """return all files of folder path, scan with subfolders """ if len(path) >

Re: os.path.islink()

2004-12-08 Thread Egor Bolonev
On Wed, 08 Dec 2004 20:29:27 +1000, Egor Bolonev <[EMAIL PROTECTED]> wrote: gui folder link is a .lnk file i want to detect "'s" C:\Documents and Settings\Егор\My Documents>dir Том в устройстве C не имеет метки. Серийн

Re: os.path.islink()

2004-12-08 Thread Egor Bolonev
On Wed, 08 Dec 2004 10:23:13 +0100, Peter Maas <[EMAIL PROTECTED]> wrote: Egor Bolonev schrieb: far file manager said 'C:\Documents and Settings\Егор\My Documents\Scripts\Antiloop\' is link how to detect ntfs links? There are no ntfs links. What appears as a link on GUI level

os.path.islink()

2004-12-08 Thread Egor Bolonev
hi all i want my program to ignore ntfs links, but os.path.islink() isnt work as i expect print os.path.islink('''C:\Documents and Settings\Егор\My Documents\Scripts\Antiloop\) outputs False far file manager said 'C:\Documents and Settings\Егор\My Documents\Scripts\Antiloop\' is link h

[pywin32] windows shares, was os.listdir("\\\\delta\\public")

2004-12-06 Thread Egor Bolonev
Try grabbing the output of os.popen(r"net view \\delta") and parse it to get a list of the shares: c:\>net view \\monolith Shared resources at \\monolith Share name Type Used as Comment --- Printer Print M

os.listdir("\\\\delta\\public")

2004-12-04 Thread Egor Bolonev
import os print os.listdir("delta\\public") outputs ['Bases', 'Docs', 'Drivers', 'Soft', '\xc7\xe0\xec\xe5\xed\xe0 \xd1\xe5\xf2\xe5\xe2\xee\xec\xf3 \xce\xea\xf0\xf3\xe6\xe5\xed\xe8\xfe', 'Games'] and import os print os.listdir("delta") outputs Traceback (most recent call last): File "C:

Re: [PIL] import error

2004-12-01 Thread Egor Bolonev
On Thu, 02 Dec 2004 13:10:25 +1000, Egor Bolonev <[EMAIL PROTECTED]> wrote: ho error is bad case. there must be import Image import image gives Traceback (most recent call last): File "image1.py", line 7, in ? import image ImportError: No module named image i've insta

[PIL] import error

2004-12-01 Thread Egor Bolonev
import image gives Traceback (most recent call last): File "image1.py", line 7, in ? import image ImportError: No module named image i've installed python 2.3.4 and PIL for python 2.3 -- http://mail.python.org/mailman/listinfo/python-list