Python – my experience so far Jason Chapman © JAC2 Consultancy Ltd 2015 07966 211 959

Slides:



Advertisements
Similar presentations
Programming for Beginners
Advertisements

Guy Griffiths. General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party.
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Introduction to Python. Outline Python IS ……. History Installation Data Structures Flow of Control Functions Modules References.
Linux & Shell Scripting Small Group Lecture 4 How to Learn to Code Workshop group/ Erin.
G51FSE Version Control Naisan Benatar. Lecture 5 - Version Control 2 On today’s menu... The problems with lots of code and lots of people Version control.
Create Your Own Webpage. Today’s Agenda Cut & paste code Notepad++ or Notepad at home FTP Web Hosting Wordpress.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
Recitation 1 Programming for Engineers in Python.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
CIT 590 Intro to Programming Last lecture on Python.
Introduction to Python Kris Kneubuhler SE NPUG July 17 th 2014.
Android Club Joe Richard. Welcome Rakhimov Gayrat – JOE Global Solutions (BI, CBU, MedApp) WIUT Sunet Technology (QMS, WM) Ice breaking.
PHP HYPERTEXT: PREPROCESSOR By: Justin T. Pleva. WHAT IS PHP?  General purpose  Server-side web development  Console application.
Web Sites for amateur radio. So You want to make a Web Site? There are several things you need to know about web sites before you start to think about.
Introduction to Python
Freebies from the Web Hank Maier The Things Bill Gates Never Told Me or.
CIT 590 Intro to Programming Last lecture on Python.
Introduction to Python By Neil Cook Twitter: njcuk Slides/Notes:
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
SQL Server User Group Meeting Reporting Services Tips & Tricks Presented by Jason Buck of Custom Business Solutions.
Problem of the Day  Why are manhole covers round?
Installing, Configuring And Troubleshooting Coldfusion Mark A Kruger CFG Ryan Stille CF Webtools.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
CS107 References and Arrays By Chris Pable Spring 2009.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
BIT 286: Web Applications Automated Web Testing. Selenium  Selenium Is moving from being Firefox based to being more of a 'normal desktop' program that.
Introduction to Information Security Python. Python motivation Python is to a Hacker what Matlab is to an engineer Lots of built-in modules Lots of 3.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 4: Writing programs.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
REFERENCE: CHAPTER 1 High-level languages + Python.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Python 1 SIGCS 1 Intro to Python March 7, 2012 Presented by Pamela A Moore & Zenia C Bahorski 1.
Introduction to: Python and OpenSesame FOR PROS. OpenSesame In OpenSesame you can add Python in-line codes which enables complex experiment. We will go.
8/2/07. >>> About Me Scott Shawcroft * Junior * Computer Engineering * Third Quarter TA * Creative Commons Intern * Small-time Open Source Developer
TypeScript for Alfresco and CMIS Steve Reiner CTO Integrated Semantics.
Presented by Dave Mawdsley, DACS Linux Workshop Leader/Member
The full name of PERL is Practical extraction and report language. It is similar to shell script and lot easier & powerful language. Perl is free to download.
Presented by Dave Mawdsley, DACS Linux Workshop Leader/Member
Stress Free Deployments with Octopus Deploy
Introduction to GIS PythonScript CGIS-NURIntroduction to ArcGIS II.
Let the group project commence!
Intro To Pete Alonzi University of Virginia Library
PYTHON: AN INTRODUCTION
Revision Control, Automated Testing and Docker RSE Conference 2017
IST256 : Applications Programming for Information Systems
Do you know this browser?...
CS190/295 Programming in Python for Life Sciences: Lecture 1
Automating reports with Python
Pedro Worcel – OWASP AKL Security-Assessment.com
Using Mach153A Lecture Tools
Working with Linux Libraries in Delphi
Teaching London Computing
JavaScript.
Chapter 1: Programming Basics, Python History and Program Components
Input and Output Python3 Beginner #3.
CS2911 Week 3, Lab Today Thursday Friday Review Muddiest Point Lab 3
Numpy, pylab, matplotlib (follow-up)
Presentation transcript:

Python – my experience so far Jason Chapman © JAC2 Consultancy Ltd

The Next 60 mins Us Why are we looking at Python The Journey –Find out about it –Install it (may skip this bit) –Watch sum tuts (maybe [down with the lingo]) –Look at some code –Have a discussion about uses / weaknesses / alternatives

The Crew Me Jan Graham (blame him about the python talk) –Doing an OU course where python is a module Neil Andy Kath

Our Issue A lot of repetitive daily / weekly / monthly functions Disparate systems we need to consume data from –Wiki’s –Robots (as in small semi automates programs) –MS SBS report –EDI formats from suppliers They (suppliers) offer a mix of –API’s – notifications –Various format –FTP –…..

Python 2 major versions in use 2.x & 3.x Huge Dev community Known as a data manipulation language Interpreted Interactive (type straight into the console). –Demo a,b,c Case sensitive Layout / indent for compound statements, not bracing where to get python from 3.4

Todays use cases Line of business firebird backup –Backup on server (server side batch) –Zip –Copy off server to a local machine –Copy off sider on a “pull” from a remote machine –Restore every day –Send me an that all went wonderfully Usage stats from PBWorks –Have to do manually –Or use their API’s

Getting up to speed Graham took a course module Take a look at python env Komodo Edit 8.5 –Free version –Paid for version has a debugger – I think. I watched google 2.x lesson: – Demo…. hello, if, help etc

More stuff Strings & slices –String.lower –String[0] –a[1:3] (0 based, based up to, but not including) From 1..3, so the 2nd, 3rd and 4th char –a[1:] –a[-1] Lists – a little like strings Docs: Modules:

Package Installer –Python 3.4 includes a module called "pip" which helps greatly with installing 3rd party modules, in the past you had to install this manually. –You can use pip to easily install new modules in a very linux commandline type way: –In Windows open a cmd window and type: py -m pip install –That's it couldn't be easier!

Strings Strings: –In Python Strings are immutable, they cannot change e.g. myVar = "graham" myVar = "jason" –# all that has happened is myVar no longer points to "graham", a new string was created containing "jason" and variable repointed to it. "graham" is lost –Benefit of immutable Strings? –In python if a String variable has the same value as another variable the interpreter tries to recognise this and actually points both variables to the same string in memory! This is known as String interning.

Lets look at some code C:\cubbyjac2\Matt\JasonUKBug –Backup Check –wikistats Things to pick out –Sets –“with” to limit scope

Gotcha’s & Comments Seemed slow to run scripts Hurt my head a bit Tabs vs spaces –We broke one of the files by annotating in notepad++ and mixing tabs and spaces –-tt flag on invocation Google it, anything

Conclusion Very impressed with Grahams deliverables Why use Python and not Delphi –Notepad & py and you are away –Like batch files on steroids What is next for us –Very early days, I like what I see I think –Build some core modules –Consider a py debugger Resources – - v3 official docs websitehttps://docs.python.org/3/ – - v3 official tutorialshttps://docs.python.org/3/tutorial/index.html