Skip to content

Instantly share code, notes, and snippets.

@fnneves
Created July 17, 2019 15:23
Show Gist options
  • Save fnneves/d1887f7c69c6d707d7c293950cb8a423 to your computer and use it in GitHub Desktop.
Save fnneves/d1887f7c69c6d707d7c293950cb8a423 to your computer and use it in GitHub Desktop.
def caps_from(event):
"""Forces the input FROM to be upper case and less than 4 characters"""
from_city1.set(from_city1.get().upper())
if len(from_city1.get()) > 3: from_city1.set(from_city1.get()[:3])
def caps_to(event):
"""Forces the input TO to be upper case and less than 4 characters"""
to_city1.set(to_city1.get().upper())
if len(to_city1.get()) > 3: to_city1.set(to_city1.get()[:3])
def close_app():
window.destroy()
def run_app():
print('run')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment