Unfortunately none of those solutions work.

C:\\Users\\John\\Some Folder\\training results in:
ValueError: 'C:\Users\John\Some\ Folder\training\this' is not a valid local
path or glob.

C:/Users/John/Some Folder/training results in:
ValueError: 'C:/Users/John/Some\ Folder/training\this' is not a valid local
path or glob.

os.path.normcase(path) results in:
ValueError: 'c:\users\john\some\ folder raining\this' is not a valid local
path or glob.

The escaping of the \t I can do fine. It's not handling the space in the
'Some Folder' properly. Any ideas?


On 26 July 2013 18:22, Marshel Helsper <[email protected]> wrote:

> You have to escape your backslashes ( \ ). You can either do: C:
> \\Users\\John\\Some Folder\\training, C:/Users/John/Some Folder/training
> (yes, Windows supports this), or os.path.normcase(path).
>
> I think that should cover it.
>
> Thanks,
>
> *Marshel Helsper*
> QA/Release Engineer
> NetProspex Inc.
> [email protected]
>
>
>
> On Jul 26, 2013, at 12:56 PM, John Harris <[email protected]> wrote:
>
> I'm trying to switch to a local folder then copy that to a remote machine. 
> I'm experiencing the following issue:
>
>
> def cp_file():
>     with lcd("C:\Users\John\Some Folder\training"):
>         put('this', '/usr/something/somethingelse', use_sudo=True)
> ValueError: 'C:\Users\John\Some\ Folder raining\this' is not a valid local 
> path or glob.
> ### then tried > ####
> def cp_file():
>     with lcd("C:\Users\John\Some Folder\\training"):
>         put('this', '/usr/something/somethingelse', use_sudo=True)
> ValueError: 'C:\Users\John\Some\ Folder\training\this' is not a valid local 
> path or glob.
>
>
> Any help would be much appreciated,
>
>
> John
>
> _______________________________________________
> Fab-user mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/fab-user
>
>
>
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to