Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread iMath
I think someone gives the true reason caused the exception here https://stackoverflow.com/a/51821910/1485853 Thanks to his explanation , I extracted the zip archive and then add the extracted to a zip archive using Bandizip, this time `zipimport.zipimporter(r'C:\Users\i\Downloads\you-get-0.4.11

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread iMath
I think someone gives the true reason caused the exception here https://stackoverflow.com/a/51821910/1485853 Thanks to his explanation , I extracted the zip archive and then add the extracted to a zip archive using Bandizip, this time `zipimport.zipimporter(r'C:\Users\i\Downloads\you-get-0.4.11

Pylint false positives

2018-08-14 Thread Frank Millman
Hi all Pylint is flagging a lot of lines as errors that I would consider to be acceptable. I have an abstract class ClassA with a number of concrete sub-classes. ClassA has a method which invokes 'self.method_b()' which is defined separately on each sub-class. Pylint complains that "Instance

Re: Pylint false positives

2018-08-14 Thread D'Arcy Cain
On 2018-08-14 03:38 AM, Frank Millman wrote: > Hi all > > Pylint is flagging a lot of lines as errors that I would consider to be > acceptable. > > I have an abstract class ClassA with a number of concrete sub-classes. > ClassA has a method which invokes 'self.method_b()' which is defined > separ

Re: Pylint false positives

2018-08-14 Thread Frank Millman
"D'Arcy Cain" wrote in message news:865ed61a-cf1d-959f-f77e-dc586fe6e...@vybenetworks.com... On 2018-08-14 03:38 AM, Frank Millman wrote: > Hi all > > Pylint is flagging a lot of lines as errors that I would consider to be > acceptable. > > I have an abstract class ClassA with a number of concr

Re: Pylint false positives

2018-08-14 Thread Thomas Jollans
On 2018-08-14 09:38, Frank Millman wrote: > Hi all > > Pylint is flagging a lot of lines as errors that I would consider to be > acceptable. > > I have an abstract class ClassA with a number of concrete sub-classes. > ClassA has a method which invokes 'self.method_b()' which is defined > separate

Re: Pylint false positives

2018-08-14 Thread Frank Millman
"Thomas Jollans" wrote in message news:53faf0ef-4054-53fa-6179-a862495ea...@tjol.eu... On 2018-08-14 09:38, Frank Millman wrote: > Hi all > > Pylint is flagging a lot of lines as errors that I would consider to be > acceptable. > > I have an abstract class ClassA with a number of concrete sub-c

Re: >< swap operator

2018-08-14 Thread skybuck2000
On Monday, August 13, 2018 at 10:01:37 PM UTC+2, Léo El Amri wrote: > On 13/08/2018 21:54, skybuck2...@hotmail.com wrote: > > I just had a funny idea how to implement a swap operator for types: > > > > A >< B > > > > would mean swap A and B. > > I think that: > > a, b = b, a > > is pretty enou

Re: >< swap operator

2018-08-14 Thread Marko Rauhamaa
skybuck2...@hotmail.com: > On Monday, August 13, 2018 at 10:01:37 PM UTC+2, Léo El Amri wrote: >> On 13/08/2018 21:54, skybuck2...@hotmail.com wrote: >> > I just had a funny idea how to implement a swap operator for types: >> > >> > A >< B >> > >> > would mean swap A and B. >> >> I think that: >

Re: Pylint false positives

2018-08-14 Thread Steven D'Aprano
On Tue, 14 Aug 2018 10:58:17 +0200, Frank Millman wrote: >> > I have an abstract class ClassA with a number of concrete >> > sub-classes. ClassA has a method which invokes 'self.method_b()' >> > which is defined separately on each sub-class. Pylint complains that >> > "Instance of 'ClassA' has no

Re: >< swap operator

2018-08-14 Thread Brian Oney via Python-list
On Tue, 2018-08-14 at 10:55 -0400, Dennis Lee Bieber wrote: > On Tue, 14 Aug 2018 06:18:41 -0700 (PDT), skybuck2...@hotmail.com declaimed > the following: > > > On Monday, August 13, 2018 at 10:01:37 PM UTC+2, Léo El Amri wrote: > > > On 13/08/2018 21:54, skybuck2...@hotmail.com wrote: > > > > I j

Re: Pylint false positives

2018-08-14 Thread Jon Ribbens
On 2018-08-14, Steven D'Aprano wrote: > If there really are a lot of such missing methods, I'd consider writing > something like this: > > class A: > def __init__(self, ...): > ... > > # === process abstract methods en masse === > for name in "method_a method_b method_c method

