Re: Recommendation for Object-Oriented systems to study

2016-06-02 Thread Bob Martin
in 760378 20160602 131534 Alan Evangelista wrote: >On 06/02/2016 02:44 AM, Lawrence D�Oliveiro wrote: >> On Monday, May 30, 2016 at 7:17:47 AM UTC+12, Alan Evangelista wrote: >>> - Java forces everything to be implemented in OO model (classes) >> After you have spend a f

Re: Python on Windows with linux environment

2016-06-02 Thread Muhammad Ali
On Friday, June 3, 2016 at 6:27:50 AM UTC+8, Eric S. Johansson wrote: > On 6/2/2016 2:03 PM, Joel Goldstick wrote: > > Although the OP is using Windows 7, according to recent articles, > > Ubuntu is teaming with MS for Windows 10 to include a bash shell, > > presumably with the package management o

Re: for / while else doesn't make sense

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 8:52:52 AM UTC+12, BartC wrote: > Simple iterative for-loops are more of a DIY effort... There is one case that Python handles more nicely than C. And that is iterating over a fixed set of values. E.g. in Python for rendering in (False, True) : ... #end

xlrd 1.0.0 released!

2016-06-02 Thread Chris Withers
Ugh, and once again, this time with a corrected title... On 02/06/2016 18:56, Chris Withers wrote: Hi All, Well, I've finally called it and tagged current master of xlrd as 1.0.0: http://pypi.python.org/pypi/xlrd/1.0.0 This release includes the following changes since the last release: - Of

xlrd 0.9.4 released!

2016-06-02 Thread Chris Withers
Hi All, Well, I've finally called it and tagged current master of xlrd as 1.0.0: http://pypi.python.org/pypi/xlrd/1.0.0 This release includes the following changes since the last release: - Official support, such as it is, is now for 2.6, 2.7, 3.3+ - Fixes a bug in looking up non-lowercase sh

Re: Recommendation for Object-Oriented systems to study

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 12:16:02 AM UTC+12, Alan Evangelista wrote: > The point was which programming language was better to teach object oriented > concepts... Object-orientation is not an end in itself. The point is what programming languages you should be exposed to, to get an idea of how

Re: Don't put your software in the public domain

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 12:26:33 AM UTC+12, Marko Rauhamaa wrote: > If the author has one right to their work, it is relinquishing all rights to > that work. In Europe, you don’t have that right. > All works will eventually fall into the public domain anyway... Not if certain large corporati

Re: for / while else doesn't make sense

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 8:52:52 AM UTC+12, BartC wrote: > One major objection was that C's 'for' isn't really a for-statement at > all (as it is understood in most other languages that haven't just > copied C's version), but is closer to a 'while' statement. Apart from having local loop varia

Re: for / while else doesn't make sense

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 8:09:21 AM UTC+12, Rob Gaddi wrote: > Although your loop is really the _canonical_ use case for > > for loopvar in range(initial_value, limit+1): > processing > if found_what_im_looking_for: > break > else: > do_whatever_it_is_you_do_when_its_not_foun

Re: [Q] ImportError by __import__() on Python >= 3.4

2016-06-02 Thread MRAB
On 2016-06-02 15:04, Makoto Kuwata wrote: Hi, I have a trouble around __import__(). The following sample code works well on Python <= 3.3, but it raises ImportError on Python >= 3.4. ## importtest.py import sys, os, shutil def test(name): try: ## create 'foo/__

Re: [Q] ImportError by __import__() on Python >= 3.4

2016-06-02 Thread Makoto Kuwata
On Thu, Jun 2, 2016 at 11:15 PM, Michael Selik wrote: > > > On Thu, Jun 2, 2016 at 10:06 AM Makoto Kuwata wrote: > >> os.mkdir(name) >> with open(name + "/__init__.py", 'w') as f: >> f.write("X=1") >> f.flush() >> >> Please give me any advi

xlwt 1.1.1 released!

