Re: Objects with __name__ attribute

2017-10-25 Thread Peter Otten
ast wrote: > Hi, > > I know two Python's objects which have an intrinsic > name, classes and functions. > > def f(): > pass > f.__name__ > 'f' g = f g.__name__ > 'f' > > class Test: > pass > Test.__name__ > 'Test' Test2 = Test Test2.__name__ > 'Test' > >

Re: h5py.File() gives error message

2017-10-25 Thread C W
Oh, I was running a debug file, that's why the path is different. The file is here, https://www.dropbox.com/s/6jx4rzyg9xwl95m/train_catvnoncat.h5?dl=0 Is anyone able to get it working? Thank you! On Tue, Oct 24, 2017 at 10:37 PM, Dennis Lee Bieber wrote: > On Tue, 24 Oct 2017 18:02:26 -0700, R

Re: Compression of random binary data

2017-10-25 Thread Gregory Ewing
Steve D'Aprano wrote: - Encrypted data looks very much like random noise. There's actually a practical use for that idea. If you can feed the output of an encryption algorithm through a compressor and make it smaller, it means there is a cryptographic weakness in the algorithm that could potent

Re: Compression of random binary data

2017-10-25 Thread Gregory Ewing
Ben Bacarisse wrote: The trouble is a pedagogic one. Saying "you can't compress random data" inevitably leads (though, again, this is just my experience) to endless attempts to define random data. It's more about using terms without making sure everyone agrees on the definitions being used. I

Re: Compression of random binary data

2017-10-25 Thread Gregory Ewing
Lele Gaifax wrote: That's simple enough: of course one empty file would be "music.mp3.zip.zip.zip", while the other would be "movie.avi.zip.zip.zip.zip.zip"... some sort of https://en.wikipedia.org/wiki/Water_memory applied to file system entries :-) If you're allowed to alternate between two c

Re: Sockets but calling from different programs

2017-10-25 Thread Cameron Simpson
On 23Oct2017 05:33, T Obulesu wrote: I'm new to python3 and scratching my head to write a program for this logic: The tutor list might be a better place for such questions, but since we're here... classA.py Class A: # class for socket communication basic init method that

Re: h5py.File() gives error message

2017-10-25 Thread Peter Otten
C W wrote: > Oh, I was running a debug file, that's why the path is different. > > The file is here, > https://www.dropbox.com/s/6jx4rzyg9xwl95m/train_catvnoncat.h5?dl=0 > > Is anyone able to get it working? Thank you! Hm, that file seems to contain HTML and that causes an OSError here, too: $

Re: right list for SIGABRT python binary question ?

2017-10-25 Thread Karsten Hilbert
On Tue, Oct 24, 2017 at 08:47:58PM +0200, M.-A. Lemburg wrote: > >> This error suggests that you have 32- and 64-bit versions of > >> Python and mxDateTime mixed in your installation. > >> > >> Py_InitModule4 is only available in the 32-bit build of > >> Python. With the 64-bit build, it's called

Let's talk about debuggers!

2017-10-25 Thread Thomas Jollans
Hi, I just wanted to know what tools everyone used for debugging Python applications - scripts / backend / desktop apps / notebooks / whatever. Apart from the usual dance with log files and strategically inserted print() calls, that is. Of course we all know and mildly dislike pdb. Personally, i

Re: Compression of random binary data

2017-10-25 Thread Ian Kelly
On 10/24/17, Richard Damon wrote: > My understanding of the 'Random Data Comprehensibility' challenge is > that is requires that the compression take ANY/ALL strings of up to N > bits, and generate an output stream no longer than the input stream, and > sometime less. That's incorrect, at least o

Re: Let's talk about debuggers!

2017-10-25 Thread Fabien
On 10/25/2017 03:07 PM, Thomas Jollans wrote: What options are there for Python (that work)? PyCharm's debugger is fine (also available in the community edition) Cheers, Fabien -- https://mail.python.org/mailman/listinfo/python-list

Re: h5py.File() gives error message

2017-10-25 Thread C W
wow, thanks so much! I don't know how you figured that it's HTML, but that's awesome! Mike On Wed, Oct 25, 2017 at 5:20 AM, Peter Otten <__pete...@web.de> wrote: > C W wrote: > > > Oh, I was running a debug file, that's why the path is different. > > > > The file is here, > > https://www.dropbox

Re: Let's talk about debuggers!

2017-10-25 Thread Rustom Mody
On Wednesday, October 25, 2017 at 6:37:47 PM UTC+5:30, Thomas Jollans wrote: > Hi, > > I just wanted to know what tools everyone used for debugging Python > applications - scripts / backend / desktop apps / notebooks / whatever. > Apart from the usual dance with log files and strategically inserte

Re: Let's talk about debuggers!

2017-10-25 Thread Ned Batchelder
On 10/25/17 9:07 AM, Thomas Jollans wrote: Hi, I just wanted to know what tools everyone used for debugging Python applications - scripts / backend / desktop apps / notebooks / whatever. Apart from the usual dance with log files and strategically inserted print() calls, that is. Of course we al

Re: Let's talk about debuggers!

2017-10-25 Thread Michele Simionato
pdb plus plus: https://pypi.python.org/pypi/pdbpp -- https://mail.python.org/mailman/listinfo/python-list

Re: Let's talk about debuggers!

2017-10-25 Thread Bill
Fabien wrote: On 10/25/2017 03:07 PM, Thomas Jollans wrote: What options are there for Python (that work)? PyCharm's debugger is fine (also available in the community edition) +1 Cheers, Fabien -- https://mail.python.org/mailman/listinfo/python-list

