Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Python Tutorial
Buildin Module 67 codes
Home
Python Tutorial
Buildin Module
1 A Simple Test Using the unittest Framework
2 Add to system log
3 Adding Line Numbers to a Python Script
4 Append path to system path
5 Ceil, floor, frexp, modf, exp
6 Copy deepcopy() function
7 Creating a New Date
8 Creating a New Time
9 Date Operations
10 Datetime module
11 Defining our own signal handler
12 Demonstrating popen and popen2
13 Execute system command with os system()
14 File statistics
15 Fork a thread
16 Handling Command-Line Arguments
17 Heap is a kind of priority queue
18 Here is an example executing a DOS command
19 Kill function for Win32
20 List directories
21 Load web site to your browser
22 Make a deep copy, copying the values, any values they contain
23 Network Byte Order
24 Opens a Web page in a system-specific editor
25 Operating System Interface
26 Os environ contains a dictionary of environmental variables
27 Os popen() a pipe
28 Os system(command) executes a system function as if it were in a subshell
29 Platform architecture() returns (bits, linkage) tuple
30 Platform python_version() returns the version of the Python
31 Platform uname() returns a tuple of (system, node, release, version, machine, processor)
32 Pop element from heap
33 Print sys version
34 Printing the command line arguments in reverse order
35 Printing to stderr
36 Process Management
37 Random integers produced by randrange
38 Random time
39 Redirecting Error Information
40 Redirecting Output
41 Replacing os popen()
42 Replacing os system()
43 Roll a six-sided die 6000 times
44 Run application from host
45 Run shell command
46 Set operation on string
47 Sleep() method of time module example
48 Starting a Web browser
49 Stdin of the sys module is a file object
50 Sys exit() and SystemExit
51 Sys exitfunc()
52 Sys module has the stdout and stderr attributes that point to files used for standard output and standard error output
53 The argv attribute of the sys module is a list
54 The list of search path can be found in the path variable in the sys module
55 Time asctime
56 Time clock() returns the current CPU time as a floating-point number that can be used for various timing functions
57 Time ctime(secs) returns the time, specified by secs since the UTC, as a formatted, printable string
58 Time localtime(secs) returns the time in the form of (year, month, day, hour, minute, second, day of week, day of year, day
59 Time Operations
60 Time sleep(sec) forces the current process to sleep for the number of seconds specified by the floating-point number secs.t
61 Time time() returns the current system time
62 Uses the system function to clear the screen
63 Using sys modules
64 Using the os execvp(path, args) to execute the application update exe with a command-line parameter of -verbose
65 Win32 Example
66 Windows-specific function os startfile
67 You can print the time values using the strftime() method