SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Python® Documentation
& Startup
Presented 16 DEC 2010: Training Module Version 1.01
By Dr. R. Don Green, Ph.D.
Email: drdg@prodigy.net
Website: http://drdg.tripod.com
Prerequisites
• If needed, refer to and follow steps in:
– “Python® Installation” by Dr. R. Don Green, Ph.D.
• Or navigate directly to:
• “Nice to have” list:
– Trainees need access to Python® either during
training, or shortly thereafter, to assure they can
perform tasks illustrated in this module.
Python 2.7.1 –
Documentation
• Documentation about
Python is available from
http://www.python.org/
and other sources,
however, this module
discusses “installed
documentation.”
• Navigate to Python
– select:
“Python Manuals”
Python 2.7.1 –
“Python Manuals”
• “Python v2.7.1 documentation”
– The Python Tutorial, Glossary, etc.
Python 2.7.1 Startup –
“IDLE (Python GUI)”
• Navigate to the
Python 2.7 folder
and select:
“IDLE (Python GUI)”
Python 2.7.1 Startup –
selected “IDLE (Python GUI)”
• “Tk Python Shell” Graphical User Interface (GUI) opened.
Note: GUI is pronounced “gooey.”
– What is “IDLE”?
– What is “Tk Python Shell”?
• Note: a letter in a menu name may or may not be
underlined, for example File or File. Press the “Alt” key!
Python 2.7.1 Startup –
“Tk Python Shell”
• What is “Tk Python Shell”?
– “Tk” is (simply stated) the GUI Toolkit (library),
“Python” is the name of the “Shell,” i.e., the
interpreter’s dialogue portal.
IDLE 2.7.1 –
“Tk Python Shell” window Menu
• File, Edit, Shell, Debug, Options, Windows,
Help.
• Note Python version and related information.
IDLE 2.7.1 –
“Tk Python Shell” Help Menu
• “About IDLE”
• “IDLE Help”
• “Python Docs F1”
IDLE 2.7.1 –
“About IDLE”
• “IDLE” is
– “Python’s Integrated
DeveLopment Environment”
• Note versions for:
– Python (named after Monty
Python on television)
– Tk (i.e., a GUI Toolkit)
– IDLE
• IDLE is not the only Integrated
Development Environment (IDE):
– http://wiki.python.org/moin/Integrated
DevelopmentEnvironments
IDLE 2.7.1 –
“IDLE Help”
• Select “IDLE Help” or:
– Click on the “dotted line” at the top of a menu to "tear it
off," i.e., to create a separate window containing the menu
(shown on next slide).
– “Dotted line” (really, this is a dashed line)
IDLE – “Tear It Off” created a separate
window containing the related menu
• We clicked on the “dotted line” at the top of a menu to "tear it off:“
– A separate window containing the menu was created. Adjust the size of any window as desired.
IDLE 2.7.1 –
“File” menu
• “Tear It Off” – create a separate window containing the related menu
• New Window – Create a new editing window
• Open... – Open an existing file
• Recent Files... – Open a list of recent files
• Open Module... – Open an existing module (searches sys.path)
• Class Browser – Show classes and methods in current file
• Path Browser – Show sys.path directories, modules, classes and
methods
• Save – Save current window to the associated file (note - unsaved
windows have an asterisk (*) before and after the window title)
• Save As... – Save current window to new file, which becomes the
associated file
• Save Copy As... – Save current window to different file without
changing the associated file
• Print Window – Print the current window
• Close – Close current window (asks to save if unsaved)
• Exit – Close all windows, quit (asks to save if unsaved)
IDLE 2.7.1 –
“ Edit” Menu
• “Tear It Off” – create a separate window containing the related menu
• Undo – Undo last change to current window (A maximum of 1000 changes
may be undone)
• Redo – Redo last undone change to current window
• Cut – Copy a selection into system-wide clipboard, then delete the
selection
• Copy – Copy selection into system-wide clipboard
• Paste – Insert system-wide clipboard into window
• Select All – Select the entire contents of the edit buffer
• Find... – Open a search dialog box with many options
• Find Again – Repeat last search
• Find Selection – Search for the string in the selection
• Find in Files... – Open a search dialog box for searching files
• Replace... – Open a search-and-replace dialog box
• Go to Line – Ask for a line number and show that line
• Expand Word – Expand the word you have typed to match another word
in the same buffer; repeat to get a different expansion
• Show Call tip – Open a small window with function param hints
• Show surrounding parens – Highlight the surrounding parenthesis
• Show Completions – Open a scroll window allowing selection keywords
and attributes. (see '*TIPS*', below)
Run Menu (only in Edit window)
• Python Shell -- Open or wake up the Python
shell window
• ---
• Check Module -- Run a syntax check on the
module
• Run Module -- Execute the current file in the
__main__ namespace
IDLE 2.7.1 –
“ Shell” Menu (only in Shell window)
• “Tear It Off” – create a separate window
containing the related menu
• View Last Restart – Scroll the shell window to the
last restart
• Restart Shell – Restart the interpreter with a fresh
environment
IDLE 2.7.1 –
“Debug” Menu (only in Shell window)
• “Tear It Off” – create a separate window containing the
related menu
• Go to File/Line – look around the insert point for a filename
and line number, open the file, and show the line
• Debugger (toggle) – Run commands in the shell under the
debugger
• Stack Viewer – Show the stack traceback of the last
exception
• Auto-open Stack Viewer (toggle) – Open stack viewer on
traceback
IDLE 2.7.1 –
“Options” Menu
• “Tear It Off” – create a separate window containing the
related menu
• Configure IDLE – Open a configuration dialog. Fonts,
indentation, keybindings, and color themes may be altered.
Startup Preferences may be set, and Additional Help Sources
can be specified. On MacOS X this menu is not present, use
menu 'IDLE -> Preferences...' instead.
• Code Context – Open a pane at the top of the edit window
which shows the block context of the section of code which
is scrolling off the top or the window. (Not present in Shell
window.)
IDLE 2.7.1 –
“Windows” Menu
• “Tear It Off” – create a separate window containing the
related menu
• Zoom Height – toggles the window between configured size
and maximum height.
• The rest of this menu lists the names of all open windows;
select one to bring it to the foreground (de-icon-ifying it if
necessary).
Python® –
Alt key
• Tk Python Shell
– IDLE menu items are accessed with the mouse or Alt
key strokes (this feature is toggled with the Alt key):
• File – Alt f or Alt F
• Edit – Alt e or Alt E
• Shell – Alt l or Alt L
• Debug – Alt d or Alt D
• Options – Alt o or Alt O
• Windows – Alt w or Alt W
• Help – Alt h or Alt H
– “What will happen if the Alt key is pressed once, or
instead, is pressed twice in succession?”
Python® Documentation & Startup –
Summary!
• Prerequisites –
– Installation
– access to Python® now or soon
• Python® documentation
– Installed documentation: Manuals, Help, etc.
– http://www.python.org/ and other sources.
• Tk Python Shell
– IDLE menu items:
• File, Edit, Shell, Debug, Options, Windows, Help
Python® –
is useful for, among other purposes:
• Application Domains
• Database Access
• Desktop GUIs
• Education
• Game and 3D Graphics
• Network Programming
• Scientific and Numeric
• Software Development
• Web and Internet
Development Note: This is the final slide of
this training module by:
Dr. R. Don Green, Ph.D.

