Python’s Standard library part I

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming Lecture 10 API Review; Where Next.
Advertisements

As Presented by Jim Kring April 1, 2003
10/1/2014BCHB Edwards Python Modules and Basic File Parsing BCHB Lecture 10.
Learning Web development. 3(+1) Tier architecture PHP script Remote services Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC)
Guide To UNIX Using Linux Third Edition
Unix Shell Scripts. What are scripts ? Text files in certain format that are run by another program Examples: –Perl –Javascript –Shell scripts (we learn.
Chapter 6: Hostile Code Guide to Computer Network Security.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
Advanced File Processing
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 35 – Python Outline 35.1 Introduction First Python Program Python Keywords 35.2 Basic.
Selecting and Combining Tools F. Duveau 02/03/12 F. Duveau 02/03/12 Chapter 14.
CSCI 6962: Server-side Design and Programming Validation Tools in Java Server Faces.
By Zeng Sheng Liu. os - provides dozens of functions for interacting with the operating system >>> import os >>> os.system('time 0:02') 0 >>> os.getcwd()
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
BIF703 stdin, stdout, stderr Redirection. stdin, stdout, stderr Recall the Unix philosophy “do one thing well”. Unix has over one thousand commands (utilities)
Dedan Githae, BecA-ILRI Hub Introduction to Linux / UNIX OS MARI eBioKit Workshop; Nov , 2014.
By: Joshua O’Donoghue. Operating System Interface In order to interact with the operating system in python you will want to become familiar with the OS.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
By Ryan Smith The Standard Library In Python. Python’s “Batteries Included” Philosophy Python’s standard library was designed to be able to handle as.
Python’s Standard Library - Part I Josh Lawrence.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Guide to Linux Installation and Administration, 2e1 Chapter 7 The Role of the System Administrator.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
LINUX programming 1. INDEX UNIT-III PPT SLIDES Srl. No. Module as per Session planner Lecture No. PPT Slide No. 1.Problem solving approaches in Unix,Using.
Agenda Regular Expressions (Appendix A in Text) –Definition / Purpose –Commands that Use Regular Expressions –Using Regular Expressions –Using the Replacement.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
CS4710 Why Progam?. Why learn to program? Utility of programming skills: understand tools modify tools create your own automate repetitive tasks automate.
Overview Intro to functions What are functions? Why use functions? Defining functions Calling functions Documenting functions Top-down design Variable.
1 Automated Editing Electronic Reporting (ER) Steve Kocsis, NOAA Fisheries Juneau, Alaska.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
Python Documentation Projects Developers Day 8th International Python Conference 27 January 2000.
Python’s Standard Library Part I Joe Houpert CS265.
THE WEB CALENDAR PROJECT Presented by: Jasmine Thomas Supervisor: John Ebden.
Higher Computing Science 2016 Prelim Revision. Topics to revise Computational Constructs parameter passing (value and reference, formal and actual) sub-programs/routines,
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Productive Laziness with Python Programmability in SPSS Albert-Jan Roskam, PhD. Statistics Netherlands (CBS) ASSESS – York UK - October.
By: Aradhya Malhotra.  To interact with the OS in python you will want to become familiar with the OS module  The command “import os” is used for this.
Introduction to Python for System Administrators Toshio Kuratomi May 2011.
New Capabilities for SDMS: Entity Data Loader
CS240: Advanced Programming Concepts
Selenium HP Web Test Tool Training
CS 330 Class 7 Comments on Exam Programming plan for today:
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Modules and Packages Damian Gordon.
Python Modules and Basic File Parsing
Intro to Python Programming – Part II
University of Central Florida COP 3330 Object Oriented Programming
PYTHON: AN INTRODUCTION
Python Modules and Basic File Parsing
Existing Perl/Oracle Pipeline
Classes, Libraries & Packages
stdin, stdout, stderr Redirection
Object-Orientated Programming
CFS Community Day Core Flight System Command and Data Dictionary Utility December 4, 2017 NASA JSC/Kevin McCluney December 4, 2017.
Guide To UNIX Using Linux Third Edition
Chapter 6 Methods: A Deeper Look
MSIS 655 Advanced Business Applications Programming
Chapter Four UNIX File Processing.
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Geography 465 Managing Custom Python Script Tools
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Lab 4: Introduction to Scripting
Python Modules and Basic File Parsing
 A function is a named sequence of statement(s) that performs a computation. It contains  line of code(s) that are executed sequentially from top.
Web Application Development Using PHP
Presentation transcript:

Python’s Standard library part I Daniel Ciborowski CS 265 6/01/11

Operating System Interface OS module provides dozens of functions for interacting with the operating system Shutil module provides a higher level interface that is easier to use for file and directory management

File Wildcards The glob module provides a function for making file lists from directory wildcard searches

Command Line Arguments Utility scripts often process command line arguments, these arguments are stored in the sys module’s argv attribute as a list The following output results from running Python demo.py one two three

Error Output Redirection and Program Termination Stderr is useful for emitting warnings and error messages The most direct way to terminate a script is to use Sys.ext()

String Pattern Matching The re module provides regular expression tools for advanced string processing When only simple capabilities are needed, string methods are preferred because they are easier to read and debug

Mathematics The math modules gives access to the underlying C library functions for floating point math The random module provides tools for making random selections

Internet Access Number of modules for accessing the internet Urllib2 for retriving data Smtplib for sending mail

Dates and Times Datetime modules supplies classes for manipulating dates and times in both simple and complex ways Focus of implementation is on efficient member extraction for output formatting

Data Compression Common data archiving and compression formats are directly supported by modules including zlib, gzip, bz2, zipfile, tarfile

Performance Measurement Python provides measurement tools to determine relative performance of different approaches to the same problem

Quality Control The doctest module provides a tool for scanning a module and validating tests embedded in a program’s docstrings The unittest module allows a more comprehensive set of tests to be maintained in a separate file

Batteries Included Many larger packages are included that do not require user to have advanced knowledge Xmlrpclib and SimpleXMLRPCServer modules making implementing remote procedure calls simple, and do not require direct knowledge of XML The email package includes a complete toolset for building complex messages, like attachments, and implementing internet encoding CSV module supports direct reads and writes in a common database formate