module pipes





8.13 pipes -- Interface to shell pipelines

















Python Library Reference




Previous: 8.12 fcntl
Up: 8. Unix Specific Services
Next: 8.13.1 Template Objects




8.13 pipes --
Interface to shell pipelines




Availability: Unix.


The pipes module defines a class to abstract the concept of
a pipeline -- a sequence of convertors from one file to
another.


Because the module uses /bin/sh command lines, a POSIX or
compatible shell for os.system() and os.popen()
is required.


The pipes module defines the following class:


Template ()

An abstraction of a pipeline.



Example:



>>> import pipes
>>> t=pipes.Template()
>>> t.append('tr a-z A-Z', '--')
>>> f=t.open('/tmp/1', 'w')
>>> f.write('hello world')
>>> f.close()
>>> open('/tmp/1').read()
'HELLO WORLD'






Subsections


8.13.1 Template Objects








Python Library Reference




Previous: 8.12 fcntl
Up: 8. Unix Specific Services
Next: 8.13.1 Template Objects



See About this document... for information on suggesting changes.





Wyszukiwarka

Podobne podstrony:
module al constants
function mcrypt module get algo key size
CISCO CCNA Certifications CCNA 2 Module 6
module zipfile
pipes
module files
module sunaudiodev
Module HOWTO pl (3)
module pprint
Book 5 module 3 test A
module Queue
module cursesascii
module tabnanny
module fileinput
01 52 Check control module 01

więcej podobnych podstron