Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
genshi /
__pycache__ /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.cpython-310.pyc
632
B
-rw-r--r--
builder.cpython-310.pyc
11.87
KB
-rw-r--r--
compat.cpython-310.pyc
3.35
KB
-rw-r--r--
core.cpython-310.pyc
26.87
KB
-rw-r--r--
input.cpython-310.pyc
15.32
KB
-rw-r--r--
output.cpython-310.pyc
23.89
KB
-rw-r--r--
path.cpython-310.pyc
47.64
KB
-rw-r--r--
util.cpython-310.pyc
6.69
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : builder.cpython-310.pyc
o !�b5. � @ s� d Z ddlZddlmZ ddlmZmZmZmZm Z m Z mZmZ g d�Z dZG dd� de�Zd d � ZG dd� de�ZG d d� de�Ze� ZdS )a Support for programmatically generating markup streams from Python code using a very simple syntax. The main entry point to this module is the `tag` object (which is actually an instance of the ``ElementFactory`` class). You should rarely (if ever) need to directly import and use any of the other classes in this module. Elements can be created using the `tag` object using attribute access. For example: >>> doc = tag.p('Some text and ', tag.a('a link', href='http://example.org/'), '.') >>> doc <Element "p"> This produces an `Element` instance which can be further modified to add child nodes and attributes. This is done by "calling" the element: positional arguments are added as child nodes (alternatively, the `Element.append` method can be used for that purpose), whereas keywords arguments are added as attributes: >>> doc(tag.br) <Element "p"> >>> print(doc) <p>Some text and <a href="http://example.org/">a link</a>.<br/></p> If an attribute name collides with a Python keyword, simply append an underscore to the name: >>> doc(class_='intro') <Element "p"> >>> print(doc) <p class="intro">Some text and <a href="http://example.org/">a link</a>.<br/></p> As shown above, an `Element` can easily be directly rendered to XML text by printing it or using the Python ``str()`` function. This is basically a shortcut for converting the `Element` to a stream and serializing that stream: >>> stream = doc.generate() >>> stream #doctest: +ELLIPSIS <genshi.core.Stream object at ...> >>> print(stream) <p class="intro">Some text and <a href="http://example.org/">a link</a>.<br/></p> The `tag` object also allows creating "fragments", which are basically lists of nodes (elements or text) that don't have a parent element. This can be useful for creating snippets of markup that are attached to a parent element later (for example in a template). Fragments are created by calling the `tag` object, which returns an object of type `Fragment`: >>> fragment = tag('Hello, ', tag.em('world'), '!') >>> fragment <Fragment> >>> print(fragment) Hello, <em>world</em>! � N)� numeric_types)�Attrs�Markup� Namespace�QName�Stream�START�END�TEXT)�Fragment�Element�ElementFactory�tagzrestructuredtext enc @ sn e Zd ZdZdgZdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� Zdd� Z dd� Zdd� ZdS )r z_Represents a markup fragment, which is basically just a list of element or text nodes. �childrenc C s g | _ dS )zCreate a new fragment.N)r ��self� r �0/usr/lib/python3/dist-packages/genshi/builder.py�__init__W s zFragment.__init__c C s t � | |�S �N�r )r �otherr r r �__add__[ � zFragment.__add__c G s |D ]}| � |� q| S )zXAppend any positional arguments as child nodes. :see: `append` )�append)r �args�argr r r �__call__^ s zFragment.__call__c C s | � � S r )� _generater r r r �__iter__g s zFragment.__iter__c C s dt | �j S )Nz<%s>)�type�__name__r r r r �__repr__j � zFragment.__repr__c C � t | �� �S r )�str�generater r r r �__str__m r zFragment.__str__c C s t �| �� �S r )�six� text_typer&