2016-06-02 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 1.1.1. This release contains the following: - Fix SST BIFF record in Python 3. - Fix for writing ExternSheetRecord in Python 3. - Add the ability to insert bitmap images from buffers as well as files. - Official support for Python 3.5. Tha

Re: Recommendation for GUI lib?

2016-06-02 Thread Dietmar Schwertberger
On 02.06.2016 12:35, John Pote wrote: I've used wxPython (www.wxpython.org) for a few GUI projects and found it ok. It's a wrapper for the wxWidgets C++ library. There's even a reasonable free GUI builder, wxGlade, which I use as I prefer constructing GUI's that way rather than writing raw wxPy

Re: Python on Windows with linux environment

2016-06-02 Thread Eric S. Johansson
On 6/2/2016 2:03 PM, Joel Goldstick wrote: > Although the OP is using Windows 7, according to recent articles, > Ubuntu is teaming with MS for Windows 10 to include a bash shell, > presumably with the package management of Ubuntu (debian), with pip > goodness and virtualenv and virtualenvwrapper.

Re: Multiple inheritance, super() and changing signature

2016-06-02 Thread Marko Rauhamaa
Random832 : > But from a class-definition perspective, __init__ is the one and only > thing that should be called a constructor. Not arguing agaist that, but from the *user's* perspective, I see the class itself is the constructor function: class C: pass c = C() You could say that the clas

Re: Multiple inheritance, super() and changing signature

2016-06-02 Thread Random832
On Thu, Jun 2, 2016, at 13:36, Steven D'Aprano wrote: > On Thu, 2 Jun 2016 06:22 pm, Lawrence D’Oliveiro wrote: > > > On Wednesday, June 1, 2016 at 8:02:14 AM UTC+12, Ben Finney wrote: > >> (Note that ‘__init__’ is not a constructor, because it operates on the > >> *already constructed* instance,

Re: for / while else doesn't make sense

2016-06-02 Thread BartC
On 02/06/2016 21:09, Rob Gaddi wrote: Lawrence D’Oliveiro wrote: On Friday, May 20, 2016 at 4:43:56 AM UTC+12, Herkermer Sherwood wrote: Most keywords in Python make linguistic sense, but using "else" in for and while structures is kludgy and misleading. My objection is not to the choice of

Re: for / while else doesn't make sense

2016-06-02 Thread Ian Kelly
On Thu, Jun 2, 2016 at 2:09 PM, Rob Gaddi wrote: > The limited variable scoping is the only thing missing, and you can get > around that by telling yourself you're not going to use that variable > again, and then believing you on the matter. Or you can actually limit the variable scope using a fu

Re: Recommendation for GUI lib?

2016-06-02 Thread Igor Korot
Hi, On Thu, Jun 2, 2016 at 4:13 PM, Rob Gaddi wrote: > Nick Sarbicki wrote: > >>> >>> >>> > >>> > Do you have any recommendations? Primary platforms are OS X and Linux. >>> > >>> > I, of course, want to have "standard" widgets but a "calendar >>> > view"/"date picker" is a plus. >>> >> >> I gener

Re: Recommendation for GUI lib?

2016-06-02 Thread Rob Gaddi
Nick Sarbicki wrote: >> >> >> > >> > Do you have any recommendations? Primary platforms are OS X and Linux. >> > >> > I, of course, want to have "standard" widgets but a "calendar >> > view"/"date picker" is a plus. >> > > I generally use PyQt which is one of two (the other being pyside) python >

Re: for / while else doesn't make sense

2016-06-02 Thread Rob Gaddi
Lawrence D’Oliveiro wrote: > On Friday, May 20, 2016 at 4:43:56 AM UTC+12, Herkermer Sherwood wrote: >> Most keywords in Python make linguistic sense, but using "else" in for and >> while structures is kludgy and misleading. > > My objection is not to the choice of keyword, it’s to the whole desig

RE: Matplotlib X-axis dates

2016-06-02 Thread Joaquin Alzola
>plt.plot(np.array(code_2001),label="2001") Simple solution: ax.plot(date_nump,np.array(code_2001),label="2001") Didn't see it until I took a rest. This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but co

