So, trying to modify a python script that when invoked copies a local file to a remote host.
Previously this was done with only needing to pass a username. <code> try: ret = subprocess.call("smbclient //metricsmachine/reports/; put %s\" -U metrics%%" % (fileName), shell=True) if ret < 0: print >>sys.stderr, "Child was terminated by signal", -ret else: os.unlink(path+fileName) except OSError, e: print >>sys.stderr, "Execution failed:", e <code> Now, I'm having to change the remote host and pass both the username and pass but cannot get it to work. Changing it to try: ret = subprocess.call("smbclient //reportingmachine/Dashboard/; put %s\" -U Username%Password" % (fileName), shell=True) if ret < 0: print >>sys.stderr, "Child was terminated by signal", -ret else: os.unlink(path+fileName) except OSError, e: print >>sys.stderr, "Execution failed:", e Any help would be appreciated. -- Mike of Many Stories, Ideas, and Ramblings Game Chef 2009, 2010 NaNoWriMo 2008, 2009 http://mikeofmanystories.blogspot.com/ - writings http://mikeofmany.wordpress.com/ - personal bloggery
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor