Hi Rudiger, Since Python doesn't (IIRC) let you pop arbitrary expressions into string interpolation, you'll need to break that particular value out into its own variable, something like this:
env.site_list_string = ",".join(env.site_list) run('mkdir -p %(www_path)s/{%(site_list_string)s}/{public,private,log,cgi-bin,backup}' %env,pty=True) In other words, just get your Python list into a format that can be brace-expanded at the Bash level, similarly to what you're already doing with the hardcoded directory names at the end. Pretty sure that'll work. Best, Jeff On Fri, Oct 29, 2010 at 2:56 AM, Rudiger Wolf <rudiger.w...@throughputfocus.com> wrote: > Any tips on how I can get > > run('mkdir -p > %(www_path)s/%(site_list)s/{public,private,log,cgi-bin,backup}' %env, > pty=True) > > working where site_list = ['siteA','SiteB']? > > Thanks > Rudiger > > _______________________________________________ > Fab-user mailing list > Fab-user@nongnu.org > http://lists.nongnu.org/mailman/listinfo/fab-user > -- Jeff Forcier Unix sysadmin; Python/Ruby developer http://bitprophet.org _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user