Re: Python 3.11.0 installation and Tkinter does not work

2022-11-23 Thread Jason Friedman
> > I want learn python for 4 weeks and have problems, installing Tkinter. If > I installed 3.11.0 for my windows 8.1 from python.org and type > > >>> import _tkinter > > Traceback (most recent call last): > >File "", line 1, in > > ImportError: DLL load failed while importing _tkinter

Re: Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Thomas Passin
On 11/23/2022 11:00 AM, Loris Bennett wrote: Hi, I am using pandas to parse a file with the following structure: Name filesettype KB quota limit in_doubt grace |files quotalimit in_doubtgrace shortname sharedhome USR14097664 52428800

Re: Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Weatherby,Gerard
This seems to work. I’m inferring the | is present in each line that needs to be fixed. import pandas import logging class Wrapper: """Wrap file to fix up data""" def __init__(self, filename): self.filename = filename def __enter__(self): self.fh = open(self.filena

Re: Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Weatherby,Gerard
Oops. Forgot to Reformat file before sending. Here’s the proper PEP-8 (at least according to PyCharm) import pandas import logging class Wrapper: """Wrap file to fix up data""" def __init__(self, filename): self.filename = filename def __enter__(self): self.fh = op

Re: Python 3.11.0 installation and Tkinter does not work

2022-11-23 Thread Barry Scott
> On 23 Nov 2022, at 06:31, Stefan Ram wrote: > > darkst...@o2online.de writes: >> I want learn python for 4 weeks and have problems, installing Tkinter. If I= >> installed 3.11.0 for my windows 8.1 from python.org and type > > Ok, so you already installed from python.org. I wonder a > littl

Re: In code, list.clear doesn't throw error - it's just ignored

2022-11-23 Thread Chris Angelico
On Thu, 24 Nov 2022 at 06:26, Stefan Ram wrote: > > Jon Ribbens writes: > >If you want to catch this sort of mistake automatically then you need > >a linter such as pylint: > > output > > , line 1 > list.clear > Warning: Attribute used as statement. > > , line 5 > list.clear > Warning: Attribut

Preprocessing not quite fixed-width file before parsing

2022-11-23 Thread Loris Bennett
Hi, I am using pandas to parse a file with the following structure: Name filesettype KB quota limit in_doubt grace |files quotalimit in_doubtgrace shortname sharedhome USR14097664 524288000 545259520 0 none | 107110