How to stop a command or prompt in Python?

60221
10
03-31-2011 09:25 AM
DaveCouture
New Contributor III
I'm using ArcGIS 10 and I'm practicing a few scripts with Python.  What command should I use, if I want to exit a commnad, or a function?  I'm always stuck with 3 dots (secondary prompt).  How do I stop it?

I've tried:

sys.exit()
sys.exit(0)
quit()
Tags (2)
0 Kudos
10 Replies
RhettZufelt
MVP Frequent Contributor
It almost sounds to me like you have a corrupt python install.

In python.exe, IDE, or the python window in ArcMap, I can not repeat.  The only time I can get the ... is if I do a multiline entry ( IE, if this == "that":) or nested code.

an import statement should never be "seen" as a multiline entry or nested code.

Curious what happens if you type this:

>>>print "testing"


Do you get:

>>>print "testing"
testing
>>>


or do you get:

>>>print "testing"
...

If you get the latter, I would try a remove/re-install of your python.

R_
0 Kudos