Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread Rustom Mody
On Monday, May 8, 2017 at 12:48:03 PM UTC+5:30, Steven D'Aprano wrote: > http://www.asmeurer.com/python3-presentation/slides.html#1 Nice list thanks! Do you have a similar list of 10 awesome features of Python that you can't use because you refuse to upgrade from Java/C++ ? [Context: Ive to ta

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread jladasky
On Monday, May 8, 2017 at 5:09:33 PM UTC-7, justin walters wrote: > On Mon, May 8, 2017 at 3:40 PM, wrote: > > > Slide 15: > > > > > def sum(a, b, biteme=False): > > > if biteme: > > > shutil.rmtree('/') > > > else: > > > return a + b > > > > Now that's just evil. :^) > >

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread Tim Chase
On 2017-05-08 07:17, Steven D'Aprano wrote: > http://www.asmeurer.com/python3-presentation/slides.html#1 Just adding my regular beef about #5, the "everything is an iterator" in regards to the new tuple-unpacking when the wild-card is in the last position: >>> a,b, *c = range(10) >>> a 0

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread justin walters
On Mon, May 8, 2017 at 3:40 PM, wrote: > Slide 15: > > > def sum(a, b, biteme=False): > > if biteme: > > shutil.rmtree('/') > > else: > > return a + b > > Now that's just evil. :^) > -- > https://mail.python.org/mailman/listinfo/python-list > I sincerely hope no-one is t

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread jladasky
Slide 15: > def sum(a, b, biteme=False): > if biteme: > shutil.rmtree('/') > else: > return a + b Now that's just evil. :^) -- https://mail.python.org/mailman/listinfo/python-list

Re: I want to learn Python and how to benefit from the great Data Science packages - have some questions.

2017-05-08 Thread Rustom Mody
On Sunday, May 7, 2017 at 1:03:57 AM UTC+5:30, Rahim Shamsy wrote: > Hi, > > Hope you are well. I am currently in the process of learning the basics of > programming in Python, and was just checking if I am in the right direction. The tutorial https://docs.python.org/3/tutorial/ is short and g

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread justin walters
On Mon, May 8, 2017 at 9:07 AM, Chris Angelico wrote: > On Tue, May 9, 2017 at 1:02 AM, Ian Kelly wrote: > > Slide 58: "Not going to lie to you. I still don't get this." Uh, sure, > > great sales pitch there. If the author doesn't understand asyncio, then > why > > include it in the list? > > IM

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread Chris Angelico
On Tue, May 9, 2017 at 1:02 AM, Ian Kelly wrote: > Slide 58: "Not going to lie to you. I still don't get this." Uh, sure, > great sales pitch there. If the author doesn't understand asyncio, then why > include it in the list? IMO he doesn't understand it because he's aiming at Python 3.4. Aim at

Refactoring tool to create Python functions

2017-05-08 Thread beliavsky--- via Python-list
Googling "refactoring python code to create functions" I came to https://wingware.com/doc/intro/tutorial-refactoring where the "Extract Function/Method" does what I want. Is there a free Python tool that does this? -- https://mail.python.org/mailman/listinfo/python-list

Re: Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread Ian Kelly
Overall a nice preso. I disagree with the slides on a few points. Slide 8: I don't see why I would want to refactor def f(a, b, *args): stuff into def f(*args): a, b, *args = args stuff The first one has a cleaner signature and is also shorter. Slide 55: What makes the "Better" ex

EuroPython 2017 Keynote: Jan Willem Tulp

2017-05-08 Thread M.-A. Lemburg
We are pleased to announce our next keynote speaker for EuroPython 2017: * Jan Willem Tulp * About Jan Willem Tulp - Jan Willem Tulp is an award winning data experience designer from The Netherlands. With his one-man company TULP interactive he create

Re: packaging python code

2017-05-08 Thread Mahmood Naderan via Python-list
OK. I did that but it fails! Please see the stack D:\ThinkPad\Documents\NetBeansProjects\ExcelTest>pyinstaller exread.py 96 INFO: PyInstaller: 3.2.1 96 INFO: Python: 3.6.1 98 INFO: Platform: Windows-10-10.0.14393-SP0 103 INFO: wrote D:\ThinkPad\Documents\NetBeansProjects\ExcelTest\exread.spec

Re: [GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread Heck Lennon
On Monday, May 8, 2017 at 3:45:43 PM UTC+2, Fabien wrote: > Yes, you could also have a look at the excellent libraries: > - Geopandas: http://geopandas.org/ > - Shapely: http://toblerity.org/shapely/manual.html Thank you. I'll see if I can figure out how to do this. -- https://mail.python.org/mai

Re: [GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread Fabien
On 05/08/2017 02:34 PM, Heck Lennon wrote: To plan bike tours, I'd like to… 1) import a trace from a GPX file, 2) import Archie's list for a given country, 3) filter that list to only keep campsites that are 5 kms from the route, and 4) export the output to a GPX file. Since a "gpxpy" Python mod

Re: [GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread Heck Lennon
On Monday, May 8, 2017 at 3:06:44 PM UTC+2, Lutz Horn wrote: > > Problem is, files are only country-size, so the number of waypoints is > > overwhelming (Here's the UK for instance**). > > How many is 'overwhelming'? If you click on the screenshot I posted, it looks like thousands of POIs, while

Re: [GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread Lutz Horn
Problem is, files are only country-size, so the number of waypoints is overwhelming (Here's the UK for instance**). How many is 'overwhelming'? Lutz -- https://mail.python.org/mailman/listinfo/python-list

[GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread Heck Lennon
Hello Archie's Campings* offers a pretty thorough list of campsites in Europe. Problem is, files are only country-size, so the number of waypoints is overwhelming (Here's the UK for instance**). To plan bike tours, I'd like to… 1) import a trace from a GPX file, 2) import Archie's list for a gi

[GIS] Keeping only POIs X kms from a trace?

2017-05-08 Thread frdtheman
Hello Archie's Campings* offers a pretty thorough list of campsites in Europe. Problem is, files are only country-size, so the number of waypoints is overwhelming (Here's the UK for instance**). To plan bike tours, I'd like to… 1) import a trace from a GPX file, 2) import Archie's list for a gi

Re: Key differences between Python 2 and 3 with examples

2017-05-08 Thread Ben Finney
Chris Angelico writes: > On Mon, May 8, 2017 at 5:57 PM, Steven D'Aprano wrote: > > http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html > > Error in page: Good catch. But the author likely won't read this message. You can contact them via email with that correction, according to

Re: packaging python code

2017-05-08 Thread Lutz Horn
Is there any way to pack my .py with all required libraries and create a self running package? Take a look at PyInstaller: * http://www.pyinstaller.org/ * https://pyinstaller.readthedocs.io/en/stable/ Lutz -- https://mail.python.org/mailman/listinfo/python-list

packaging python code

2017-05-08 Thread Mahmood Naderan via Python-list
Hi, I have simple piece of code which uses two libraries (numpy and openpyxl). The script is called from another application. Currently, if someone wants to run my program, he has to first install the python completely via its installer. Is there any way to pack my .py with all required librarie

Re: Practice Python

2017-05-08 Thread Lutz Horn
Python - Exercise 5 Do you want us to solve these problems for you? The answers here: https://www.youtube.com/watch?v=nwHPM9WNyw8&t=36s A strange way to publish code. Lutz -- https://mail.python.org/mailman/listinfo/python-list

Re: Key differences between Python 2 and 3 with examples

2017-05-08 Thread Chris Angelico
On Mon, May 8, 2017 at 5:57 PM, Steven D'Aprano wrote: > And no, it's not just that Python 3 is The Future[1] and Python 2 is The > Past. > > > http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html > Error in page: print('Python', python_version()) print('strings are now utf-8 \u03B

Key differences between Python 2 and 3 with examples

2017-05-08 Thread Steven D'Aprano
And no, it's not just that Python 3 is The Future[1] and Python 2 is The Past. http://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html [1] https://circleci.com/blog/its-the-future/ -- Steve Emoji: a small, fuzzy, indistinct picture used to replace a clear and perfectly compr

Ten awesome things you are missing out on if you're still using Python 2

2017-05-08 Thread Steven D'Aprano
http://www.asmeurer.com/python3-presentation/slides.html#1 (The web UI is a bit ~~crap~~ minimialist. Use the left and right arrow keys to advance backwards and forwards among the slides.) -- Steve Emoji: a small, fuzzy, indistinct picture used to replace a clear and perfectly comprehensibl