From barry at python.org Fri Jan 11 23:01:45 2013 From: barry at python.org (Barry Warsaw) Date: Fri, 11 Jan 2013 17:01:45 -0500 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 Message-ID: <20130111170145.31d8e74c@anarchist.wooz.org> Since this year ends in a '3', let's call 2013 The Year of Python 3. To that end, I'm planning on leading a Python 3 Porting Clinic at Pycon 2013. My thought is that we would do at least one Open Spaces session in the evening of the conference proper, probably on the first night, and depending on turnout and interest, do one or more on the following nights. We'd give a brief primer on porting, and invite people to come and get help porting their libraries and applications to Python 3. The Pycon organizers seem enthusiastic about this, so I think we can get some good publicity. I'm happy to put together some preliminary material, and lead the effort, but I'd love it if a few other people with lots of porting experience also volunteer to help. If you have the experience and interest to help co-lead, answer questions, etc. please contact me off-list. I'll put together a wiki page on the Pycon site your names, etc. Thoughts? Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From facundobatista at gmail.com Sat Jan 12 02:59:31 2013 From: facundobatista at gmail.com (Facundo Batista) Date: Fri, 11 Jan 2013 22:59:31 -0300 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: <20130111170145.31d8e74c@anarchist.wooz.org> References: <20130111170145.31d8e74c@anarchist.wooz.org> Message-ID: On Fri, Jan 11, 2013 at 7:01 PM, Barry Warsaw wrote: > To that end, I'm planning on leading a Python 3 Porting Clinic at Pycon 2013. > My thought is that we would do at least one Open Spaces session in the evening > of the conference proper, probably on the first night, and depending on > turnout and interest, do one or more on the following nights. We'd give a > brief primer on porting, and invite people to come and get help porting their > libraries and applications to Python 3. I will not be in PyCon USA this year, but I think this is a very interesting idea... let's try to reproduce it in every Python event we assist, being it a PyCon, a PyDay, a PyCamp, a PyWhatever, wherever. Thanks Barry! -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ Twitter: @facundobatista From barry at python.org Sat Jan 12 18:02:29 2013 From: barry at python.org (Barry Warsaw) Date: Sat, 12 Jan 2013 12:02:29 -0500 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: References: <20130111170145.31d8e74c@anarchist.wooz.org> Message-ID: <20130112120229.26a78586@anarchist.wooz.org> On Jan 11, 2013, at 10:59 PM, Facundo Batista wrote: >I will not be in PyCon USA this year, but I think this is a very >interesting idea... let's try to reproduce it in every Python event we >assist, being it a PyCon, a PyDay, a PyCamp, a PyWhatever, wherever. > >Thanks Barry! Sure thing. :) BTW, I've started putting together a quick tips page and a collection of references: https://wiki.ubuntu.com/Python/3 It really doesn't need to be Ubuntu specific, so if we can find a more generic home for this, I'm happy to migrate it. -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From barry at python.org Mon Jan 14 11:37:38 2013 From: barry at python.org (Barry Warsaw) Date: Mon, 14 Jan 2013 05:37:38 -0500 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: References: <20130111170145.31d8e74c@anarchist.wooz.org> <20130112120229.26a78586@anarchist.wooz.org> Message-ID: <20130114053738.09259ab0@anarchist.wooz.org> On Jan 12, 2013, at 01:30 PM, Brett Cannon wrote: >Why not the porting howto? Still need to re-orient towards common code over >2to3. Do you mean Lennart's book at http://python3porting.com/ ? Is there a branch available for hacking on? -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From regebro at gmail.com Mon Jan 14 21:44:56 2013 From: regebro at gmail.com (Lennart Regebro) Date: Mon, 14 Jan 2013 21:44:56 +0100 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: <20130114053738.09259ab0@anarchist.wooz.org> References: <20130111170145.31d8e74c@anarchist.wooz.org> <20130112120229.26a78586@anarchist.wooz.org> <20130114053738.09259ab0@anarchist.wooz.org> Message-ID: On Mon, Jan 14, 2013 at 11:37 AM, Barry Warsaw wrote: > Do you mean Lennart's book at http://python3porting.com/ ? Is there a branch > available for hacking on? Nope. I've though about making that possible, but currently decided against it. I'm thinking about a second edition though, but I have no time for the moment. From merwok at netwok.org Mon Jan 14 22:06:10 2013 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Mon, 14 Jan 2013 16:06:10 -0500 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: <20130114053738.09259ab0@anarchist.wooz.org> References: <20130111170145.31d8e74c@anarchist.wooz.org> <20130112120229.26a78586@anarchist.wooz.org> <20130114053738.09259ab0@anarchist.wooz.org> Message-ID: <50F47342.5040904@netwok.org> Le 14/01/2013 05:37, Barry Warsaw a ?crit : > On Jan 12, 2013, at 01:30 PM, Brett Cannon wrote: >> Why not the porting howto? Still need to re-orient towards common code over >> 2to3. > > Do you mean Lennart's book at http://python3porting.com/ ? I assume Brett was thinking about the Python and C porting howtos in the official documentation. Regards From brett at yvrsfo.ca Sat Jan 12 19:30:38 2013 From: brett at yvrsfo.ca (Brett Cannon) Date: Sat, 12 Jan 2013 13:30:38 -0500 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: <20130112120229.26a78586@anarchist.wooz.org> References: <20130111170145.31d8e74c@anarchist.wooz.org> <20130112120229.26a78586@anarchist.wooz.org> Message-ID: Why not the porting howto? Still need to re-orient towards common code over 2to3. On Jan 12, 2013 12:02 PM, "Barry Warsaw" wrote: > On Jan 11, 2013, at 10:59 PM, Facundo Batista wrote: > > >I will not be in PyCon USA this year, but I think this is a very > >interesting idea... let's try to reproduce it in every Python event we > >assist, being it a PyCon, a PyDay, a PyCamp, a PyWhatever, wherever. > > > >Thanks Barry! > > Sure thing. :) > > BTW, I've started putting together a quick tips page and a collection of > references: > > https://wiki.ubuntu.com/Python/3 > > It really doesn't need to be Ubuntu specific, so if we can find a more > generic > home for this, I'm happy to migrate it. > > -Barry > > _______________________________________________ > Python-porting mailing list > Python-porting at python.org > http://mail.python.org/mailman/listinfo/python-porting > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brett at yvrsfo.ca Mon Jan 14 21:20:32 2013 From: brett at yvrsfo.ca (Brett Cannon) Date: Mon, 14 Jan 2013 15:20:32 -0500 Subject: [Python-porting] Python 3 porting clinic at Pycon 2013 In-Reply-To: <20130114053738.09259ab0@anarchist.wooz.org> References: <20130111170145.31d8e74c@anarchist.wooz.org> <20130112120229.26a78586@anarchist.wooz.org> <20130114053738.09259ab0@anarchist.wooz.org> Message-ID: No, I meant http://docs.python.org/3/howto/pyporting.html On Mon, Jan 14, 2013 at 5:37 AM, Barry Warsaw wrote: > On Jan 12, 2013, at 01:30 PM, Brett Cannon wrote: > >>Why not the porting howto? Still need to re-orient towards common code over >>2to3. > > Do you mean Lennart's book at http://python3porting.com/ ? Is there a branch > available for hacking on? > > -Barry From glez_b at comunidad.unam.mx Tue Jan 29 06:41:03 2013 From: glez_b at comunidad.unam.mx (Boris Vladimir Comi) Date: Tue, 29 Jan 2013 05:41:03 +0000 Subject: [Python-porting] Plot trajectories on an map using matplotlib-basemap Message-ID: <9D6FC4172EA6B64B9044B9B8196DBB250E009F3C@BL2PRD0710MB373.namprd07.prod.outlook.com> #! /usr/bin/python import numpy as np data = np.loadtxt('path-tracks.csv',dtype=np.str,delimiter=',',skiprows=1) print data [['19.70' '-95.20' '2/5/04 6:45 AM' '1' '-38' 'CCM'] ['19.70' '-94.70' '2/5/04 7:45 AM' '1' '-48' 'CCM'] ['19.30' '-93.90' '2/5/04 8:45 AM' '1' '-60' 'CCM'] ['19.00' '-93.50' '2/5/04 9:45 AM' '1' '-58' 'CCM'] ['19.00' '-92.80' '2/5/04 10:45 AM' '1' '-50' 'CCM'] ['19.20' '-92.60' '2/5/04 11:45 AM' '1' '-40' 'CCM'] ['19.90' '-93.00' '2/5/04 12:45 PM' '1' '-43' 'CCM'] ['20.00' '-92.80' '2/5/04 1:15 PM' '1' '-32' 'CCM'] ['23.10' '-100.20' '30/5/04 4:45 AM' '2' '-45' 'SCME'] ['23.20' '-100.00' '30/5/04 5:45 AM' '2' '-56' 'SCME'] ['23.30' '-100.00' '30/5/04 6:45 AM' '2' '-48' 'SCME'] ['23.30' '-100.20' '30/5/04 7:45 AM' '2' '-32' 'SCME'] ['23.40' '-99.00' '31/5/04 3:15 AM' '3' '-36' 'SCM'] ['23.50' '-98.90' '31/5/04 4:15 AM' '3' '-46' 'SCM'] ['23.60' '-98.70' '31/5/04 5:15 AM' '3' '-68' 'SCM'] ['23.70' '-98.80' '31/5/04 6:15 AM' '3' '-30' 'SCM']] with the above code I get an array whose columns represent: [Lat, Lon, Date, Identifier, Temperatures, Category]. Now, I will put a code that allows me to plot the first and second column on the map of Mexico: #!/usr/bin/python #Project Storm: Plot trajectories of convective systems #import libraries import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as pl # Plot a map for Mexico m = Basemap(projection='cyl', llcrnrlat=12, urcrnrlat=35,llcrnrlon=-120, urcrnrlon=-80, resolution='c', area_thresh=1000.) m.bluemarble() m.drawcoastlines(linewidth=0.5) m.drawcountries(linewidth=0.5) m.drawstates(linewidth=0.5) #Draw parallels and meridians m.drawparallels(np.arange(10.,35.,5.)) m.drawmeridians(np.arange(-120.,-80.,10.)) m.drawmapboundary(fill_color='aqua') #Open file whit numpy data = np.loadtxt('path-tracks.csv', dtype=np.str,delimiter=' , ', skiprows=1) latitude = data[:,0] longitude = data[:,1] #Convert latitude and longitude to coordinates X and Y x, y = m(longitude, latitude) #Plot the points on the map pl.plot(x,y,'ro-') pl.show() The points plotted on the map, corresponding to three different paths with a line connecting all points. Mi final idea is to draw a line connecting the points associated with each path, How I can do this? or How should I structure my data to plot the different paths? is posible draw an identifier or a mark for each path? how I can set the size of the figure so that it can distinguish the separation between the points? -------------- next part -------------- An HTML attachment was scrubbed... URL: