Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
U i_;@s(dZddlZddlZddlZddlZddlmZmZddl m Z m Z m Z m Z mZmZddlmZmZmZmZmZddl mZddlmZGdd d e ZGd d d eZGd d d eZGdddeZGdddeZGdddeZedkr$ddl m!Z!e!ddddddl"m#Z#e#eeedS)a| Dialogs that query users and verify the answer before accepting. Query is the generic base class for a popup dialog. The user must either enter a valid answer or close the dialog. Entries are validated when is entered or [Ok] is clicked. Entries are ignored when [Cancel] or [X] are clicked. The 'return value' is .result set to either a valid answer or None. Subclass SectionName gets a name for a new config file section. Configdialog uses it for new highlight theme and keybinding set names. Subclass ModuleName gets a name for File => Open Module. Subclass HelpSource gets menu item and path for additions to Help menu. N) executableplatform)Toplevel StringVar BooleanVarWES)FrameButtonEntryLabel Checkbutton) filedialog)FontcsleZdZdZdidddddZddd Zd d Zdd dZddZdddZ dddZ fddZ Z S)QueryzoBase class for getting verified answer from a user. For this base class, accept any non-blank string. Ftext0 used_names_htest_utestc Cs\||_||_||_||_t||||||||sL| |j dd}|dkrz|j dd|j ddWn YnX| d|j| d |j|d |j| d |j| d |j|||d ||d|d||s(|d|dndf|jddd|sX||dS)aCreate modal popup, return when destroyed. Additional subclass init must be done before this unless _utest=True is passed to suppress wait_window(). title - string, title of popup dialog message - string, informational message to display text0 - initial value for entry used_names - names already in use _htest - bool, change box location when running htest _utest - bool, leave window hidden and not modal tkwindowingsystemZaquaz!::tk::unsupported::MacWindowStylestyleZ moveableModalrz z ZWM_DELETE_WINDOWz z z+%d+%dF)ZheightwidthN)parentmessagerrr__init__ZwithdrawtitleZ transientZgrab_setrcallZ_wbindcancelprotocolokcreate_widgetsZupdate_idletasksZgeometryZ winfo_rootxZ winfo_widthZwinfo_reqwidthZ winfo_rootyZ winfo_heightZwinfo_reqheightZ resizableZ deiconifyZ wait_window) selfrr!rrrrrrr),/opt/python38/lib/python3.8/idlelib/query.pyr %sV    zQuery.__init__OKcCs6t|dd|_}|jdddd|jdddt|dd |jd }t||j|_t |d |jd |_ |j t d d|j d|_t|dd|jd|_|jddddtd|j jddddttddgd|jjddddttd|t||d|jd|_t|d|jd|_|jjdddd|jjdddddS)zCreate entry (rows, extras, buttons. Entry stuff on rows 0-2, spanning cols 0-2. Buttons on row 99, cols 1, 2. )ZpaddingrZnews)columnrowsticky)ZweightwleftZanchorZjustifytext)r textvariableZ TkCaptionFontT)nameexistsroot redr4Z foregroundZfontr-r. columnspanpadxr/r-r.r@rAr/padyrZactive)r4defaultcommandZCancel)r4rEc)r-r.rAN)r framegridZgrid_columnconfigurer rrrZentryvarr entry focus_setrr error_font entry_errorrr create_extrar r&Z button_okr$Z button_cancel)r(Zok_textrGZ entrylabelr)r)r*r'\sJ zQuery.create_widgetscCsdSNr)r(r)r)r*rMzQuery.create_extraNcCsd||p|jd<dS)NzERROR: r4)rL)r(rZwidgetr)r)r* showerrorszQuery.showerrorcCs$|j}|s |ddS|S)zReturn non-blank entry or None.z blank line.N)rIgetstriprQ)r(rIr)r)r*entry_oks  zQuery.entry_okcCs8d|jd<|}|dk r*||_|n |jdS)zIf entry is valid, bind it to 'result' and destroy tk widget. Otherwise leave dialog open for user to correct entry or cancel. rr4N)rLrTresultdestroyrIrJ)r(eventrIr)r)r*r&s   zQuery.okcCsd|_|dS)z0Set dialog result to None and destroy tk widget.N)rUrV)r(rWr)r)r*r$sz Query.cancelcs|tdSrN)Z grab_releasesuperrVrO __class__r)r*rVsz Query.destroy)r+)N)N)N) __name__ __module__ __qualname____doc__r r'rMrQrTr&r$rV __classcell__r)r)rYr*r s 7 %   rcs0eZdZdZdddfdd ZddZZS) SectionNamez*Get a name for a config file section name.Frrcstj||||||ddS)N)rrrrXr )r(rr!rrrrrYr)r*r szSectionName.__init__cCsV|j}|s |ddSt|dkr:|ddS||jkrR|ddS|S)z2Return sensible ConfigParser section name or None.no name specified.Nr5z"name is longer than 30 characters.zname is already in use.)rIrRrSrQlenr)r(r7r)r)r*rTs     zSectionName.entry_okr[r\r]r^r rTr_r)r)rYr*r`s r`cs0eZdZdZdddfdd ZddZZS) ModuleNamez-Get a module name for Open Module menu entry.Fracstj||||||ddS)Nrrrrb)r(rr!rrrrrYr)r*r szModuleName.__init__c Cs|j}|s |ddSztj|}Wn:ttfk rj}z|t |WYdSd}~XYnX|dkr|ddSt |j tj j s|ddSz|j |}Wnhtk r|dYdStk rz|j }Wn$tk r|dYYdSXYnX|S)z0Return entered module name as file path or None.rcNzmodule not found.znot a source-based module.z%loader does not support get_filename.zloader failed to get filename.)rIrRrSrQ importlibutil find_spec ValueError ImportErrorstr isinstanceloaderabc SourceLoader get_filenameAttributeError TypeError)r(r7specmsgZ file_pathr)r)r*rTs6     zModuleName.entry_okrer)r)rYr*rfs rfc@seZdZdZddZdS)Gotoz1Get a positive line number for editor Go To Line.cCsNzt|j}Wn tk r2|dYdSX|dkrJ|ddS|S)Nznot a base 10 integer.rznot a positive integer.)intrIrRrkrQ)r(linenor)r)r*rTs  z Goto.entry_okN)r[r\r]r^rTr)r)r)r*rwsrwcs\eZdZdZddidddfdd ZddZd d Zd d Zej Z d dZ ddZ Z S) HelpSourcez,Get menu name and help source for Help menu.rF)menuitemfilepathrrrc s(||_d}tj|||||||ddS)zGet menu entry and url/local file for Additional Help. User enters a name for the Help resource and a web url or file name. The user can browse for the file. zName for item on Help menu:rN)r|rXr ) r(rr!r{r|rrrrrYr)r*r szHelpSource.__init__cCs|j}t|dddd}t||j|_t||jdd|_t|dd|jd }t|d d |j d |_ |j d ddddd gt d|jj d dddt t dd gd|j dddt td|j j d dddt t ddS)zAdd path widjets to rows 10-12.r1r2z,Help File Path: Enter URL or browse for filer3()r6rZBrowse)r4rrEr:r;r<rr,r=r>)r-r.r@rArCr/ rrB)r-r.rAr/ r?N)rGr rr|pathvarr pathr browse_filerK path_errorrHrrr )r(rGZ pathlabelZbrowser)r)r*rM s,zHelpSource.create_extracCstj||dj||dS)N)r filetypes)Z initialdirZ initialfile)rZOpenZshow)r(rZinitdirZinitfiler)r)r* askfilenameszHelpSource.askfilenamecCsdddddg}|j}|r.tj|\}}nHd}tdddkrntjtjtd}tj |svt }nt }| |||}|r|j |dS) N)z HTML Filesz *.htm *.htmlTEXT)z PDF Filesz*.pdfr)zWindows Help Filesz*.chm)z Text Filesz*.txtr)z All Files*r=winZDoc) rrRosrsplitrjoindirnamerisdirgetcwdrset)r(rrdirbasefiler)r)r*r%s$   zHelpSource.browse_filecCs||j}|s$|d|jdS|dsx|dddkrJ|dd}tj|sh|d|jdStdkrxd|}|S) z(Simple validity check for menu file pathzno help file path specified.N)zwww.Zhttpr>zfile:zhelp file path does not exist.darwinzfile://) rrRrSrQr startswithrr8r)r(rr)r)r*path_ok=s   zHelpSource.path_okcCs6d|jd<|}|}|dks*|dkr.dS||fS)z,Return apparently valid (name, path) or Nonerr4N)ritem_okr)r(r7rr)r)r*rTNs zHelpSource.entry_ok) r[r\r]r^r rMrrr`rTrrr_r)r)rYr*rzs rzcsBeZdZdZgdddfdd ZddZdd Zd d ZZS) CustomRunzGet settings for custom run of module. 1. Command line arguments to extend sys.argv. 2. Whether to restart Shell or not. F)cli_argsrrcs d}tj||||||ddS)zcli_args is a list of strings. The list is assigned to the default Entry StringVar. The strings are displayed joined by ' ' for display. z$Command Line Arguments for sys.argv:rgNrb)r(rr!rrrrrYr)r*r ]szCustomRun.__init__cCsj|j}t|dd|_t||jdddd}t|dd|jd|_|jd d d d d d|jjd dd d dddS)zAdd run mode on rows 10-12.T)valueFz Restart shell)variableZonvalueZoffvaluer4r:r;r<rr,r=r>r1r?rZweN)rGr restartvarrr rKZ args_errorrH)r(rGrestartr)r)r*rMis zCustomRun.create_extrac Cs\|j}ztj|dd}Wn6tk rV}z|t|WYdSd}~XYnX|S)z6Validity check and parsing for command line arguments.T)posixN)rIrRrSshlexrrkrQrm)r(Z cli_stringrerrr)r)r* cli_args_okvszCustomRun.cli_args_okcCs&|}|j}|dkrdS||fS)z4Return apparently valid (cli_args, restart) or None.N)rrrR)r(rrr)r)r*rTs zCustomRun.entry_ok) r[r\r]r^r rMrrTr_r)r)rYr*rUs   r__main__)mainzidlelib.idle_test.test_queryrF) verbosityexit)run)$r^importlib.utilrh importlib.abcrrsysrrtkinterrrrrrr Z tkinter.ttkr r r r rrZ tkinter.fontrrr`rfrwrzrr[ZunittestrZidlelib.idle_test.htestrr)r)r)r*s(   *\2