There were a couple of questions we've not yet resolved about the prompt manager code (see discussion at <a href="https://github.com/ipython/ipython/pull/507">https://github.com/ipython/ipython/pull/507</a> ).<br><br>First, for generating prompts over ZMQ, we intended to use the user_expressions field of an execution request, but this can't easily access things that aren't in the user namespace, e.g. os.getcwd(). We can work round that using the __import__("os").getcwd() form, but it feels somewhat less than ideal. This can however be resolved at a later stage, because the frontends currently generate prompts by themselves - my primary aim with this is to simplify the rather convoluted code generating prompts for the plain terminal.<br>

<br>Second, we've ended up with three versions of EvalFormatter:<br>A - Would evaluate {n/4}, but would treat {2} as a reference to a positional argument.<br>B - Would evaluate {2} as an integer literal (so it's equivalent to just putting 2 in the string).<br>

C - Unlike A & B, will rejoin format strings to objects, so {a[:2]} will slice, but you lose the ability to do format strings {date:%Y-%m-%d}<br><br>We were leaning towards keeping format strings separate for prompts (you can still slice using {a[slice(None,2)]} ), but do we want to keep C around for any other purpose in the code?<br>

<br>I'd favour using A - it's flexible enough to use positional arguments if we do want to for any reason, and I don't see a use case for putting integer literals inside format {}s.<br><br>Thanks,<br>Thomas<br>