✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python37/lib64/python3.7/site-packages/Cython//StringIOTree.py
r"""
Implements a buffer with insertion points. When you know you need to
"get back" to a place and write more later, simply call insertion_point()
at that spot and get a new StringIOTree object that is "left behind".

EXAMPLE:

>>> a = StringIOTree()
>>> _= a.write('first\n')
>>> b = a.insertion_point()
>>> _= a.write('third\n')
>>> _= b.write('second\n')
>>> a.getvalue().split()
['first', 'second', 'third']

>>> c = b.insertion_point()
>>> d = c.insertion_point()
>>> _= d.write('alpha\n')
>>> _= b.write('gamma\n')
>>> _= c.write('beta\n')
>>> b.getvalue().split()
['second', 'alpha', 'beta', 'gamma']

>>> i = StringIOTree()
>>> d.insert(i)
>>> _= i.write('inserted\n')
>>> out = StringIO()
>>> a.copyto(out)
>>> out.getvalue().split()
['first', 'second', 'alpha', 'inserted', 'beta', 'gamma', 'third']
"""

from __future__ import absolute_import  #, unicode_literals

try:
    # Prefer cStringIO since io.StringIO() does not support writing 'str' in Py2.
    from cStringIO import StringIO
except ImportError:
    from io import StringIO


class StringIOTree(object):
    """
    See module docs.
    """

    def __init__(self, stream=None):
        self.prepended_children = []
        if stream is None:
            stream = StringIO()
        self.stream = stream
        self.write = stream.write
        self.markers = []

    def getvalue(self):
        content = [x.getvalue() for x in self.prepended_children]
        content.append(self.stream.getvalue())
        return "".join(content)

    def copyto(self, target):
        """Potentially cheaper than getvalue as no string concatenation
        needs to happen."""
        for child in self.prepended_children:
            child.copyto(target)
        stream_content = self.stream.getvalue()
        if stream_content:
            target.write(stream_content)

    def commit(self):
        # Save what we have written until now so that the buffer
        # itself is empty -- this makes it ready for insertion
        if self.stream.tell():
            self.prepended_children.append(StringIOTree(self.stream))
            self.prepended_children[-1].markers = self.markers
            self.markers = []
            self.stream = StringIO()
            self.write = self.stream.write

    def insert(self, iotree):
        """
        Insert a StringIOTree (and all of its contents) at this location.
        Further writing to self appears after what is inserted.
        """
        self.commit()
        self.prepended_children.append(iotree)

    def insertion_point(self):
        """
        Returns a new StringIOTree, which is left behind at the current position
        (it what is written to the result will appear right before whatever is
        next written to self).

        Calling getvalue() or copyto() on the result will only return the
        contents written to it.
        """
        # Save what we have written until now
        # This is so that getvalue on the result doesn't include it.
        self.commit()
        # Construct the new forked object to return
        other = StringIOTree()
        self.prepended_children.append(other)
        return other

    def allmarkers(self):
        children = self.prepended_children
        return [m for c in children for m in c.allmarkers()] + self.markers


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Feb 2025 8.05 AM
root / linksafe
0755
Build
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Compiler
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Debugger
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Distutils
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Includes
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Plex
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Runtime
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Tempita
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Tests
--
25 Jul 2024 8.44 AM
root / linksafe
0755
Utility
--
25 Jul 2024 8.44 AM
root / linksafe
0755
__pycache__
--
25 Jul 2024 8.44 AM
root / linksafe
0755
CodeWriter.py
23.341 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
Coverage.py
12.075 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
Debugging.py
0.539 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
Shadow.py
12.282 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
StringIOTree.cpython-37m-x86_64-linux-gnu.so
94.195 KB
24 Apr 2023 6.25 PM
root / linksafe
0755
StringIOTree.py
3.229 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
TestUtils.py
7.792 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
Utils.py
14.075 KB
18 Mar 2018 6.52 PM
root / linksafe
0644
__init__.py
0.35 KB
18 Mar 2018 6.52 PM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF