Python examples (example source code) Organized by topic

C++
PHP
Python
Python Home  Screenshots 
 



 
GUI Tk
Event
GUI Pmw
2D
GUI Tk
Screenshots 
Alarm  ( 1 ) Animation  ( 3 ) Back Fore ground  ( 1 ) Beeper  ( 1 ) Border  ( 7 ) Button  ( 32 )
Canvas  ( 8 ) CheckBox  ( 7 ) Common Dialog  ( 9 ) Cursor  ( 1 ) Dialog  ( 13 ) Editor  ( 1 )
Event  ( 7 ) Exception Dialog  ( 1 ) Focus  ( 1 ) Frame  ( 23 ) Label  ( 13 ) Layout  ( 40 )
LED  ( 1 ) ListBox  ( 7 ) Menu Checkbox  ( 1 ) Menu RadioButton  ( 1 ) Menu  ( 18 ) MenuButton  ( 1 )
Message Box  ( 1 ) OptionMenu  ( 1 ) Pack  ( 2 ) Popup Menu  ( 1 ) RadioButton  ( 9 ) Scale  ( 8 )
ScrollBar  ( 2 ) StatusBar MessageField  ( 2 ) Table Grid  ( 5 ) Text  ( 10 ) TextArea  ( 4 ) TextField Entry  ( 8 )
Timer  ( 2 ) Tk option database  ( 1 ) TK Root Window  ( 1 ) ToolBar  ( 2 ) Top Level  ( 1 ) UI Class  ( 15 )
UI Event  ( 1 )
Event
Screenshots 
Key Action  ( 15 ) Mouse Action  ( 23 ) Mouse Draw  ( 3 )
GUI Pmw
Screenshots 
Pmw AboutDialog  ( 2 ) Pmw Blt Tabset  ( 1 ) Pmw Border  ( 1 ) Pmw ButtonBox  ( 5 ) Pmw Color  ( 2 ) Pmw ComboBox  ( 7 )
Pmw ComboBoxDialog  ( 2 ) Pmw Counter  ( 9 ) Pmw CounterDialog  ( 2 ) Pmw Dialog  ( 8 ) Pmw EntryField  ( 15 ) Pmw Error Handler  ( 2 )
Pmw Gauge  ( 1 ) Pmw Grid  ( 1 ) Pmw Group  ( 8 ) Pmw HistoryText  ( 1 ) Pmw Key Action  ( 1 ) Pmw LabeledWidget  ( 2 )
Pmw LogicalFont  ( 1 ) Pmw MegaWidget  ( 4 ) Pmw MenuBar  ( 2 ) Pmw MessageBar  ( 2 ) Pmw MessageDialog  ( 7 ) Pmw Multi line label  ( 2 )
Pmw OptionMenu  ( 4 ) Pmw Password  ( 1 ) Pmw Performance  ( 1 ) Pmw PromptDialog  ( 1 ) Pmw RadioSelect  ( 5 ) Pmw ScrolledCanvas  ( 4 )
Pmw ScrolledField  ( 1 ) Pmw ScrolledFrame  ( 1 ) Pmw ScrolledListBox  ( 5 ) Pmw ScrolledText  ( 4 ) Pmw SelectionDialog  ( 2 ) Pmw Splitpane  ( 3 )
Pmw StatusBar  ( 1 ) Pmw Tab NoteBook  ( 4 ) Pmw TextDialog  ( 2 ) Pmw TimeCounter  ( 2 ) Pmw Tooltips  ( 2 ) Pmw Toplevel Megawidget  ( 1 )
Pmw Validation Field  ( 9 ) Subclassing Pmw  ( 3 )
2D
Screenshots 
Arc  ( 2 ) Bitmap  ( 2 ) Circle  ( 1 ) Color  ( 2 ) Curve  ( 1 ) Font  ( 7 )
Gif  ( 1 ) Image  ( 1 ) Line  ( 5 ) Oval  ( 3 ) Polygon  ( 1 ) Rectangle  ( 2 )
Shape Border  ( 2 )
 
