converting from shell script to python
Robin Munn
rmunn at pobox.com
Wed Apr 2 10:35:30 EST 2003
Mathias Waack <mathias-usenet at valpo.de> wrote:
> "Greg Ewing (using news.cis.dfn.de)" <ckea25d02 at sneakemail.com>
> wrote:
>> Alternatively, you can substitute things from a
>> dictionary instead of a tuple:
>>
>> vars = {'ROOTDIR': '/usr/lib'}
>> CLASSPATH = \
>> "%{ROOTDIR}s/a/a.jar:%{ROOTDIR}s/b/b.jar:%{ROOTDIR}s/c/c.jar
>> " % vars
>
> Didn't know that before. Its nice - thanks for the hint.
All the gory details on using the % operator can be found here:
http://www.python.org/doc/current/lib/typesseq-strings.html
--
Robin Munn <rmunn at pobox.com>
http://www.rmunn.com/
PGP key ID: 0x6AFB6838 50FF 2478 CFFB 081A 8338 54F7 845D ACFD 6AFB 6838
More information about the Python-list
mailing list