Re: Compression of random binary data

2017-10-25 Thread danceswithnumbers
Whatever you do, you'll find that *on average* you will need *at least* 34 bits to be able to represent all possible 10-digit decimal numbers. Some might be shorter, but then others will be longer, and the average won't be less than 34. The theoretical limit for arbitrary numbers 0 - 9 must

Re: Let's talk about debuggers!

2017-10-25 Thread William Ray Wing
> On Oct 25, 2017, at 9:07 AM, Thomas Jollans wrote: > > [byte] > What options are there for Python (that work)? What text editors (and > IDEs) have a decent integrated debugger or debugging plugin? I rather like WingIDE (the name is a coincidence). It allows insertion/removal of break poi

Test Bank for Campbell Biology 11th Edition by Urry, Cain

2017-10-25 Thread kkgsrkmk
Where it didnt come -- https://mail.python.org/mailman/listinfo/python-list

Re: Let's talk about debuggers!

2017-10-25 Thread Thomas Jollans
On 2017-10-25 15:57, Rustom Mody wrote: > > pdb inside emacs works (to a fashion) > And it shows the arrow for current line so its at least quasi-gui > > I believe idle too is much more usable than a few years earlier I haven't used IDLE in years (if ever), partly because Tkinter is so incredibl

Re: Let's talk about debuggers!

2017-10-25 Thread Tim
On Wednesday, October 25, 2017 at 9:07:47 AM UTC-4, Thomas Jollans wrote: > Hi, > > I just wanted to know what tools everyone used for debugging Python > applications - scripts / backend / desktop apps / notebooks / whatever. > Apart from the usual dance with log files and strategically inserted >

Re: Let's talk about debuggers!

2017-10-25 Thread Daniele Forghieri
Il 25/10/2017 15:07, Thomas Jollans ha scritto: Hi, I just wanted to know what tools everyone used for debugging Python applications - scripts / backend / desktop apps / notebooks / whatever. Apart from the usual dance with log files and strategically inserted print() calls, that is. Of course

Re: Let's talk about debuggers!

2017-10-25 Thread Terry Reedy
On 10/25/2017 12:12 PM, Thomas Jollans wrote: On 2017-10-25 15:57, Rustom Mody wrote: pdb inside emacs works (to a fashion) And it shows the arrow for current line so its at least quasi-gui I believe idle too is much more usable than a few years earlier I haven't used IDLE in years (if ever)

Re: Let's talk about debuggers!

2017-10-25 Thread m
W dniu 25.10.2017 o 15:53, Ned Batchelder pisze: > On 10/25/17 9:07 AM, Thomas Jollans wrote: >> Hi, >> >> I just wanted to know what tools everyone used for debugging Python >> applications - scripts / backend / desktop apps / notebooks / whatever. >> Apart from the usual dance with log files and

Re: Let's talk about debuggers!

2017-10-25 Thread Thomas Jollans
On 25/10/17 22:18, Terry Reedy wrote: > On 10/25/2017 12:12 PM, Thomas Jollans wrote: >> On 2017-10-25 15:57, Rustom Mody wrote: >>> >>> pdb inside emacs works (to a fashion) >>> And it shows the arrow for current line so its at least quasi-gui >>> >>> I believe idle too is much more usable than a

Re: Compression of random binary data

2017-10-25 Thread danceswithnumbers
So if the theoretical min compression limit (log2(n)*(x)) has a 3% margin but your transform has a less than 3% inflate rate at most then there is room for the transform to compress below the theoretical min. With every transform the entropy changes, the potential for greater compression also ch

Determine the container class of an object in Python 3

2017-10-25 Thread qrious
Class1 is instantiated in Class2 as follows. Class2 also contains another variable, say: class Class2: class1 = Class1() a = 0 I want to create a method myDef() in Class1 that can read or write to a. How do I access a from within myDef() to access a? Calling Class2.a is not an option

Re: Determine the container class of an object in Python 3

2017-10-25 Thread Chris Angelico
On Thu, Oct 26, 2017 at 12:25 PM, qrious wrote: > > Class1 is instantiated in Class2 as follows. Class2 also contains another > variable, say: > > class Class2: > class1 = Class1() > a = 0 > > I want to create a method myDef() in Class1 that can read or write to a. How > do I access a fr

Re: Compression of random binary data

2017-10-25 Thread Steve D'Aprano
On Thu, 26 Oct 2017 08:22 am, danceswithnumb...@gmail.com wrote: > with each pass you can compress untill the entropy is so random it can no > longer be comressed. Which is another way of saying that you cannot compress random binary data. -- Steve “Cheer up,” they said, “things could be wo

Re: Determine the container class of an object in Python 3

2017-10-25 Thread Steve D'Aprano
On Thu, 26 Oct 2017 12:25 pm, qrious wrote: > Class1 is instantiated in Class2 as follows. Class2 also contains another > variable, say: > > class Class2: > class1 = Class1() > a = 0 > > I want to create a method myDef() in Class1 that can read or write to a. How > do I access a from wit

Re: IDLE doesn't recognise installed packages

2017-10-25 Thread Daniel Tangemann
ok, I did that. I noticed that this path: 'C:\\Users\\Daniel86\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\idlelib' is missing when I run the python.exe without IDLE. how do I fix this? also I get a syntax error when I try that: "To make sure you are running pip with the same binary as IDLE