Re: [python-win32] Future of PyWin32
> > (6) Focusing more on Python3 compatibility > > > > The end of life of Python2 is at 2020 and therefore I would suggest > > investing time into making the code compatible to Python3 asap. > > PyWin32 has been Python 3 compatible for many years. To what are you > referring? > > Well, we need to run setup3.py for Python3 installation, which is refactoring > many files using lib2to3. With the end of Python2 I also expect that this > module will become dead. > These modules are not meant to be used forever, but creating a bridge over a > period of time where different standards are used. > And something that is already overdue is the use of print "bla" instead of > print("bla"). Python 2.7 already understands print("bla") without any imports > from the __future__ and since 2.6 is EOL, I would begin to fix that at first All versions of python ‘understand’ `print(“foo”)`. In python 2, that just means `use the print statement to output the parenthesized string “foo”, oh and the coder used poor practices and forgot the space`. Python 2.7 needs the future import to get rid of the print keyword. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Future of PyWin32
Hey Tim, thank you for your early feedback! > > (2) Syntax fixes and code-style. > > > > If I'm not wrong I saw mixed usage of tabs, 2-whitespace and > > 4-whitespace indents. Of course, I can be wrong and we are using > > 4-whitespaces everywhere, but I remember that I saw files using tabs > > and 2-whitespaces. > > It is boring work, but I can imagine, that people, who see this mixed > > usage, might get frightened. > > Also when it comes to code-style I would like to make everything well > > ordered. Eg. splitting long lines and splitting multiple options, so > > you can read the code without scrolling vertically too much. > > Remember that much of PyWin32 is automatically generated. Automatically > generated code is almost never pleasant to read. Hmm, I never saw any generator for this. Instead I see that people are doing additions manually already: https://github.com/mhammond/pywin32/pull/1176 Do you know or can you look up, where this generator is? It would be great to run this before build time. > > (3) Self-explaining variable names > > > > Some variables are using abbreviations. Instead, I would like to use > > full words, so the code is readable like a written book. Personally, I > > like this a lot because the source actually tells you what it is doing > > without any guesses. > > Again, much of PyWin32 is automatically generated from the Win32 C API. > The names need to match the API, as terse as they may be. > > I am sympathetic to your plea, but renaming efforts like this are > fraught with dangers. It's awfully easy to cause duplicates or screw up > the comments through an overactive search-and-replace. I know, that's why it makes fun to clean it up a bit. I have the experiance that I often hit superfluous variables in these situations. So for whatever is not generated, I would suggets to make use of the freedome of choosing meaningful variables. However, this is my opinion, which does not mean that this should be really done like that. :) > > (6) Focusing more on Python3 compatibility > > > > The end of life of Python2 is at 2020 and therefore I would suggest > > investing time into making the code compatible to Python3 asap. > > PyWin32 has been Python 3 compatible for many years. To what are you > referring? Well, we need to run setup3.py for Python3 installation, which is refactoring many files using lib2to3. With the end of Python2 I also expect that this module will become dead. These modules are not meant to be used forever, but creating a bridge over a period of time where different standards are used. And something that is already overdue is the use of print "bla" instead of print("bla"). Python 2.7 already understands print("bla") without any imports from the __future__ and since 2.6 is EOL, I would begin to fix that at first. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Future of PyWin32
Thomas Pietrowski wrote: > > > (2) Syntax fixes and code-style. > > If I'm not wrong I saw mixed usage of tabs, 2-whitespace and > 4-whitespace indents. Of course, I can be wrong and we are using > 4-whitespaces everywhere, but I remember that I saw files using tabs > and 2-whitespaces. > It is boring work, but I can imagine, that people, who see this mixed > usage, might get frightened. > Also when it comes to code-style I would like to make everything well > ordered. Eg. splitting long lines and splitting multiple options, so > you can read the code without scrolling vertically too much. Remember that much of PyWin32 is automatically generated. Automatically generated code is almost never pleasant to read. > (3) Self-explaining variable names > > Some variables are using abbreviations. Instead, I would like to use > full words, so the code is readable like a written book. Personally, I > like this a lot because the source actually tells you what it is doing > without any guesses. Again, much of PyWin32 is automatically generated from the Win32 C API. The names need to match the API, as terse as they may be. I am sympathetic to your plea, but renaming efforts like this are fraught with dangers. It's awfully easy to cause duplicates or screw up the comments through an overactive search-and-replace. > (6) Focusing more on Python3 compatibility > > The end of life of Python2 is at 2020 and therefore I would suggest > investing time into making the code compatible to Python3 asap. PyWin32 has been Python 3 compatible for many years. To what are you referring? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32
[python-win32] Future of PyWin32
Dear pywin32-users, during the last months, I was using pywin32 to communicate between Cura and CAD software. It worked very well - better than comtypes, which was not fully working or accepting errors but didn't throw any errors. pywin32 convinced me because of its stability and in my opinion, this piece of software deserves some maintenance. Thus I would like to discuss with you about what you would like to see in the future done on pywin32. Here is my personal list of things, which need to be done soon: (1) Automated builds and tests on PRs Already began to work on this. There is one issue left, but I'm discussing with AppVeyor about a solution. (2) Syntax fixes and code-style. If I'm not wrong I saw mixed usage of tabs, 2-whitespace and 4-whitespace indents. Of course, I can be wrong and we are using 4-whitespaces everywhere, but I remember that I saw files using tabs and 2-whitespaces. It is boring work, but I can imagine, that people, who see this mixed usage, might get frightened. Also when it comes to code-style I would like to make everything well ordered. Eg. splitting long lines and splitting multiple options, so you can read the code without scrolling vertically too much. (3) Self-explaining variable names Some variables are using abbreviations. Instead, I would like to use full words, so the code is readable like a written book. Personally, I like this a lot because the source actually tells you what it is doing without any guesses. (4) Generated documentation I never did that before, but I can imagine, that someone else could prepare something like this. Using readthedocs would be great, so the docs are accessible for everyone. (5) More and extensive tests to ensure the quality of the code. (6) Focusing more on Python3 compatibility The end of life of Python2 is at 2020 and therefore I would suggest investing time into making the code compatible to Python3 asap. Many projects use Python-Six to get full compatibility, but I would suggest using Python-Nine because this module is written from the Python3 perspective. When Python2 becomes dead, I guess it will be easier to drop Python-Nine instead of Python-Six. Looking forward for a vivid discussion on this! With kind regards - Thomas Karl Pietrowski (aka thopiekar) ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32