[Tutor] clarification on os.path.walk

2007-06-11 Thread Chandrashekar
Hi, I have a program like this. import os,os.path import re def print_files(arg,dir,files): '''print 'arg', arg print 'dir', dir print 'files',files''' for file in files: path = os.path.join(dir,file) path = os.path.normcase(path) if re.search(r".*\.txt",p

[Tutor] SSH using python

2007-06-04 Thread Chandrashekar
Hi , Can anyone tell me how to do ssh to a machine using python and execute programs on the remote machine? Thanks in advance. Regards, Chandru - Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! G

[Tutor] string replacement

2007-05-21 Thread Chandrashekar
Hi, I am trying to do something like this in python. Can you please help? handle= open('test.txt','a') handle.write(''' Testsomething$i something$i-test ''' ) when i write into the file, i would like to have the output like this. Testsomething1 something1-test Testsomething2 something2-test

[Tutor] Re : Project Work

2006-02-01 Thread Chandrashekar Jayaraman
I m doing a project using Python and Bluetooth . I tried running the sample programs given with the pybluez-0.5 distro with python 2.4 . The socket program s just dont seem to run . However the inquiry.py program run s perfectly. ne solutions ? ___ Tuto