User input masks - Access Style

Tim Harig usernet at ilthio.net
Fri Dec 31 19:13:00 EST 2010


On 2010-12-31, flebber <flebber.crue at gmail.com> wrote:
> On Dec 28 2010, 12:21 am, Adam Tauno Williams <awill... at whitemice.org>
> wrote:
>> On Sun, 2010-12-26 at 20:37 -0800, flebber wrote:
>> > Is there anyay to use input masks in python? Similar to the function
>> > found in access where a users input is limited to a type, length and
>> > format.
>>
>> <http://faq.pygtk.org/index.py?file=faq14.022.htp&req=show>
>>
>> Typically this is handled by a callback on a keypress event.
>
> Regarding 137 of the re module, relating to the code above.

137? I am not sure what you are referencing?

> EDIT: I just needed to use raw_input rather than input to stop this
> input error.

Sorry, I used input() because that is what you had used in your example
and it worked for my system.  Normally, I would have used window.getstr()
from the curses module, or whatever the platform equivilant is, for
getting line buffered input.



More information about the Python-list mailing list