Re: Beginner Question

2016-06-02 Thread sohcahtoa82
On Thursday, June 2, 2016 at 6:38:56 AM UTC-7, Igor Korot wrote: > Steven, > > On Thu, Jun 2, 2016 at 1:20 AM, Steven D'Aprano > wrote: > > On Thursday 02 June 2016 14:21, Igor Korot wrote: > > > >> Hi, guys, > >> > >> On Wed, Jun 1, 2016 at 9:42 PM, boB Stepp wrote: > >>> On Wed, Jun 1, 2016 at

Re: Python on Windows with linux environment

2016-06-02 Thread Joel Goldstick
On Thu, Jun 2, 2016 at 1:04 PM, Eric S. Johansson wrote: > On 6/2/2016 12:38 PM, Wildman via Python-list wrote: >> On Thu, 02 Jun 2016 04:22:45 -0700, Muhammad Ali wrote: >> >>> Hi, >>> >>> I use windows regularly, however, I use linux for only my research work at >>> supercomputer. In my researc

Re: Multiple inheritance, super() and changing signature

2016-06-02 Thread Ian Kelly
On Thu, Jun 2, 2016 at 11:36 AM, Steven D'Aprano wrote: > On Thu, 2 Jun 2016 06:22 pm, Lawrence D’Oliveiro wrote: > >> On Wednesday, June 1, 2016 at 8:02:14 AM UTC+12, Ben Finney wrote: >>> (Note that ‘__init__’ is not a constructor, because it operates on the >>> *already constructed* instance, a

Re: Multiple inheritance, super() and changing signature

