| Server IP : 39.108.156.168 / Your IP : 216.73.216.104 Web Server : nginx/1.24.0 System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/LanguageSelector/__pycache__/ |
Upload File : |
�
k�!f� � �, � d dl Z d dlZd dlZ dd�Zd� Zy)� Nc �� � |D �]T }t j dt j j |� �� }d}t j j |� r�t j |t j � rnt |� 5 }|D ]T } | j � }
|r|
j | � rd}|} |s |
| k( rd}|} |j | j d� � �V ddd� |s"|r |j |j d� � |j � t j |j |� t j |d� ��W y# 1 sw Y �wxY w)zY find all strings that startswith findString and replace them with
setString
F)�delete�dirTzUTF-8Ni� )�tempfile�NamedTemporaryFile�os�path�dirname�exists�access�R_OK�open�strip�
startswith�write�encode�flush�rename�name�chmod)�
findString� setString� file_listr �append�fname�out�foundString�f�line�tmps �8/usr/lib/python3/dist-packages/LanguageSelector/utils.py�find_string_and_replacer"