What changed wwith Python in WDL change from draft 2 to version 1? I'm updating my WDL from draft 2 (whichs works fine) to version 1. I'm stuck with a Py snippet
task getReadGroup {

    input {
        String inputFile
    }

    command {echo input = ${inputFile}}

    # command &lt;&lt;&lt;
    # python &lt;&lt;CODE
    # print (&quot;${inputFile}&quot;.strip().split('/'))
    # CODE
    # &gt;&gt;&gt;

    output {
    Array[String] o = read_lines(stdout())
    }
}

This command gives the expected result:
input = /mnt/lustre/working/genomeinfo/data/20191015_LongRead/20191015_LongRead_1/data/LXBAB201271/LXBAB201271/LXBAB201271/20190417_0612_1-A7-D7_PAD44174_42dcde1a/fast5/test/

But the commented out python code:
print (&quot;${inputFile}&quot;.strip().split('/'))

Gives an empty list - &quot;${inputFile}&quot; is empty in the code command for some reason!
Any ideas? I've tried using a File instead of String to make it just like the example in the docs (below) other than that I see no diff:
task heredoc {
  input {
    File in
  }

  command&lt;&lt;&lt;
  python &lt;&lt;CODE
    with open(&quot;${in}&quot;) as fp:
      for line in fp:
        if not line.startswith('#'):
          print(line.strip())
  CODE
  &gt;&gt;&gt;
}
Complements of Phil Shapiro;
Use ~{} instead of ${}.
So this example from the current docs is wrong:
task heredoc {
  input {
    File in
  }

  command&lt;&lt;&lt;
  python &lt;&lt;CODE
    with open(&quot;${in}&quot;) as fp:
      for line in fp:
        if not line.startswith('#'):
          print(line.strip())
  CODE
  &gt;&gt;&gt;
}

It should be :
task heredoc {
  input {
    File in
  }

  command&lt;&lt;&lt;
  python &lt;&lt;CODE
    with open(&quot;~{in}&quot;) as fp:
      for line in fp:
        if not line.startswith('#'):
          print(line.strip())
  CODE
  &gt;&gt;&gt;
}