[wingide-users] Python shell ambiguous state

Wing IDE Support support at wingware.com
Wed Dec 19 10:54:38 EST 2012

On 12/19/12 3:33 AM, Christopher Fry wrote:
> fry sez: here's what I mean by really obvious:
> When I execute the current file in the shell, don't print
> [evaluate foo.py]
> print:
> "Evaluating foo.py ..."

We'll change the wording.

> and when its done, print the value of the last expression in the file
> followed by 
> "foo.py loaded."

When it's done loading (which in many cases happens almost immediately),
the prompt should appear.  Are you seeing the prompt before the file is
fully loaded?

There is no value printed because generic statements in Python don't
have values; it's actually a special case in Python that allows the
value of a simple expression to be printed in the interactive shell.  I
suspect you're thinking of lisp / scheme and similar languages here
where everything can evaluate to a value.  I dimly recall that there was
an explicit design decision when Python was developed not to do this.



More information about the wingide-users mailing list