Re: Good reason not to obfuscate URLs (was: Fishing from PyPI ?)

2018-08-14 Thread Peter J. Holzer
On 2018-08-08 05:18:21 +, Gilmeh Serda wrote: > And if you read email in blasted HTML, chances are they also have an > image that they serve to you on their "beautiful" page you receive, an > image whose link which may or may not be equally personalized, and more > often than not has its ori

Re: Good reason not to obfuscate URLs (was: Fishing from PyPI ?)

2018-08-14 Thread Ian Kelly
On Tue, Aug 14, 2018 at 1:41 PM Peter J. Holzer wrote: > > On 2018-08-08 05:18:21 +, Gilmeh Serda wrote: > > And if you read email in blasted HTML, chances are they also have an > > image that they serve to you on their "beautiful" page you receive, an > > image whose link which may or may not

Re: Pylint false positives

2018-08-14 Thread Terry Reedy
On 8/14/2018 5:05 AM, Thomas Jollans wrote: On 2018-08-14 09:38, Frank Millman wrote: Hi all Pylint is flagging a lot of lines as errors that I would consider to be acceptable. I have an abstract class ClassA with a number of concrete sub-classes. ClassA has a method which invokes 'self.method

How to pass Python command line options (vs arguments) when running script directly vs via Python interpreter?

2018-08-14 Thread Malcolm Greene
When you run a script via "python3 script.py" you can include command line options like -b, -B, -O, -OO, etc between the "python3" interpreter reference and the script.py file, eg. "python3 -b -B -O -OO script.py". When you create a script that is executable directly, eg. script.py with execution b

Re: How to pass Python command line options (vs arguments) when running script directly vs via Python interpreter?

2018-08-14 Thread Terry Reedy
On 8/14/2018 5:45 PM, Malcolm Greene wrote: When you run a script via "python3 script.py" you can include command line options like -b, -B, -O, -OO, etc between the "python3" interpreter reference and the script.py file, eg. "python3 -b -B -O -OO script.py". More generally, python script.py

Re: How to pass Python command line options (vs arguments) when running script directly vs via Python interpreter?

2018-08-14 Thread Michael F. Stemper
On 2018-08-14 16:45, Malcolm Greene wrote: > When you run a script via "python3 script.py" you can include command > line options like -b, -B, -O, -OO, etc between the "python3" interpreter > reference and the script.py file, eg. "python3 -b -B -O -OO script.py". > When you create a script that is

Re: How to pass Python command line options (vs arguments) when running script directly vs via Python interpreter?

2018-08-14 Thread Malcolm Greene
> If you run the script directly, by entering >script.py or clicking a script > icon or name in File Explorer, it runs python without python options *other > than those specified in environmental variables*. Understood. I thought there might have been a way to pass Python option values via a si

Re: How to pass Python command line options (vs arguments) when running script directly vs via Python interpreter?

2018-08-14 Thread Malcolm Greene
> You might try: > from getopt import getopt > or the (apparently newer): > from optparse import OptionParser Thanks Mike. My question was trying to make a distinction between Python options (flags that precede the script or module name) and arguments (the script specific values passed on the co

help! PyQt4 and UTF-8

2018-08-14 Thread inhahe
I can display UTF-8 when I use wxPython: -- import wx app = wx.App() s = 'testing\xf0\x9f\x98\x80' frame = wx.Frame(None, wx.ID_ANY) font = wx.Font("Arial") textbox = wx.TextCtrl(frame, id=wx.ID_ANY) textbox.SetFont(font) textbox.WriteText(s) frame.Show() app.MainLoop() -- But when I try th

Re: Pylint false positives

2018-08-14 Thread Frank Millman
"Frank Millman" wrote in message news:pku0qd$ua5$1...@blaine.gmane.org... Pylint is flagging a lot of lines as errors that I would consider to be acceptable. I have an abstract class ClassA with a number of concrete sub-classes. ClassA has a method which invokes 'self.method_b()' which is d

Re: right way to use zipimport, zipimport.ZipImportError: not a Zip file

2018-08-14 Thread dieter
iMath writes: > ... > I think someone gives the true reason caused the exception here > https://stackoverflow.com/a/51821910/1485853 > > Thanks to his explanation , I extracted the zip archive and then add the > extracted to a zip archive using Bandizip, this time > `zipimport.zipimporter(r'C: