Python

Moderators: None (Apply to moderate this forum)
Number of threads: 473
Number of posts: 1172

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
pysmb module Posted by pplshlp on 21 Nov 2012 at 11:26 PM
Hi,
I am trying to print a file over smb in python. I have used the module pysmb.
This is the code:
import smb,nmb
from smb import SMBConnection
server_name = ‘server1’ //remote server name
server_ip = '10.210.x.x ' //remote server ip
server_port = '445'
client_name =‘server2’ //client from where I am running my program
user = 'user' //username of my client
password = 'pwd' //password of my client
conn = SMBConnection.SMBConnection(user,password,client_name,server_name,use_ntlm_v2=True)
conn.connect(server_ip,445) //fails when server is windows & passes when server is linux

What is the command to send a file to remote server?
Please help.
Thanks in advance



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.