One Hat Cyber Team
Your IP :
3.15.209.38
Server IP :
162.241.123.123
Server :
Linux sh016.hostgator.in 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib64
/
python2.7
/
idlelib
/
View File Name :
tabbedpages.pyo
� q��fc�����������@���s���d��Z��d�d�l�Td�e�f�d�������YZ�d�e�f�d�������YZ�d�e�f�d�������YZ�d �e�f�d �������YZ�e�d�k�r�e ����Z �e�e �d�d �d�g�d�d�d�e��Z�e�j �d�e�d�e�d�e���e�e�j�d �j�d�d�d�d��j ����e�e�j�d �j�d�d�d�d��j ����e�e�j�d�j�d�d��j ����e�e ���Z�e�e �d�d�d�d�����Z�e�e �d�d�d�d�����Z�e�e �d�d��Z�e�j �d �d!�d�d!���e�j �d �d!�d�d!���e�j �d �d!���e�j �d �d!���e �j����n��d"�S(#���s��An implementation of tabbed pages using only standard Tkinter. Originally developed for use in IDLE. Based on tabpage.py. Classes exported: TabbedPageSet -- A Tkinter implementation of a tabbed-page widget. TabSet -- A widget containing tabs (buttons) in one or more rows. i����(���t���*t���InvalidNameErrorc�����������B���s���e��Z�RS(����(���t���__name__t ���__module__(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR������s����t���AlreadyExistsErrorc�����������B���s���e��Z�RS(����(���R���R���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR��� ���s����t���TabSetc�����������B���so���e��Z�d��Z�d�d�d�e�d���Z�d����Z�d����Z�d����Z�d����Z �d����Z �d ����Z�d �e�f�d�������YZ �RS( ���sj���A widget containing tabs (buttons) in one or more rows. Only one tab may be selected at a time. i���i���c���������K���s����t��j�|��|�|���|�|��_�|�|��_�|�|��_�|�|��_�|�|��_�i��|��_�i��|��_�|�rj�t �|���|��_ �n �g��|��_ �d �|��_�g��|��_ �t��|��d�d�d�d�d�t�d�|��j�d����|��_�|��j�j�d�t�d�t�d �t���|��j����d �S(���s��Constructor arguments: select_command -- A callable which will be called when a tab is selected. It is called with the name of the selected tab as an argument. tabs -- A list of strings, the names of the tabs. Should be specified in the desired tab order. The first tab will be the default and first active tab. If tabs is None or empty, the TabSet will be initialized empty. n_rows -- Number of rows of tabs to be shown. If n_rows <= 0 or is None, then the number of rows will be decided by TabSet. See _arrange_tabs() for details. max_tabs_per_row -- Used for deciding how many rows of tabs are needed, when the number of rows is not constant. See _arrange_tabs() for details. t���heighti���t���borderwidthi����t���relieft ���backgroundt���sidet���fillt���expandN(���t���Framet���__init__t���select_commandt���n_rowst���max_tabs_per_rowt���expand_tabst���page_sett���_tabst���_tab2rowt���listt ���_tab_namest���Nonet ���_selected_tabt ���_tab_rowst���FLATt���cgett ���padding_framet���packt���TOPt���Xt���Falset ���_arrange_tabs(���t���selfR���R���t���tabsR���R���R���t���kw(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR������s$���� c���������C���sY���|�s�t��d�|�����n��|�|��j�k�r;�t�d�|�����n��|��j�j�|���|��j����d�S(���s.���Add a new tab with the name given in tab_name.s���Invalid Tab name: '%s's���Tab named '%s' already existsN(���R���R���R���t���appendR"���(���R#���t���tab_name(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���add_tabD���s����c���������C���s@���|�|��j��k�r"�t�d�t�����n��|��j��j�|���|��j����d�S(���s���Remove the tab named <tab_name>s���No such Tab: '%sN(���R���t���KeyErrort ���page_namet���removeR"���(���R#���R'���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt ���remove_tabN���s����c���������C���s����|�|��j��k�r�d�S|�d�k �rA�|�|��j�k�rA�t�d�t�����n��|��j��d�k �rg�|��j�|��j��j����n��d�|��_��|�d�k �r��|�|��_��|��j�|�}�|�j����|��j�|�}�|�j����|�j �d�t �d�t�d�d���n��d�S(���s1���Show the tab named <tab_name> as the selected oneNs���No such Tab: '%sR ���R���R���i����(���R���R���R���R)���R*���t ���set_normalt���set_selectedR���t���pack_forgetR���R���R ���(���R#���R'���t���tabt���tab_row(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���set_selected_tabV���s���� c���������C���s����|�s �d��St��|����}�|�j�d�t�d�t�d�d���|��j�j�|���xx�|�D]p�}�t�j�|�|��j�|�|����}�|�r��|�j�d�t �d�t�d�t ���n�|�j�d�t ���|�|��j�|�<|�|��j�|�<qI�Wt �|�_ �d��S(���NR ���R���R���i����(���R ���R���R���R ���R���R&���R���t ���TabButtonR���t���LEFTt���TrueR���R���t���is_last_in_row(���R#���t ���tab_namesR���R1���R'���R0���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���_add_tab_rowl���s���� c���������C���s6���x&�|��j��r(�|��j��j����}�|�j����q�Wi��|��_�d��S(���N(���R���t���popt���destroyR���(���R#���R1���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���_reset_tab_rows����s����c��� ������C���sK��x-�|��j��j����D]�}�|��j��j�|���j����q�W|��j����|��j�sG�d�S|��j�d�k �rq�|��j�d�k�rq�|��j�}�n�t�|��j���d�|��j �d�}�|��j �p��|�d�k�}�d�}�xe�t�|���D]W�}�t�|��j���|�d�|�|�d�}�|��j�|�|�|�!}�|�|�7}�|��j�|�|���q��W|��j �}�|��j�d���|�|��j�k�rG|��j�|���n��d�S(���sW�� Arrange the tabs in rows, in the order in which they were added. If n_rows >= 1, this will be the number of rows used. Otherwise the number of rows will be calculated according to the number of tabs and max_tabs_per_row. In this case, the number of rows may change when adding/removing tabs. Ni����i���(���R���t���keysR9���R:���R;���R���R���R���t���lenR���R���t���xrangeR8���R���R2���( ���R#���R'���R���R���t���it ���row_indext���n_tabsR7���t���selected(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR"�������s&���� # R3���c�����������B���sM���e��Z�d��Z�d�Z�d����Z�d����Z�d����Z�d����Z�d����Z�e �d���Z �RS(���s���A simple tab-like widget.i���c���������C���s����t��j�|��|�d�|��j�d�t��|�|��_�|�|��_�|�|��_�t�|��_�t �|��d�|�d�|��j �d�d�d�d�d �t�d �t�d�d�d �d�d�d�� |��_�|��j�j �d�t�d�t�d�t���|��j����|��j����d�S(���s����Constructor arguments: name -- The tab's name, which will appear in its button. select_command -- The command to be called upon selection of the tab. It is called with the tab's name as an argument. R���R���t���textt���commandt���padxi���t���padyi���t ���takefocust���indicatoront���highlightthicknessi����t���selectcolort����R ���R���R���N(���R ���R���t���bwt���RAISEDt���nameR���t���tab_setR!���R6���t���Radiobuttont ���_select_eventt���FALSEt���buttonR���R4���R ���R5���t���_init_masksR-���(���R#���RN���R���R1���RO���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR�������s���� c���������G���s���|��j��|��j���d�S(���ss��Event handler for tab selection. With TabbedPageSet, this calls TabbedPageSet.change_page, so that selecting a tab changes the page. Note that this does -not- call set_selected -- it will be called by TabSet.set_selected_tab, which should be called when whatever the tabs are related to changes. N(���R���RN���(���R#���t���args(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRQ�������s����c���������C���s���|��j��d�t���d�S(���s���Assume selected lookRB���N(���t���_place_masksR5���(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR.�������s����c���������C���s���|��j��d�t���d�S(���s���Assume normal lookRB���N(���RV���R!���(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR-�������s����c������ ���C���s��|��j��j�}�|�j�j�d���}�t�|�d�d�d�t�d�|��|��_�t�|�d�d�d�t�d�|��|��_�t�|��j�d�|��j�d�t ��|��j�_ �|��j�j �j�d�d�d�|��j�d�d�|��j�d �|��j�d ���t�|�d�d�d�t�d�|��|��_�t�|��j�d�|��j�d�t ��|��j�_ �d��S(���NR ���R���i����R���t���xt���yt���widthi���R���i���(���RO���R���t���pages_frameR���R ���R���t���maskt���msklRL���RM���t���mlt���placet���mskrt���mr(���R#���R���R ���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRT�������s����c���������C���s���|��j��}�|�r�|�|��j��7}�n��|��j�j�d�|��d�d�d�d�d�d�d�d�d �d�d �d�d�d�d�|��� |��j�j�d�|��d�d�d�|��j��d�d�d�d�d �d�d �|��j��d�d�d�|��� |��j�j�}�|�r|��j�s��|��j����|��j����|�j����|�j����k��r|�|��j��8}�n��|��j �j�d�|��d�d�d�d�d�d�d�d�d �d�d �|��j��d�d�d�|��� |��j �j �j�d�|��j��d�|��j��d �d �|��j��d�|�|��j��d ���|��j�j����d��S(���Nt���in_t���relxg��������RW���i����t���relyg�������?RX���t���relwidthRY���t ���relheightR���i���(���RL���R[���R^���R\���RO���R���R6���t���winfo_rootxt���winfo_widthR_���R`���t���lower(���R#���RB���R���R���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRV�������s4���� #(���R���R���t���__doc__RL���R���RQ���R.���R-���RT���R!���RV���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR3�������s��� N(���R���R���Ri���R���R!���R���R(���R,���R2���R8���R;���R"���R ���R3���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR������s��� , (t ���TabbedPageSetc�����������B���s����e��Z�d��Z�d�e�f�d�������YZ�d�e�f�d�������YZ�d�e�f�d�������YZ�d�e�f�d�������YZ�d�e�d �d �e �d���Z �d����Z�d ����Z�d����Z �RS(���sj��A Tkinter tabbed-pane widget. Constains set of 'pages' (or 'panes') with tabs above for selecting which page is displayed. Only one page will be displayed at a time. Pages may be accessed through the 'pages' attribute, which is a dictionary of pages, using the name given as the key. A page is an instance of a subclass of Tk's Frame widget. The page widgets will be created (and destroyed when required) by the TabbedPageSet. Do not call the page's pack/place/grid/destroy methods. Pages may be added or removed at any time using the add_page() and remove_page() methods. t���Pagec�����������B���s/���e��Z�d��Z�e�Z�d����Z�d����Z�d����Z�RS(���s{���Abstract base class for TabbedPageSet's pages. Subclasses must override the _show() and _hide() methods. c���������C���s���t��|�d�d�d�t��|��_�d��S(���NR���i���R���(���R ���RM���t���frame(���R#���R���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR���9��s����c���������C���s ���t����d��S(���N(���t���NotImplementedError(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���_show<��s����c���������C���s ���t����d��S(���N(���Rm���(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���_hide?��s����(���R���R���Ri���R!���t ���uses_gridR���Rn���Ro���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRk���1��s ��� t ���PageRemovec�����������B���s&���e��Z�d��Z�e�Z�d����Z�d����Z�RS(���sA���Page class using the grid placement manager's "remove" mechanism.c���������C���s#���|��j��j�d�d�d�d�d�t���d��S(���Nt���rowi����t���columnt���sticky(���Rl���t���gridt���NSEW(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRn���F��s����c���������C���s���|��j��j����d��S(���N(���Rl���t���grid_remove(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRo���I��s����(���R���R���Ri���R5���Rp���Rn���Ro���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRq���B��s��� t���PageLiftc�����������B���s/���e��Z�d��Z�e�Z�d����Z�d����Z�d����Z�RS(���s?���Page class using the grid placement manager's "lift" mechanism.c���������C���sI���t��t�j�|����j�|���|��j�j�d�d�d�d�d�t���|��j�j����d��S(���NRr���i����Rs���Rt���(���t���superRj���Rx���R���Rl���Ru���Rv���Rh���(���R#���R���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR���P��s����c���������C���s���|��j��j����d��S(���N(���Rl���t���lift(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRn���U��s����c���������C���s���|��j��j����d��S(���N(���Rl���Rh���(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRo���X��s����(���R���R���Ri���R5���Rp���R���Rn���Ro���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRx���L��s ��� t���PagePackForgetc�����������B���s ���e��Z�d��Z�d����Z�d����Z�RS(���sA���Page class using the pack placement manager's "forget" mechanism.c���������C���s���|��j��j�d�t�d�t���d��S(���NR���R���(���Rl���R���t���BOTHR5���(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRn���]��s����c���������C���s���|��j��j����d��S(���N(���Rl���R/���(���R#���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRo���`��s����(���R���R���Ri���Rn���Ro���(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR{���[��s��� i���i���c��� ��� ���K���sP��t��j�|��|�|���|�|��_�i��|��_�g��|��_�d �|��_�d �|��_�|��j�d�d�d��|��j �d�d�d��t��|����|��_ �|��j �j�d�d�d�d�d�t���|��j�j �r��|��j �j�d�d�d��|��j �j �d�d�d��n��t�|��|��j�d�|�d�|�d �|��|��_�|�rx�|�D]�}�|��j�|���qWn��|��j�j�d�d�d�d�d�t���|��j�|��j���d �S(���s���Constructor arguments: page_names -- A list of strings, each will be the dictionary key to a page's widget, and the name displayed on the page's tab. Should be specified in the desired page order. The first page will be the default and first active page. If page_names is None or empty, the TabbedPageSet will be initialized empty. n_rows, max_tabs_per_row -- Parameters for the TabSet which will manage the tabs. See TabSet's docs for details. page_class -- Pages can be shown/hidden using three mechanisms: * PageLift - All pages will be rendered one on top of the other. When a page is selected, it will be brought to the top, thus hiding all other pages. Using this method, the TabbedPageSet will not be resized when pages are switched. (It may still be resized when pages are added/removed.) * PageRemove - When a page is selected, the currently showing page is hidden, and the new page shown in its place. Using this method, the TabbedPageSet may resize when pages are changed. * PagePackForget - This mechanism uses the pack placement manager. When a page is shown it is packed, and when it is hidden it is unpacked (i.e. pack_forget). This mechanism may also cause the TabbedPageSet to resize when the page is changed. i����t���weighti���Rr���Rs���Rt���R���R���R���N(���R ���R���t ���page_classt���pagest���_pages_orderR���t ���_current_paget ���_default_paget���columnconfiguret���rowconfigureRZ���Ru���Rv���Rp���R���t���change_paget���_tab_sett���add_page( ���R#���t���parentt ���page_namesR~���R���R���R���R%���RN���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR���c��s*���� c���������C���s����|�s�t��d�|�����n��|�|��j�k�r;�t�d�|�����n��|��j�|��j���|��j�|�<|��j�j�|���|��j�j�|���t �|��j���d�k�r��|�|��_ �|��j�|���n��d�S(���s0���Add a new page with the name given in page_name.s���Invalid TabPage name: '%s's!���TabPage named '%s' already existsi���N(���R���R���R���R~���RZ���R����R&���R����R(���R=���R����R����(���R#���R*���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR�������s���� c���������C���s����|�|��j��k�r"�t�d�|�����n��|��j�j�|���t�|��j���d�k�rl�|�|��j�k�ru�|��j�d�|��_�qu�n �d�|��_�|�|��j�k�r��|��j�|��j���n��|��j �j �|���|��j��j�|���}�|�j�j ����d�S(���s2���Destroy the page whose name is given in page_name.s���No such TabPage: '%si����N(���R���R)���R����R+���R=���R����R���R����R����R����R,���R9���Rl���R:���(���R#���R*���t���page(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���remove_page���s���� c���������C���s����|��j��|�k�r�d�S|�d�k �rA�|�|��j�k�rA�t�d�|�����n��|��j��d�k �rg�|��j�|��j��j����n��d�|��_��|�d�k �r��|�|��_��|��j�|�j����n��|��j�j�|���d�S(���s/���Show the page whose name is given in page_name.Ns���No such TabPage: '%s'(���R����R���R���R)���Ro���Rn���R����R2���(���R#���R*���(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR�������s���� N(���R���R���Ri���t���objectRk���Rq���Rx���R{���R���R!���R���R����R����R����(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyRj��� ��s��� ; t���__main__R����t���Foobart���BazR���i����R���R ���R���R���RC���t���FooRF���i���t���Bars���Add PageRD���c�����������C���s���t��j�t�j������S(���N(���t���tabPageR����t���entryPgNamet���get(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���<lambda>���s����s���Remove Pagec�����������C���s���t��j�t�j������S(���N(���R����R����R����R����(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyR�������s����s���name of page to add/remove:RE���i���N(���Ri���t���Tkintert ���ExceptionR���R���R ���R���Rj���R���t���Tkt���rootR!���R����R���R���t���TRUER|���t���LabelR���Rl���t���EntryR����t���Buttont ���buttonAddt���buttonRemovet���labelPgNamet���mainloop(����(����(����s+���/usr/lib64/python2.7/idlelib/tabbedpages.pyt���<module> ���s2��� ��� &&