2016-06-02 Thread Steven D'Aprano
On Thu, 2 Jun 2016 06:22 pm, Lawrence D’Oliveiro wrote: > On Wednesday, June 1, 2016 at 8:02:14 AM UTC+12, Ben Finney wrote: >> (Note that ‘__init__’ is not a constructor, because it operates on the >> *already constructed* instance, and does not return anything. > > Believe it or not, that *is*

Re: Python on Windows with linux environment

2016-06-02 Thread Eric S. Johansson
On 6/2/2016 12:38 PM, Wildman via Python-list wrote: > On Thu, 02 Jun 2016 04:22:45 -0700, Muhammad Ali wrote: > >> Hi, >> >> I use windows regularly, however, I use linux for only my research work at >> supercomputer. In my research field (materials science) most of the scripts >> are being writ

Re: Python on Windows with linux environment

2016-06-02 Thread Wildman via Python-list
On Thu, 02 Jun 2016 04:22:45 -0700, Muhammad Ali wrote: > Hi, > > I use windows regularly, however, I use linux for only my research work at > supercomputer. In my research field (materials science) most of the scripts > are being written in python with linux based system. Could I installed suc

Matplotlib X-axis dates

2016-06-02 Thread Joaquin Alzola
Hi Guys Have been all day looking for a solution on the x-axis and the time plot. The output that I get is this with all the dates shift to the right overlapping each other. http://postimg.org/image/fs4tx83or/ I want the x-axis to start at 0 and to finish after the 3 entries on the DB. X Axis

Re: Multiple inheritance, super() and changing signature

2016-06-02 Thread Michael Selik
On Thu, Jun 2, 2016 at 4:26 AM Lawrence D’Oliveiro wrote: > On Wednesday, June 1, 2016 at 8:02:14 AM UTC+12, Ben Finney wrote: > > (Note that ‘__init__’ is not a constructor, because it operates on the > > *already constructed* instance, and does not return anything. > > Believe it or not, that *

Re: 2d matrix into Nx3 column data

2016-06-02 Thread Michael Selik
On Thu, Jun 2, 2016 at 4:57 AM Anup reni wrote: > i would like to transform this: > > -1 0-0.8 0.64 -0.36-0.4 0.16 -0.84 > 0.0 0 -1.00 > 0.4 0.16 -0.84 > 0.8 0.64 -0.36 > > to something like this: > > x y result > id1 -0.8 -10.642 -0.8 0 -0.363

Re: [Q] ImportError by __import__() on Python >= 3.4

2016-06-02 Thread Michael Selik
On Thu, Jun 2, 2016 at 10:06 AM Makoto Kuwata wrote: > os.mkdir(name) > with open(name + "/__init__.py", 'w') as f: > f.write("X=1") > f.flush() > > Please give me any advices or hints. > This wasn't your question, but you don't need to flu

Re: Python on Windows with linux environment

2016-06-02 Thread Marc Brooks
Others have mentioned Cygwin or the new subsystem. The other two options a number of Python develops that I work use are to (1) install vmware/virtualbox and run linux in a vm or (2) install the packaged binaries, such as Anaconda from Continuum Analytics. One issue I had when using cygwin was th

[Q] ImportError by __import__() on Python >= 3.4

2016-06-02 Thread Makoto Kuwata
Hi, I have a trouble around __import__(). The following sample code works well on Python <= 3.3, but it raises ImportError on Python >= 3.4. ## importtest.py import sys, os, shutil def test(name): try: ## create 'foo/__init__.py' file os.mkdir(name)

Re: Beginner Question

2016-06-02 Thread Igor Korot
Steven, On Thu, Jun 2, 2016 at 1:20 AM, Steven D'Aprano wrote: > On Thursday 02 June 2016 14:21, Igor Korot wrote: > >> Hi, guys, >> >> On Wed, Jun 1, 2016 at 9:42 PM, boB Stepp wrote: >>> On Wed, Jun 1, 2016 at 7:55 PM, Marcin Rak >>> wrote: Hi to all I have a beginner question

Re: Beginner Question

2016-06-02 Thread Marcin Rak
That linked help clear up my confusion...yes you really have to know how things work internally to understand why things happen the way they happen. Thanks again to all -- https://mail.python.org/mailman/listinfo/python-list

Re: EuroPython 2016 Keynote: Paul Hildebrandt

2016-06-02 Thread M.-A. Lemburg
On 02.06.2016 14:25, Omar Abou Mrad wrote: > Quick note: blog and conference schedule links in the > europython.eu site's custom 404 page are incorrect. > > https://ep2016.europython.eu/en/foobarbaz/ Thanks. Should be fixed now. > On Tue, May 31, 2016 at 4:22 PM, M.-A. Lemburg wrote: > >> We a

Re: Python on Windows with linux environment

2016-06-02 Thread Paul Rudin
Deborah Martin writes: > Try Cygwin at http://www.cygwin.com > Or use the new windows subsystem for linux: https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Don't put your software in the public domain

2016-06-02 Thread Robin Becker
On 02/06/2016 07:41, Gregory Ewing wrote: Steven D'Aprano wrote: http://linuxmafia.com/faq/Licensing_and_Law/public-domain.html From that: It might be ruled to create a global licence for unrestricted use. That licence might or might not then be adjudicated to be revocable by subsequent copy

Re: Efficient handling of fast, real-time hex data

2016-06-02 Thread alister
On Thu, 02 Jun 2016 05:41:40 -0400, Gene Heskett wrote: > On Thursday 02 June 2016 04:13:51 alister wrote: > >> On Thu, 02 Jun 2016 18:50:34 +1200, Gregory Ewing wrote: >> > jlada...@itu.edu wrote: >> >> One common data transmission error I've seen in other systems is >> >> added/dropped bytes. I

Re: Don't put your software in the public domain

2016-06-02 Thread Marko Rauhamaa
Chris Angelico : > I honestly don't see why people want to put their code into the public > domain, when the MIT license is pretty close to that anyway. What's > the point? Why did I put my book translation into the public domain (http://pacujo.net/esperanto/literaturo/juho/>)? Because that's wh

Re: EuroPython 2016 Keynote: Paul Hildebrandt

2016-06-02 Thread Omar Abou Mrad
Quick note: blog and conference schedule links in the europython.eu site's custom 404 page are incorrect. https://ep2016.europython.eu/en/foobarbaz/ On Tue, May 31, 2016 at 4:22 PM, M.-A. Lemburg wrote: > We are pleased to announce our next keynote speaker for EuroPython > 2016: > > >

Re: Recommendation for Object-Oriented systems to study

2016-06-02 Thread Alan Evangelista
On 06/02/2016 02:44 AM, Lawrence D’Oliveiro wrote: On Monday, May 30, 2016 at 7:17:47 AM UTC+12, Alan Evangelista wrote: - Java forces everything to be implemented in OO model (classes) After you have spend a few months battering your head against the rigidity and verbosity of Java, you will

Re: Don't put your software in the public domain

2016-06-02 Thread Chris Angelico
On Thu, Jun 2, 2016 at 9:56 PM, Steven D'Aprano wrote: > On Thu, 2 Jun 2016 04:41 pm, Gregory Ewing wrote: > >> Steven D'Aprano wrote: >> >>> http://linuxmafia.com/faq/Licensing_and_Law/public-domain.html >> >> From that: >>> It might be ruled to create a global licence for unrestricted use. That

RE: Python on Windows with linux environment

2016-06-02 Thread Deborah Martin
Try Cygwin at http://www.cygwin.com Regards, Deborah -Original Message- From: Python-list [mailto:python-list-bounces+deborah.martin=kognitio@python.org] On Behalf Of Muhammad Ali Sent: 02 June 2016 12:23 To: python-list@python.org Subject: Python on Windows with linux environment

Re: Don't put your software in the public domain

2016-06-02 Thread Steven D'Aprano
On Thu, 2 Jun 2016 04:41 pm, Gregory Ewing wrote: > Steven D'Aprano wrote: > >> http://linuxmafia.com/faq/Licensing_and_Law/public-domain.html > > From that: >> It might be ruled to create a global licence for unrestricted use. That > > licence might or might not then be adjudicated to be revo

Re: Python on Windows with linux environment

2016-06-02 Thread Oscar Benjamin
On 2 June 2016 at 12:22, Muhammad Ali wrote: > I use windows regularly, however, I use linux for only my research work at > supercomputer. In my research field (materials science) most of the scripts > are being written in python with linux based system. Could I installed such > linux based pyt

Python on Windows with linux environment

2016-06-02 Thread Muhammad Ali
Hi, I use windows regularly, however, I use linux for only my research work at supercomputer. In my research field (materials science) most of the scripts are being written in python with linux based system. Could I installed such linux based python on my window 7? So that I can use those linu

Re: Storing data in mysql

2016-06-02 Thread Ben Finney
Anup reni writes: > How to store this 3 dimensional data in Mysql database for plotting on > map? You have not asked a question relevant to Python. You have asked a question much more to do with MySQL. Perhaps take the discussion to a discussion forum for MySQL instead? -- \ “I find the

Re: Recommendation for GUI lib?

2016-06-02 Thread Nick Sarbicki
> > > > > > Do you have any recommendations? Primary platforms are OS X and Linux. > > > > I, of course, want to have "standard" widgets but a "calendar > > view"/"date picker" is a plus. > I generally use PyQt which is one of two (the other being pyside) python wrappers for the Qt libraries. PyQ

Re: Recommendation for GUI lib?

2016-06-02 Thread John Pote
On 01/06/2016 18:13, Jan Erik Moström wrote: I want to write a few programs with a GUI but I don't want to use Tk. Instead I'm looking for some other library, I've tried to look around and also asked a few but I don't really know what to use. I've used wxPython (www.wxpython.org) for a few GUI

Re: Efficient handling of fast, real-time hex data

2016-06-02 Thread Gene Heskett
On Thursday 02 June 2016 04:13:51 alister wrote: > On Thu, 02 Jun 2016 18:50:34 +1200, Gregory Ewing wrote: > > jlada...@itu.edu wrote: > >> One common data transmission error I've seen in other systems is > >> added/dropped bytes. I may add a CRC-8 error-checking byte in place > >> of the newline

Re: Just for fun: creating zombies with Python

2016-06-02 Thread Lawrence D’Oliveiro
On Thursday, June 2, 2016 at 8:57:13 PM UTC+12, Steven D'Aprano wrote: > os.waitpid(pids[i], 0) One of the first lessons you learn, when messing about with spawning processes on Linux(-compatible) systems in languages other than a shell, is ALWAYS GOBBLE YOUR ZOMBIE CHILDREN! -- https:/

Just for fun: creating zombies with Python

2016-06-02 Thread Steven D'Aprano
Just for fun, I thought I'd create some zombie processes using Linux. (This will probably only work on POSIX-compliant operating systems. I don't know that Windows has zombies.) I started with the C code given here: https://en.wikipedia.org/wiki/Zombie_process#Examples and re-wrote it into Pyt

Re: How to create development Python environment on Linux.

2016-06-02 Thread Marc Brooks
I am pretty sure (but not 100%) that the pip that virtualenv installs when it first creates the virtualenv is the version of pip installed on the system. Here's the process I used to bootstrap a new Python 2.7 dev environment. 1. Download and install the latest version of pip as sudo so it's syst

2d matrix into Nx3 column data

2016-06-02 Thread Anup reni
i would like to transform this: -1 0-0.8 0.64 -0.36-0.4 0.16 -0.84 0.0 0 -1.00 0.4 0.16 -0.84 0.8 0.64 -0.36 to something like this: x y result id1 -0.8 -10.642 -0.8 0 -0.363 -0.4 -1 0.164 -0.4 0 -0.845 0.0 -10.006 0.0 0 -1.007

Recommendation for GUI lib?

2016-06-02 Thread Jan Erik Moström
I want to write a few programs with a GUI but I don't want to use Tk. Instead I'm looking for some other library, I've tried to look around and also asked a few but I don't really know what to use. Do you have any recommendations? Primary platforms are OS X and Linux. I, of course, want to hav

Storing data in mysql

2016-06-02 Thread Anup reni
How to store this 3 dimensional data in Mysql database for plotting on map? ​ -- https://mail.python.org/mailman/listinfo/python-list

Re: Do you think a DB based on Coroutine and AsyncIO is a good idea? I have written a demo on GitHub.

2016-06-02 Thread Lawrence D’Oliveiro
On Thursday, May 26, 2016 at 8:56:44 AM UTC+12, jimz...@gmail.com wrote: > I think in-process DB is quite popular in less serious development, e.g. > SQLite. “less serious”!? It’s the world’s most popular DBMS! There’s likely a copy in your pocket or purse right now. -- https://mail.python.org/

Re: [Python-Dev] Python 3.6.0a1 is now available

2016-06-02 Thread Lawrence D’Oliveiro
On Tuesday, May 24, 2016 at 8:10:48 PM UTC+12, Terry Reedy wrote: > I don't know what will happen if 'Windows 10' continues indefinitely, > even as it mutates internally. As Microsoft adds more and more Linux APIs, maybe you could migrate to using those. ;) -- https://mail.python.org/mailman/li

Re: Multiple inheritance, super() and changing signature

2016-06-02 Thread Lawrence D’Oliveiro
On Wednesday, June 1, 2016 at 8:02:14 AM UTC+12, Ben Finney wrote: > (Note that ‘__init__’ is not a constructor, because it operates on the > *already constructed* instance, and does not return anything. Believe it or not, that *is* what “constructor” means in every OO language. Technically it sh

Re: Efficient handling of fast, real-time hex data

2016-06-02 Thread alister
On Thu, 02 Jun 2016 18:50:34 +1200, Gregory Ewing wrote: > jlada...@itu.edu wrote: >> One common data transmission error I've seen in other systems is >> added/dropped bytes. I may add a CRC-8 error-checking byte in place of >> the newline. > > Also maybe add a start byte with a known value at th