List
Tuple
Dictionary
String
List
Screenshots 
List Append  ( 4 ) List Assign  ( 3 ) List Cancatenation  ( 4 ) List Compare  ( 3 ) List Comprehensive  ( 6 ) List Count  ( 1 )
List Declaration  ( 1 ) List Element Insert  ( 1 ) List Element Remove  ( 1 ) List Element Replace  ( 1 ) List Element  ( 4 ) List Empty  ( 1 )
List Extend  ( 3 ) List Filter  ( 1 ) List In  ( 3 ) List Index  ( 2 ) List Indexing  ( 6 ) List Insert  ( 2 )
List Intersect  ( 2 ) List Length  ( 2 ) List Loop  ( 6 ) List Pop  ( 3 ) List Remove  ( 5 )
List Repitition  ( 1 ) List Reverse  ( 2 ) List Sliced  ( 6 ) List Sort  ( 2 ) List Two Dimension  ( 2 )
Nested List  ( 3 ) Return List  ( 1 ) Variables in List  ( 1 )
Tuple
Screenshots 
Nested Tuple  ( 1 ) Tuple Concatination  ( 2 ) Tuple Condition  ( 1 ) Tuple Creation  ( 6 ) Tuple Declaration  ( 4 ) Tuple Display  ( 1 )
Tuple Element  ( 1 ) Tuple Immutable  ( 1 ) Tuple In  ( 3 ) Tuple Index  ( 4 ) Tuple Length  ( 2 ) Tuple Loop  ( 1 )
Tuple Range  ( 1 ) Tuple Repitition  ( 1 ) Tuple Returned  ( 1 ) Tuple Slice  ( 2 ) Tuple toList  ( 2 ) Tuple Zip  ( 1 )
Dictionary
Screenshots 
Dictionary Assignment  ( 3 ) Dictionary Clear  ( 1 ) Dictionary Copy  ( 3 ) Dictionary Declaration  ( 3 ) Dictionary Del  ( 1 ) Dictionary Fetch  ( 1 )
Dictionary get  ( 3 ) Dictionary has Key  ( 3 ) Dictionary items  ( 2 ) Dictionary iteritems  ( 1 ) Dictionary Key  ( 5 ) Dictionary List  ( 1 )
Dictionary Loop  ( 2 ) Dictionary Output  ( 1 ) Dictionary popitem  ( 1 ) Dictionary Print  ( 1 ) Dictionary setdefault  ( 1 ) Dictionary Tuple  ( 3 )
Dictionary update  ( 2 ) Dictionary values  ( 2 )
String
Screenshots 
String Case  ( 2 ) String Cast  ( 2 ) String center  ( 1 ) String Compare  ( 1 ) String Concatenation  ( 3 ) String 1  ( 1 )
String cross Line  ( 1 ) String Declaration  ( 2 ) String Ends  ( 1 ) String endsWith  ( 1 ) String Escape  ( 3 ) String find  ( 2 )
String In  ( 2 ) String Index  ( 2 ) String join  ( 6 ) String Length  ( 6 ) String ljust  ( 1 ) String Output  ( 1 )
String Quotation  ( 3 ) String R  ( 1 ) String Repitition  ( 2 ) String Replace  ( 5 ) String rfind  ( 1 ) String rindex  ( 1 )
String rjust  ( 1 ) String Slice  ( 6 ) String Special Char  ( 1 ) String Split  ( 4 ) String startsWith  ( 1 ) String strip  ( 1 )
String toTitle  ( 1 ) String Variables  ( 1 )
 
Class
Function
Buildin Function
Class
Screenshots 
Class abstract  ( 1 ) Class add  ( 1 ) Class call  ( 1 ) Class Constructor  ( 5 ) Class Define  ( 2 ) Class Definition  ( 1 )
Class del  ( 1 ) Class Dict  ( 2 ) Class fields  ( 8 ) Class getattr  ( 2 ) Class getitem  ( 2 ) Class getslice  ( 1 )
Class Inheritance  ( 5 ) Class Instance  ( 1 ) Class instantiation  ( 1 ) Class iter  ( 1 ) Class len  ( 1 ) Class list  ( 1 )
Class metaclass  ( 1 ) Class Method  ( 4 ) Class mul  ( 1 ) Class Operator Add  ( 1 ) Class Private  ( 1 ) Class radd  ( 1 )
Class repr  ( 1 ) Class self  ( 1 ) Class setattr  ( 1 ) Class str  ( 2 ) Class sub  ( 1 ) Class Virtual  ( 6 )
Function
Screenshots 
Apply  ( 2 ) Function as Parameters  ( 1 ) Function as Return  ( 2 ) Function Default Argument  ( 10 ) Function Define  ( 6 ) Function Dictionary Parameters  ( 4 )
Function Inner  ( 4 ) Function Keyword Arguments  ( 3 ) Function Parameters  ( 5 ) Function Recursive  ( 3 ) Function Return  ( 5 ) Function Tuple Parameters  ( 6 )
Function type vars  ( 1 ) Functional Programming  ( 5 ) lambda function  ( 5 ) Return  ( 1 )
Buildin Function
Screenshots 
chr  ( 1 ) Del  ( 1 ) dict  ( 1 ) Dir  ( 3 ) enumerate  ( 1 ) Eval  ( 1 )
filter  ( 4 ) Float Function  ( 1 ) Generator Function  ( 3 ) Generator  ( 3 ) id  ( 1 ) in  ( 3 )
int cast  ( 2 ) Iterable Object  ( 1 ) Iterator Behavior  ( 1 ) Iterators  ( 1 ) len  ( 3 ) list  ( 4 )
map  ( 6 ) next  ( 2 ) ord  ( 2 ) range  ( 8 ) reduce  ( 4 ) repr  ( 6 )
reversed  ( 1 ) sorted  ( 1 ) str  ( 4 ) zfill  ( 1 ) zip  ( 7 )
 
Data Type
Data Structure
File
Data Type
Screenshots 
Array  ( 1 ) Bigger Number  ( 1 ) Bit  ( 3 ) Boolean  ( 3 ) Complex Numbers  ( 6 ) Decimal  ( 1 )
Float  ( 2 ) Hex Function  ( 1 ) Hex Type  ( 1 ) Int  ( 6 ) Long  ( 1 ) maxint  ( 2 )
Oct Function  ( 1 ) octal Type  ( 1 ) True  ( 2 ) Type Conversion  ( 2 )
Data Structure
 
bisect  ( 1 ) Deque  ( 1 ) Queue  ( 1 ) Set Declaration  ( 2 ) Set In  ( 1 ) Set  ( 2 )
Stack  ( 2 )
File
Screenshots 
DBM  ( 3 ) Dircetories  ( 4 ) File Binary  ( 1 ) File Close  ( 3 ) File IO Exception  ( 1 ) File Object  ( 1 )
File Open  ( 1 ) File Pointer  ( 1 ) File Read  ( 9 ) File Readline  ( 3 ) File seek  ( 2 ) File Tell  ( 1 )
File Text  ( 2 ) File Utilities  ( 1 ) File Utility  ( 2 ) File Write  ( 5 ) File Zip  ( 4 ) IO Error  ( 3 )
Pickle  ( 3 ) shelve  ( 3 ) Text File Read Write  ( 2 ) Text File Read  ( 8 ) Text File Write  ( 4 )
 
