RasPi Magazine 13, Raspberry PI, RasPI - Magazyn 2015

[ Pobierz całość w formacie PDF ]
//-->ESIGNDUILDBCODE13WHY YOU NEEDAirPlaySpeakersSet upPlusMake a digital photo frameWelcomeThe big focus this month isPython 3. You see, despite thefact that vast numbers of uscode in the deprecated Python2.7, we do need to switch to the more modernyet often neglected version of the language.One of the biggest reasons is the upcomingend-of-life date for Python 2.7, and the factthat the devs are very clear about there notbeing a version 2.8. So it’s time to get up tospeed, and this month we give you a flyingstart. Sticking with the Python theme, we’realso looking at how to optimise your code tomake it run faster on the Pi. Plus, we havea cool selection of projects for you to try outthis weekend, too – including a digital photoframe and a wireless stereo system. Enjoy!Get inspiredDiscover the RasPicommunity’s best projectsExpert adviceGot a question? Get in touchand we’ll give you a handEasy-to-followguidesLearn to make and codegadgets with Raspberry PiEditorFrom the makers ofJoin the conversation at…@linuxuse@linuxusermagLiLinux User & DeveloperUD lDevelopeRasPi@imagine-publishing.co.ukContentsWhy you need Python 3It’s time to finally make the switchPiKonShooting the Moon with a 3D-printed telescopeMake a digital photo frameCombine signage software with the HDMIPiWhat are the extra GPIO pins?How did they improve on the original models?Set up a wireless AirPlay speakerExpand it into a full stereo system for your houseRemotely control your PiUse a web interface to connect instead of SSHOptimising code for your PiProfile your code to figure out the slow spotsTalking PiYour questions answered and your opinions sharedWhy you need Python 3Bring your programming skills up to date by finallyletting go of Python 2 and embracingthe better languagePython 3 has been languishing. There havebeen many good reasons for this, including alack of dependencies, monolithic code baseswritten in Python 2 that are costly to port across, andalso the prevalence of tutorials such as those found inthis magazine that continue to focus on the outdated 2.xversions, among many other reasons. One of the commonthreads uniting all these reasons not to use Python 3is a sense that there aren’t enough people actuallyprogramming in Python 3 to help spread its adoption. Afew years ago (we’ve had Python 3 for seven now), thingslike the lack of dependencies were real inhibiting factors,but the situation has vastly improved since then and someof these reasons just don’t hold up any more.So why haven’t people switched yet? Part of theproblem is perhaps down to the dual support of bothPython 2 and Python 3 by its developers, but in any casethere is no real reason nowadays to continue writing codein the deprecated version of Python. Momentum is neededfrom the community in order to successfully make the leapfrom Python 2 to the much, much better Python 3, and toensure that Python isn’t abandoned altogether in favour ofRuby or Go, for example.The adoption of Python 3 by the community issomething that we personally believe in here atRasPiand,since we regularly write Python tutorials for you, it makessense for us practise what we preach. We won’t throw youinto the deep end immediately, but over the coming monthswe are going to begin transitioning across to using Python3 ourselves. When you download your tutorial assets eachissue, keep an eye out for the Python 3 files that we’ll beadding. For now, though, read through our Python 3 primerand we’ll get you started with this fantastic programminglanguage today.“Momentumisneeded fromthe communityin order tosuccessfullymake the leapfrom Python2 to the much,much betterPython 3” [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • agraffka.pev.pl