[CentralOH] from __future__ import print function

timothy spencer smashing_good_show at hotmail.com
Thu May 21 17:39:53 CEST 2015


Tim here, reporting in. I am going through Zed Shaw's book again for review, and this time I am using the "from __future__ import print_function" line because using () with the print() is the proper way to print things. Zed's book doesn't use that, and I am noticing some very different things I need to do with printing the syntax. I can show some examples on Friday if people like.

> From: centraloh-request at python.org
> Subject: CentralOH Digest, Vol 96, Issue 6
> To: centraloh at python.org
> Date: Wed, 8 Apr 2015 12:00:02 +0200
> 
> Send CentralOH mailing list submissions to
> 	centraloh at python.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mail.python.org/mailman/listinfo/centraloh
> or, via email, send a message with subject or body 'help' to
> 	centraloh-request at python.org
> 
> You can reach the person managing the list at
> 	centraloh-owner at python.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of CentralOH digest..."
> 
> 
> Today's Topics:
> 
>    1. Nuitka Compiler Docs (James Bonanno)
>    2. Code by voice video (timothy spencer)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 07 Apr 2015 06:41:05 -0400
> From: James Bonanno <james at atlantixeng.com>
> To: centraloh at python.org
> Subject: [CentralOH] Nuitka Compiler Docs
> Message-ID: <5523B441.4030907 at atlantixeng.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> One more note on Nuitka. It seems to be well supported by it's author; 
> and there are installers for just above every platform. The user manual 
> and other documentation can be found here:
> 
> http://nuitka.net/doc/user-manual.htmln
> 
> I am still looking at doing one more more basic programs with Theano or 
> Shedskin, and then adding those to the Cython Bootstrap notebook file... 
> The amount of optimizing compilers for Python is now quite large.
> 
> James
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 7 Apr 2015 05:52:12 -0700
> From: timothy spencer <smashing_good_show at hotmail.com>
> To: "centraloh at python.org" <centraloh at python.org>
> Subject: [CentralOH] Code by voice video
> Message-ID: <SNT148-W2429A4DF696D3AAB422634CBFD0 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> I found another video of coding by voice. This one is with VB, but still pretty neat. He is also using the Dragon software from Nuance.
> 
> > From: centraloh-request at python.org
> > Subject: CentralOH Digest, Vol 96, Issue 5
> > To: centraloh at python.org
> > Date: Tue, 7 Apr 2015 12:00:02 +0200
> > 
> > Send CentralOH mailing list submissions to
> > 	centraloh at python.org
> > 
> > To subscribe or unsubscribe via the World Wide Web, visit
> > 	https://mail.python.org/mailman/listinfo/centraloh
> > or, via email, send a message with subject or body 'help' to
> > 	centraloh-request at python.org
> > 
> > You can reach the person managing the list at
> > 	centraloh-owner at python.org
> > 
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of CentralOH digest..."
> > 
> > 
> > Today's Topics:
> > 
> >    1. Re: not as sexy as efloehr's cloud graphing.... (Eric Miller)
> >    2. Nuitka vs Cython (James Bonanno)
> > 
> > 
> > ----------------------------------------------------------------------
> > 
> > Message: 1
> > Date: Mon, 6 Apr 2015 09:35:38 -0400
> > From: Eric Miller <miller.eric.t at gmail.com>
> > To: "Mailing list for Central Ohio Python User Group (COhPy)"
> > 	<centraloh at python.org>
> > Subject: Re: [CentralOH] not as sexy as efloehr's cloud graphing....
> > Message-ID:
> > 	<CAN67YM5tB+j+79wtRL-W6tsW_F+x1naB1irPg3nfgTuLKzBnYA at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> > 
> > here's a better version.  Switched to statsd/grafana
> > 
> > https://www.hostedgraphite.com/7cc81a60/grafana/#dashboard/temp/e6c6a737196e70ca561009cf6bc6abd7b41a4402
> > 
> > On Sun, Apr 5, 2015 at 8:26 PM, Eric Floehr <eric at intellovations.com> wrote:
> > 
> > > Oh that's awesome! And I never would have thought to use something like
> > > Librato for this, so double awesome.
> > >
> > > But why didn't you tell me I was supposed to wait to press the button?
> > > That you could only press it once! :-)
> > >
> > > Thanks for sharing that!
> > >
> > > On Sun, Apr 5, 2015 at 12:02 AM, Eric Miller <miller.eric.t at gmail.com>
> > > wrote:
> > >
> > >> ...but, still chuckleworthy I hope.
> > >>
> > >>
> > >> http://www.reddit.com/r/thebutton/comments/31hk2g/realtime_graph_to_predict_the_ultimate_heat_death/
> > >>
> > >> Please excuse the lazy error handling, lack of comments, and the obvious
> > >> need to make functions in at least two places.  I was just screwing
> > >> around...
> > >>
> > >> from lxml import htmlimport requestsimport timeimport librato
> > >>
> > >> user = 'yourLibratoEmail at gmail.com'
> > >> token = 'your_____API____________key'
> > >> api = librato.connect(user, token)
> > >> while True:
> > >>         try:
> > >>                 page = requests.get('http://www.reddit.com/r/thebutton')
> > >>                 tree = html.fromstring(page.text)
> > >>                 participants = tree.xpath('//span[@class="thebutton-participants"]/text()')
> > >>                 numbers = tree.xpath('//span[@class="number"]/text()')
> > >>
> > >>                 page = requests.get('http://www.reddit.com/about')
> > >>                 tree = html.fromstring(page.text)
> > >>                 dailyStats = tree.xpath('//div[@class="value"]/text()')
> > >>
> > >>                 pressers = participants[0]
> > >>                 subcribers = numbers[0]
> > >>                 activeViewers = numbers[1]
> > >>                 dailyRedditUsers = dailyStats[4]
> > >>
> > >>                 pressers = pressers.replace(',', '')
> > >>                 subcribers = subcribers.replace(',', '')
> > >>                 activeViewers = activeViewers.replace(',', '')
> > >>                 dailyRedditUsers = dailyRedditUsers.replace(',', '')
> > >>
> > >>                 api.submit("pressers", pressers)
> > >>                 api.submit("subcribers", subcribers)
> > >>                 api.submit("activeViewers", activeViewers)
> > >>                 api.submit("dailyRedditUsers", dailyRedditUsers)
> > >>
> > >>                 print pressers
> > >>                 print subcribers
> > >>                 print activeViewers
> > >>                 print dailyRedditUsers
> > >>
> > >>                 time.sleep(5)
> > >>         except:
> > >>                 continue
> > >>
> > >>
> > >> _______________________________________________
> > >> CentralOH mailing list
> > >> CentralOH at python.org
> > >> https://mail.python.org/mailman/listinfo/centraloh
> > >>
> > >>
> > >
> > > _______________________________________________
> > > CentralOH mailing list
> > > CentralOH at python.org
> > > https://mail.python.org/mailman/listinfo/centraloh
> > >
> > >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <http://mail.python.org/pipermail/centraloh/attachments/20150406/12a54b63/attachment-0001.html>
> > 
> > ------------------------------
> > 
> > Message: 2
> > Date: Mon, 06 Apr 2015 10:05:35 -0400
> > From: James Bonanno <james at atlantixeng.com>
> > To: centraloh at python.org
> > Subject: [CentralOH] Nuitka vs Cython
> > Message-ID: <552292AF.6020409 at atlantixeng.com>
> > Content-Type: text/plain; charset=utf-8; format=flowed
> > 
> > In another follow up from last week, I compiled some basic programs with 
> > Nuitka. It's actually somewhat impressive that you can compile a static 
> > python program to a standalone C++ executable. For the various reasons 
> > that I talked about last week, I still prefer Cython. However, Nuitka is 
> > promising ...
> > 
> > Below I show a python file, math.py, that is compile to an executable in 
> > one command line statement.
> > 
> > %% file math.py
> > 
> > def fib(n):
> >      """Print the Fibonacci series up to n."""
> >      a, b  = 0, 1
> >      index = 0
> >      while b < n:
> >          print ("%d, %d, \n" % (index, b) )
> >          a, b   = b, a + b
> >          index += 1
> > 
> > 
> > if __name__=="__main__":
> >      fib(1000)
> > 
> > Here I compile with Nuitka and execute, in standalone mode:
> > 
> > james at saturn9 ~/crc $ nuitka --execute --standalone math.py
> > 0, 1,
> > 
> > 1, 1,
> > 
> > 2, 2,
> > 
> > 3, 3,
> > 
> > 4, 5,
> > 
> > 5, 8,
> > 
> > 6, 13,
> > 
> > 7, 21,
> > 
> > 8, 34,
> > 
> > 9, 55,
> > 
> > 10, 89,
> > 
> > 11, 144,
> > 
> > 12, 233,
> > 
> > 13, 377,
> > 
> > 14, 610,
> > 
> > 15, 987,
> > 
> > 
> > 
> > ------------------------------
> > 
> > Subject: Digest Footer
> > 
> > _______________________________________________
> > CentralOH mailing list
> > CentralOH at python.org
> > https://mail.python.org/mailman/listinfo/centraloh
> > 
> > 
> > ------------------------------
> > 
> > End of CentralOH Digest, Vol 96, Issue 5
> > ****************************************
>  		 	   		  
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mail.python.org/pipermail/centraloh/attachments/20150407/12e7dcfe/attachment-0001.html>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> https://mail.python.org/mailman/listinfo/centraloh
> 
> 
> ------------------------------
> 
> End of CentralOH Digest, Vol 96, Issue 6
> ****************************************
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20150521/94432e95/attachment.html>


More information about the CentralOH mailing list