Re: TKinter Newbie question

2019-01-18 Thread TUA
Thanks for your fresh pair of eyes! -- https://mail.python.org/mailman/listinfo/python-list

TKinter Newbie question

2019-01-17 Thread TUA
Why does the button frame in the code below not show? I intend to have it displayed in between the notebook at the top and the fake statusbar at the bottom. Thanks for any help! from tkinter import ttk import tkinter as tk class MainForm(): def __init__(self, master):

Re: Peewee ORM questions

2018-11-13 Thread TUA
Brainfart has left the building print(model_to_dict(row, exclude = (row.created, row.updated))) should have been print(model_to_dict(row, exclude = (model.created, model.updated))) -- https://mail.python.org/mailman/listinfo/python-list

Peewee ORM questions

2018-11-13 Thread TUA
, row.updated))) still returns the created and updated columns Broken? Or - way more likely - something I am doing wrong? Thanks for all help! Tua -- https://mail.python.org/mailman/listinfo/python-list

Re: RE newbie question

2018-04-18 Thread TUA
Thanks much! -- https://mail.python.org/mailman/listinfo/python-list

RE newbie question

2018-04-18 Thread TUA
import re compval = 'A123456_8' regex = '[a-zA-Z]\w{0,7}' if re.match(regex, compval): print('Yes') else: print('No') My intention is to implement a max. length of 8 for an input string. The above works well in all other respects, but does allow for strings that are too long. What is

Re: ARGPARSE Newbie question

2018-04-17 Thread TUA
Thanks for the pointers! -- https://mail.python.org/mailman/listinfo/python-list

ARGPARSE Newbie question

2018-04-17 Thread TUA
I'd like to create a script that handles a number of verbs with mandatory and /or optional parameters like listed in the table below. Can ARGPARSE do this and how? Thanks for all help! Script VerbMandatory parameters Optional parameters

Newbie ARGPARSE question

2018-04-17 Thread TUA
I just discovered ARGPARSE 5 minutes ago and cannot figure this one out: What does the Parser.add_argument() call have to look like when I need an option 'add' that requires the mandatory parameters 'type' (string), 'size' (int), 'sid' (string) and must also handle the optional parameters

Can this be easily done in Python?

2016-09-27 Thread TUA
Is the following possible in Python? Given how the line below works TransactionTerms = 'TransactionTerms' have something like TransactionTerms = that sets the variable TransactionTerms to its own name as string representation without having to specify it explicitly as in the line above

JSON result parsing

2016-07-29 Thread TUA
Calls to my REST api may either return a dict (for single results) or a list of dicts (for multiple results). I receive these results using the requests library. I want to retrieve the value for a key 'ID' but only if I have a single result and, obviously, if ID is present. How can I do this

Re: Call function via literal name

2016-07-29 Thread TUA
On Friday, 29 July 2016 13:35:30 UTC-7, TUA wrote: > Rather than do this: > > if test['method'] == 'GET': > res = requests.get(test['endpoint'],auth=test['auth'], > verify=False) > elif test['method'] == 'POST': >

Call function via literal name

2016-07-29 Thread TUA
Rather than do this: if test['method'] == 'GET': res = requests.get(test['endpoint'],auth=test['auth'], verify=False) elif test['method'] == 'POST': res = requests.post(test['endpoint'], auth=test['auth'], verify=False,