Debugging technique

2020-10-02 Thread Frank Millman
Hi all When debugging, I sometimes add a 'breakpoint()' to my code to examine various objects. However, I often want to know how I got there, so I replace the 'breakpoint()' with a '1/0', to force a traceback at that point. Then I can rerun the previous step using the extra info from the tra

Re: How to handle a dictionary value that is a list

2020-10-02 Thread Python
On Fri, Oct 02, 2020 at 09:25:58PM +0100, Shaozhong SHI wrote: > Hi, All, > > I was trying to handle the value of "personRoles" in a part of json > dictionary. > > Can anyone tell me various ways to handle this? I'm not sure if I understand what you're asking, but if I do, then... you handle it

Re: Error 0xc000007b on opening python

2020-10-02 Thread Eryk Sun
On 10/2/20, Nipur Gupta wrote: > I've downloaded python 3.6.0 64 bits but whenever I try to open idle, it Python 3.8 supports Windows 8.1, so, unless otherwise required, you should install the latest release of 64-bit Python 3.8, which is currently 3.8.6: https://www.python.org/ftp/python/3.8.6/

Re: List of All Error Menssages

2020-10-02 Thread Luis Gustavo Araujo
Hi Kyle, Thanks! Att, Livre de vĂ­rus. www.avast.com . <#DAB4FAD8-2DD7-40BB-A1

Re: List of All Error Menssages

2020-10-02 Thread Kyle Stanley
Hi Luis, There is not a maintained list of every possible combination of exception type and message because they're continuously being added within the Python standard library, and exception messages are considered an implementation detail that are subject to change. While there are many that have

How to handle a dictionary value that is a list

2020-10-02 Thread Shaozhong SHI
Hi, All, I was trying to handle the value of "personRoles" in a part of json dictionary. Can anyone tell me various ways to handle this? Regards, Shao "regulatedActivities": [ { "name": "Accommodation for persons who require nursing or personal care", "code": "RA2", "con

Re: Problem

2020-10-02 Thread Mirko via Python-list
Am 02.10.2020 um 11:58 schrieb Terry Reedy: > On 10/1/2020 4:09 PM, Mirko via Python-list wrote: > >> Renaming "IDLE" to "Python IDE" (or similar) might also. > "IDLE" intentionally echoes 'Idle', as in Eric Idle of Monty > Python. It stands for "Integrated Development and Learning > Environment"

Re: Problem

2020-10-02 Thread Hexamorph
Am 02.10.2020 um 11:58 schrieb Terry Reedy: > On 10/1/2020 4:09 PM, Mirko via Python-list wrote: > >> Renaming "IDLE" to "Python IDE" (or similar) might also. > "IDLE" intentionally echoes 'Idle', as in Eric Idle of Monty > Python. It stands for "Integrated Development and Learning > Environment".

Re: List of All Error Menssages

2020-10-02 Thread Dieter Maurer
Luis Gustavo Araujo wrote at 2020-10-1 16:06 -0300: >Is it possible to get the list of all error messages that display in >Python? I want the full message -> type error: additional message. > >Examples: >NameError: name 'x' is not defined >IndentationError: unindent does not match any outer indenta

Re: Error 0xc000007b on opening python

2020-10-02 Thread Mats Wichmann
On 10/2/20 4:15 AM, Nipur Gupta wrote: > I've downloaded python 3.6.0 64 bits but whenever I try to open idle, it > doesn't open and displays error 0xc07b. I've tried everything from > reinstalling to updating windows and visual c++ but it's still the same. I > downloaded python earlier also it

Re: Error 0xc000007b on opening python

2020-10-02 Thread J.O. Aho
On 02/10/2020 12:15, Nipur Gupta wrote: I've downloaded python 3.6.0 64 bits but whenever I try to open idle, it doesn't open and displays error 0xc07b. I've tried everything from reinstalling to updating windows and visual c++ but it's still the same. There seems to be quite many things th

Error 0xc000007b on opening python

2020-10-02 Thread Nipur Gupta
I've downloaded python 3.6.0 64 bits but whenever I try to open idle, it doesn't open and displays error 0xc07b. I've tried everything from reinstalling to updating windows and visual c++ but it's still the same. I downloaded python earlier also it worked that time but opening after few days it

Re: Problem

2020-10-02 Thread Terry Reedy
On 10/1/2020 4:09 PM, Mirko via Python-list wrote: Renaming "IDLE" to "Python IDE" (or similar) might also. "IDLE" intentionally echoes 'Idle', as in Eric Idle of Monty Python. It stands for "Integrated Development and Learning Environment". It is *a* Python IDE aimed especially at beginners

ValueError: arrays must all be same length

2020-10-02 Thread Shaozhong SHI
Hello, I got a json response from an API and tried to use pandas to put data into a dataframe. However, I kept getting this ValueError: arrays must all be same length. Can anyone help? The following is the json text. Regards, Shao { "locationId": "1-1004508435", "providerId": "1-101641521

Re: Python 3.8.5 Not Launching

2020-10-02 Thread Eryk Sun
On 10/2/20, Gertjan Klein wrote: > Eryk Sun wrote: > >> If .py files are associated with py.exe or python.exe, then running a >> .py script either inherits or allocates a console and attaches to it. > > Is it possible to determine, from within Python, whether Python > allocated or inherited the co

Re: Python 3.8.5 Not Launching

2020-10-02 Thread Chris Angelico
On Fri, Oct 2, 2020 at 7:51 PM Gertjan Klein wrote: > > Eryk Sun wrote: > > > If .py files are associated with py.exe or python.exe, then running a > > .py script either inherits or allocates a console and attaches to it. > > Is it possible to determine, from within Python, whether Python > alloca

Re: Python 3.8.5 Not Launching

2020-10-02 Thread Gertjan Klein
Eryk Sun wrote: If .py files are associated with py.exe or python.exe, then running a .py script either inherits or allocates a console and attaches to it. Is it possible to determine, from within Python, whether Python allocated or inherited the console? This could be useful to know in a (g