fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Spaces/characters not escaping properly


From: Eric Brunson
Subject: Re: [Fab-user] Spaces/characters not escaping properly
Date: Fri, 26 Jul 2013 13:49:54 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6


You can also disable special character interpretation by making it a raw string with an 'r' prefix:

>>> print "\asdf\asdf\asdf\asdf"
sdfsdfsdfsdf
>>> print r"\asdf\asdf\asdf\asdf"
\asdf\asdf\asdf\asdf


On 07/26/2013 11:31 AM, Andres Riancho wrote:
It's a python issue, in any string where you use \t python will
replace that with a tab. Use \\t

On Fri, Jul 26, 2013 at 1:56 PM, John Harris <address@hidden> 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
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user





reply via email to

[Prev in Thread] Current Thread [Next in Thread]