Contenu connexe

Similaire à Python doc&start16dec2010

Efficient Automated Test Creation With Selenium IDE Plugins
Efficient Automated Test Creation With Selenium IDE PluginsEfficient Automated Test Creation With Selenium IDE Plugins
Efficient Automated Test Creation With Selenium IDE PluginsSamit Badle
 
Surviving OS X as a Windows Admin
Surviving OS X as a Windows AdminSurviving OS X as a Windows Admin
Surviving OS X as a Windows AdminDell World
 
Intellij IDEA Intro, Tips and Tricks
Intellij IDEA Intro, Tips and TricksIntellij IDEA Intro, Tips and Tricks
Intellij IDEA Intro, Tips and Tricksvito jeng
 
Professional Help for PowerShell Modules
Professional Help for PowerShell ModulesProfessional Help for PowerShell Modules
Professional Help for PowerShell ModulesJune Blender
 
iPhone Programming [2/17] : Introduction to iOS Programming
iPhone Programming [2/17] : Introduction to iOS ProgrammingiPhone Programming [2/17] : Introduction to iOS Programming
iPhone Programming [2/17] : Introduction to iOS ProgrammingIMC Institute
 
Eclipse workshop presentation
Eclipse workshop presentationEclipse workshop presentation
Eclipse workshop presentationMiguel Pardal
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-serviceRohit Sansiya
 
Yocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-onYocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-onTrevor Woerner
 
Eclipse workshop presentation (March 2016)
Eclipse workshop presentation (March 2016)Eclipse workshop presentation (March 2016)
Eclipse workshop presentation (March 2016)Miguel Pardal
 
Applet blue j-intro_applets
Applet blue j-intro_appletsApplet blue j-intro_applets
Applet blue j-intro_appletsFajar Baskoro
 
Understanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptxUnderstanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptxReubenMawukoDordunu
 
KMSUnix and Linux.pptx
KMSUnix and Linux.pptxKMSUnix and Linux.pptx
KMSUnix and Linux.pptxGanesh Bhosale
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egitmatz_twt
 
Semtech web-protege-tutorial
Semtech web-protege-tutorialSemtech web-protege-tutorial
Semtech web-protege-tutorialmatthewhorridge
 
Effectively using Open Source with conda
Effectively using Open Source with condaEffectively using Open Source with conda
Effectively using Open Source with condaTravis Oliphant
 
Research the differences between JES, Idle and Pycharm, list their k.pdf
Research the differences between JES, Idle and Pycharm, list their k.pdfResearch the differences between JES, Idle and Pycharm, list their k.pdf
Research the differences between JES, Idle and Pycharm, list their k.pdfjitenj3
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsQUONTRASOLUTIONS
 

Similaire à Python doc&start16dec2010 (20)

Efficient Automated Test Creation With Selenium IDE Plugins
Efficient Automated Test Creation With Selenium IDE PluginsEfficient Automated Test Creation With Selenium IDE Plugins
Efficient Automated Test Creation With Selenium IDE Plugins
 
Surviving OS X as a Windows Admin
Surviving OS X as a Windows AdminSurviving OS X as a Windows Admin
Surviving OS X as a Windows Admin
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
 
Intellij IDEA Intro, Tips and Tricks
Intellij IDEA Intro, Tips and TricksIntellij IDEA Intro, Tips and Tricks
Intellij IDEA Intro, Tips and Tricks
 
Unit 2 introduction to windows 7
Unit 2    introduction to windows 7Unit 2    introduction to windows 7
Unit 2 introduction to windows 7
 
Professional Help for PowerShell Modules
Professional Help for PowerShell ModulesProfessional Help for PowerShell Modules
Professional Help for PowerShell Modules
 
iPhone Programming [2/17] : Introduction to iOS Programming
iPhone Programming [2/17] : Introduction to iOS ProgrammingiPhone Programming [2/17] : Introduction to iOS Programming
iPhone Programming [2/17] : Introduction to iOS Programming
 
Eclipse workshop presentation
Eclipse workshop presentationEclipse workshop presentation
Eclipse workshop presentation
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Yocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-onYocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-on
 
Eclipse workshop presentation (March 2016)
Eclipse workshop presentation (March 2016)Eclipse workshop presentation (March 2016)
Eclipse workshop presentation (March 2016)
 
Applet blue j-intro_applets
Applet blue j-intro_appletsApplet blue j-intro_applets
Applet blue j-intro_applets
 
Understanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptxUnderstanding and Using Information Technology_Exploring Windows 7_2.pptx
Understanding and Using Information Technology_Exploring Windows 7_2.pptx
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
KMSUnix and Linux.pptx
KMSUnix and Linux.pptxKMSUnix and Linux.pptx
KMSUnix and Linux.pptx
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egit
 
Semtech web-protege-tutorial
Semtech web-protege-tutorialSemtech web-protege-tutorial
Semtech web-protege-tutorial
 
Effectively using Open Source with conda
Effectively using Open Source with condaEffectively using Open Source with conda
Effectively using Open Source with conda
 
Research the differences between JES, Idle and Pycharm, list their k.pdf
Research the differences between JES, Idle and Pycharm, list their k.pdfResearch the differences between JES, Idle and Pycharm, list their k.pdf
Research the differences between JES, Idle and Pycharm, list their k.pdf
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
 

Dernier

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Dernier (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Python doc&start16dec2010

  • 1. Python® Documentation & Startup Presented 16 DEC 2010: Training Module Version 1.01 By Dr. R. Don Green, Ph.D. Email: drdg@prodigy.net Website: http://drdg.tripod.com
  • 2. Prerequisites • If needed, refer to and follow steps in: – “Python® Installation” by Dr. R. Don Green, Ph.D. • Or navigate directly to: • “Nice to have” list: – Trainees need access to Python® either during training, or shortly thereafter, to assure they can perform tasks illustrated in this module.
  • 3. Python 2.7.1 – Documentation • Documentation about Python is available from http://www.python.org/ and other sources, however, this module discusses “installed documentation.” • Navigate to Python – select: “Python Manuals”
  • 4. Python 2.7.1 – “Python Manuals” • “Python v2.7.1 documentation” – The Python Tutorial, Glossary, etc.
  • 5. Python 2.7.1 Startup – “IDLE (Python GUI)” • Navigate to the Python 2.7 folder and select: “IDLE (Python GUI)”
  • 6. Python 2.7.1 Startup – selected “IDLE (Python GUI)” • “Tk Python Shell” Graphical User Interface (GUI) opened. Note: GUI is pronounced “gooey.” – What is “IDLE”? – What is “Tk Python Shell”? • Note: a letter in a menu name may or may not be underlined, for example File or File. Press the “Alt” key!
  • 7. Python 2.7.1 Startup – “Tk Python Shell” • What is “Tk Python Shell”? – “Tk” is (simply stated) the GUI Toolkit (library), “Python” is the name of the “Shell,” i.e., the interpreter’s dialogue portal.
  • 8. IDLE 2.7.1 – “Tk Python Shell” window Menu • File, Edit, Shell, Debug, Options, Windows, Help. • Note Python version and related information.
  • 9. IDLE 2.7.1 – “Tk Python Shell” Help Menu • “About IDLE” • “IDLE Help” • “Python Docs F1”
  • 10. IDLE 2.7.1 – “About IDLE” • “IDLE” is – “Python’s Integrated DeveLopment Environment” • Note versions for: – Python (named after Monty Python on television) – Tk (i.e., a GUI Toolkit) – IDLE • IDLE is not the only Integrated Development Environment (IDE): – http://wiki.python.org/moin/Integrated DevelopmentEnvironments
  • 11. IDLE 2.7.1 – “IDLE Help” • Select “IDLE Help” or: – Click on the “dotted line” at the top of a menu to "tear it off," i.e., to create a separate window containing the menu (shown on next slide). – “Dotted line” (really, this is a dashed line)
  • 12. IDLE – “Tear It Off” created a separate window containing the related menu • We clicked on the “dotted line” at the top of a menu to "tear it off:“ – A separate window containing the menu was created. Adjust the size of any window as desired.
  • 13. IDLE 2.7.1 – “File” menu • “Tear It Off” – create a separate window containing the related menu • New Window – Create a new editing window • Open... – Open an existing file • Recent Files... – Open a list of recent files • Open Module... – Open an existing module (searches sys.path) • Class Browser – Show classes and methods in current file • Path Browser – Show sys.path directories, modules, classes and methods • Save – Save current window to the associated file (note - unsaved windows have an asterisk (*) before and after the window title) • Save As... – Save current window to new file, which becomes the associated file • Save Copy As... – Save current window to different file without changing the associated file • Print Window – Print the current window • Close – Close current window (asks to save if unsaved) • Exit – Close all windows, quit (asks to save if unsaved)
  • 14. IDLE 2.7.1 – “ Edit” Menu • “Tear It Off” – create a separate window containing the related menu • Undo – Undo last change to current window (A maximum of 1000 changes may be undone) • Redo – Redo last undone change to current window • Cut – Copy a selection into system-wide clipboard, then delete the selection • Copy – Copy selection into system-wide clipboard • Paste – Insert system-wide clipboard into window • Select All – Select the entire contents of the edit buffer • Find... – Open a search dialog box with many options • Find Again – Repeat last search • Find Selection – Search for the string in the selection • Find in Files... – Open a search dialog box for searching files • Replace... – Open a search-and-replace dialog box • Go to Line – Ask for a line number and show that line • Expand Word – Expand the word you have typed to match another word in the same buffer; repeat to get a different expansion • Show Call tip – Open a small window with function param hints • Show surrounding parens – Highlight the surrounding parenthesis • Show Completions – Open a scroll window allowing selection keywords and attributes. (see '*TIPS*', below)
  • 15. Run Menu (only in Edit window) • Python Shell -- Open or wake up the Python shell window • --- • Check Module -- Run a syntax check on the module • Run Module -- Execute the current file in the __main__ namespace
  • 16. IDLE 2.7.1 – “ Shell” Menu (only in Shell window) • “Tear It Off” – create a separate window containing the related menu • View Last Restart – Scroll the shell window to the last restart • Restart Shell – Restart the interpreter with a fresh environment
  • 17. IDLE 2.7.1 – “Debug” Menu (only in Shell window) • “Tear It Off” – create a separate window containing the related menu • Go to File/Line – look around the insert point for a filename and line number, open the file, and show the line • Debugger (toggle) – Run commands in the shell under the debugger • Stack Viewer – Show the stack traceback of the last exception • Auto-open Stack Viewer (toggle) – Open stack viewer on traceback
  • 18. IDLE 2.7.1 – “Options” Menu • “Tear It Off” – create a separate window containing the related menu • Configure IDLE – Open a configuration dialog. Fonts, indentation, keybindings, and color themes may be altered. Startup Preferences may be set, and Additional Help Sources can be specified. On MacOS X this menu is not present, use menu 'IDLE -> Preferences...' instead. • Code Context – Open a pane at the top of the edit window which shows the block context of the section of code which is scrolling off the top or the window. (Not present in Shell window.)
  • 19. IDLE 2.7.1 – “Windows” Menu • “Tear It Off” – create a separate window containing the related menu • Zoom Height – toggles the window between configured size and maximum height. • The rest of this menu lists the names of all open windows; select one to bring it to the foreground (de-icon-ifying it if necessary).
  • 20. Python® – Alt key • Tk Python Shell – IDLE menu items are accessed with the mouse or Alt key strokes (this feature is toggled with the Alt key): • File – Alt f or Alt F • Edit – Alt e or Alt E • Shell – Alt l or Alt L • Debug – Alt d or Alt D • Options – Alt o or Alt O • Windows – Alt w or Alt W • Help – Alt h or Alt H – “What will happen if the Alt key is pressed once, or instead, is pressed twice in succession?”
  • 21. Python® Documentation & Startup – Summary! • Prerequisites – – Installation – access to Python® now or soon • Python® documentation – Installed documentation: Manuals, Help, etc. – http://www.python.org/ and other sources. • Tk Python Shell – IDLE menu items: • File, Edit, Shell, Debug, Options, Windows, Help
  • 22. Python® – is useful for, among other purposes: • Application Domains • Database Access • Desktop GUIs • Education • Game and 3D Graphics • Network Programming • Scientific and Numeric • Software Development • Web and Internet Development Note: This is the final slide of this training module by: Dr. R. Don Green, Ph.D.