Development
Language Basics
Exception
Math
Development
Screenshots 
Command Line  ( 3 ) Compress  ( 1 ) Console Read  ( 4 ) Date Time  ( 6 ) Doc String  ( 5 ) Encode File  ( 2 )
Environment  ( 2 ) Help  ( 2 ) isinstance  ( 1 ) Logging  ( 1 ) Output Format  ( 25 ) Path  ( 1 )
Random  ( 9 ) Reflection  ( 1 ) Standard Read  ( 5 ) Standard Redirect  ( 5 ) Standard Vars  ( 1 ) stdout stderr  ( 6 )
Test  ( 1 ) Timer  ( 1 ) User Input  ( 2 )
Language Basics
Screenshots 
And Or  ( 7 ) Break  ( 4 ) Buildin Error  ( 2 ) Catch Exceptions  ( 3 ) Comments  ( 3 ) Continue  ( 2 )
def  ( 1 ) Divide  ( 4 ) For In  ( 2 ) For  ( 5 ) Garbage Collector  ( 1 ) Global  ( 5 )
If  ( 10 ) Import  ( 3 ) Local Variables  ( 2 ) Locale  ( 1 ) Logical Operator  ( 1 ) Module  ( 15 )
Multiply  ( 3 ) Not  ( 1 ) Operator  ( 1 ) Pass  ( 1 ) Plus  ( 1 ) pprint  ( 1 )
Print  ( 2 ) Raise  ( 1 ) Statement  ( 1 ) Static Method  ( 2 ) Subtract  ( 1 ) Text Encode  ( 3 )
Try Else  ( 2 ) Try finally  ( 1 ) Try  ( 2 ) Type  ( 2 ) Unicode  ( 9 ) Variable Assign  ( 2 )
Variable Declaration  ( 2 ) Variable Immutable  ( 2 ) Variable Reference  ( 1 ) While  ( 11 )
Exception
 
Exception Class  ( 3 ) Exception finally  ( 1 ) Exception Handle  ( 5 ) Exception Info  ( 3 ) Exception Raise  ( 2 ) Exception Trace  ( 1 )
Exception Type  ( 1 ) Value Error  ( 1 )
Math
 
cos  ( 1 ) E  ( 1 ) Log  ( 1 ) Math Pow  ( 1 ) Max  ( 2 ) Min  ( 2 )
Mod  ( 1 ) Pi  ( 1 ) Power  ( 2 ) Round  ( 2 ) Sin  ( 1 ) sqrt  ( 1 )
 
Network
Thread
System
XML
Network
Screenshots 
Address Info  ( 3 ) Email  ( 1 ) Gopher Client  ( 5 ) Host Info  ( 3 ) HTTP POST  ( 1 ) Internet Access  ( 1 )
IP Address  ( 1 ) Remote File  ( 1 ) Server UDP  ( 2 ) Socket Broadcast  ( 1 ) Socket Client  ( 3 ) Socket Error Handle  ( 2 )
Socket Info  ( 1 ) Socket Option  ( 1 ) Socket Pocket  ( 2 ) Socket Server  ( 5 ) UDP  ( 3 ) URL  ( 6 )
Web Client  ( 6 ) Web Page  ( 3 )
Thread
 
Thread Exit  ( 1 ) Thread Sleep  ( 1 ) Thread Start  ( 1 ) Thread Synchronize  ( 3 )
System
 
System Cmd Mount  ( 3 ) System Command  ( 1 ) System Error  ( 1 ) System Exit  ( 1 ) System fork  ( 1 ) System Info  ( 1 )
System Path  ( 4 ) System pid  ( 1 ) System Time  ( 1 ) System User  ( 1 ) System Variables  ( 3 )
XML
 
XML Children Node  ( 5 ) XML Element  ( 4 ) XML Parse  ( 4 )
 
Utility
Application
Utility
 
API Helper  ( 2 ) Command Line  ( 1 ) Command  ( 2 ) Exception  ( 1 ) File Utility  ( 16 ) Network Utility  ( 7 )
Programming  ( 21 ) Regular Expressions  ( 1 )
Application
 
Calculator  ( 2 )
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.