[Python-ideas] String interpolation: environment variables, command substitution
Mike Miller
python-ideas at mgmiller.net
Wed Aug 26 21:16:38 CEST 2015
Hi,
The use case is for shell-script replacements, which can be but are often not
typically cross-platform. Let's try different examples:
>>> x'version: {$(/usr/bin/xdpyinfo -version)}' # capture
'version: xdpyinfo 1.3.1'
>>> x'display: {$DISPLAY}' # env
'display: :0.0'
-Mike
On 08/26/2015 11:58 AM, Paul Moore wrote:
> Note that cross platform issues are going to be a major issue
More information about the Python-ideas
mailing list