Re: learning Python

2024-10-29 Thread Mats Wichmann via Python-list
On 10/27/24 16:51, o1bigtenor via Python-list wrote: Greetings There are mountains of books out there. Any suggestions for documents for a just learning how to program and starting with Python (3)? Preference to a tool where I would be learning by doing - - - that works well for me. TIA Fra

Re: learning Python

2024-10-29 Thread rbowman via Python-list
On Tue, 29 Oct 2024 16:05:53 -0600, Mats Wichmann wrote: > Frankly, the mountain of resources is so vast that none of us can have > experience of more than a small fraction, and effective learning is a > factor not only of the quality of the teacher/book/training course, but > how it meshes with y

Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read

2024-10-29 Thread Jon Ribbens via Python-list
On 2024-10-29, Loris Bennett wrote: > Hi, > > With Python 3.9.18, if I do > > try: > with open(args.config_file, 'r') as config_file: > config = configparser.ConfigParser() > config.read(config_file) > print(config.sections()) > > i.e try to read the

Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read

2024-10-29 Thread MRAB via Python-list
On 2024-10-29 13:56, Loris Bennett via Python-list wrote: Hi, With Python 3.9.18, if I do try: with open(args.config_file, 'r') as config_file: config = configparser.ConfigParser() config.read(config_file) print(config.sections()) i.e try to

Using 'with open(...) as ...' together with configparser.ConfigParser.read

2024-10-29 Thread Loris Bennett via Python-list
Hi, With Python 3.9.18, if I do try: with open(args.config_file, 'r') as config_file: config = configparser.ConfigParser() config.read(config_file) print(config.sections()) i.e try to read the configuration with the variable defined via 'with ... a