Hi Jeff, While I can't speak to Windows specific issues, I think this may actually be simpler -- try slapping an 'r' before your Windows file path string, i.e. r'c:\blah.txt'. I think what's happening is the "\b" is turning into a backspace or similar, since backslash is used for string escapes. (see also \n, \t etc).
Using raw strings, r"my string here", should eliminate most of that escaping related behavior. Best, Jeff On Wed, Oct 13, 2010 at 2:48 PM, Jeff Honey <[email protected]> wrote: > I am trying to make a go at cross-platform operation here and starting with > some basic "put()" commands, e.g. > > <snip> > from fabric.api import * > > env.roledefs = { > servers': ['foo1.com', 'foo2.com', 'foo3.com'] > } > > @roles('servers') > def putfile(): > put('c:\blah.txt', '/tmp/') > run('touch /tmp/blah.txt') > </snip> > > > ...which bombs out when I try to run it from a Windows cmd prompt. It > evaluates 'c:\blah.txt' to clah.txt. I have tried using double-quotes or > escaping the non-alpha characters. Can someone shine some light on how I can > construct the local_file portion to work or will this work at all? > > Thanks! > > -- > ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ > ¤ kyoboku kazeoshi ¤ > ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ > _______________________________________________ > Fab-user mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/fab-user > -- Jeff Forcier Unix sysadmin; Python/Ruby developer http://bitprophet.org _______________________________________________ Fab-user mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/fab-user
