Re: [Tutor] Sigh first real python task

2012-09-13 Thread eryksun
On Wed, Sep 12, 2012 at 11:06 PM, Mike S mikeofm...@gmail.com wrote: 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,

Re: [Tutor] Sigh first real python task

2012-09-13 Thread Alan Gauld
On 13/09/12 04:06, Mike S wrote: ret = subprocess.call(smbclient //metricsmachine/reports/; put %s\ -U metrics%% % (fileName), shell=True) Isn't there a mismatched quote in there? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/

[Tutor] Sigh first real python task

2012-09-12 Thread Mike S
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

Re: [Tutor] Sigh first real python task

2012-09-12 Thread Steven D'Aprano
On 13/09/12 13:06, Mike S wrote: Now, I'm having to change the remote host and pass both the username and pass but cannot get it to work. Since we don't have access to your machine to try it, would you care to tell us what happens when you try, or shall we just guess? -- Steven

Re: [Tutor] Sigh first real python task

2012-09-12 Thread Mike S
Sorry, hit send a bit too fast there: here is the output: session setup failed: NT_STATUS_LOGON_FAILURE /bin/sh: put: command not found On Wed, Sep 12, 2012 at 8:14 PM, Steven D'Aprano st...@pearwood.infowrote: On 13/09/12 13:06, Mike S wrote: Now, I'm having to change the remote host