Here is a completely different way to do this that a colleague shared with me. It is so unsupported that I didn't want to share it, but it is quite interesting so here goes:
---------------------
import qt
i, status = qt.QInputDialog().getInt(None, "get int", "number")
print i
----------------------
I say this is "so unsupported" because it is using the underlying graphics toolkit (Qt) directly. We don't document this nor support this because it is our internal tool that can change from release to release. So I don't recommend using it in any kind of 'production' capacity!
Here is a completely different way to do this that a colleague shared with me. It is so unsupported that I didn't want to share it, but it is quite interesting so here goes:
---------------------
import qt
i, status = qt.QInputDialog().getInt(None, "get int", "number")
print i
----------------------
I say this is "so unsupported" because it is using the underlying graphics toolkit (Qt) directly. We don't document this nor support this because it is our internal tool that can change from release to release. So I don't recommend using it in any kind of 'production' capacity!