Match.groupdict: Meaning of default argument?

2022-04-29 Thread Loris Bennett
Hi, If I do import re pattern = re.compile(r'(?P\d*)(-?)(?P\d\d):(?P\d\d):(?P\d\d)') s = '104-02:47:06' match = pattern.search(s) match_dict = match.groupdict('0') I get match_dict {'days': '104', 'hours': '02', 'minutes': '47', 'seconds': '06'} However, if the string has no in

Instatiating module / Reusing module of command-line tool

2022-04-29 Thread Loris Bennett
Hi, I have a command-line script in Python to get the correct salutation for a user name in either English or German from a 'salutation server': $ get_salutation alice Dear Professor Müller $ get_salutation alice -l de Sehr geehrte Frau Professorin Müller The hostname, port, user and pas

Testing an app protected by Okta authorization code with PKCE flow

2022-04-29 Thread George Fischhof
Hi Folks, has anyone of you a working solution for testing an app protected by Okta authorization code with PKCE flow? Meaning to get a bearer token? I saw / read several articles about it on the net, and several hacks (that is not problem now ;) ), but it seems that neither of them works with Ok