python and samba

2009-05-17 Thread Fatih Tumen
Hi,
I am working on a directory synchronisation tool for Linux.

$ gcc --version
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
$ python -V
Python 2.5.2
$ smbclient --version
Version 3.0.28a

I first designed it to work on the local filesystem. I am using filecmp.py
(distributed with Python) for comparing the files. Of course I had to
modify it in a way that it will return object rather than stdout. I have
this compare method in my main class which is os.walk()-ing through
the directories and labeling the files on the GUI according to this returned

object by filecmp.py.
Now I want add support for syncing between (unix and NT) network
shares without having to change my abstraction much. At first googling
I hit a samba discussion appeared on this list ages ago. It did not help me
much though. I also found this pysmbc, libsmbclient bindings, written by
Tim Waug but it requires libsmbclient-3.2.x. which requires
libc6 >= 2.8~20080505 which comes with Intreprid but I have reasons
not to upgrade my Hardy.
Another thing I found was pysamba, by Juan M. Casillas,  but it needs
a bit of hack; samba needs to be configured with python.
I am looking for something that won't bother the end user nor me. I want
to keep it as simple as possible. I will distribute the libraries myself if
I have
to and if licence is not an issue.

If I have to summarise, I need to get m_time and size (and preferably stick
with
os.walk and filecmp.py if possible) and copy files back and forth using
samba (unix <-> NT).  I don't wanna reinvent the wheel or overengineer
anything but if I can do this without any additional libraries, great!

I would appreciate any advice on this.
Thanks..
-- 
   Fatih
-- 
http://mail.python.org/mailman/listinfo/python-list


filecmp.py licensing

2009-05-17 Thread Fatih Tumen
Hi,
As I mentioned on the other thread about samba, I am working on a
synchronisation project and using filecmp.py for comparing files. I
modified it according to my needs and planning to distribute it with my
package. At first glance it seems that filecmp.py is a part of Python
package. Though I don't see a licence header on the file I assume that
it is licensed under PSFL. I will distribute my project with GNU GPL or
Creative Commons BY-NC-SA. My question is if I renamed it and
put the Python attribution on the header, would it be alright?

What is the proper way of doing this?
-- 
   Fatih
-- 
http://mail.python.org/mailman/listinfo/python-list