Back to index

plone3  3.1.7
Classes | Functions | Variables
ExternalEditor.zopeedit Namespace Reference

Classes

class  Configuration
class  ExternalEditor
class  EditorProcess

Functions

def errorDialog
def askRetryCancel
def askYesNo
def has_tk
def fatalError

Variables

string __version__ = '0.9.3'
 Copyright (c) 2001, 2002 Zope Corporation and Contributors.
string win32 = 'win32'
tuple logger = logging.getLogger('zopeedit')
 log_file = None
string title = 'Zope External Editor'
string default_configuration
 args = sys.argv
tuple credits
list input_file = sys.argv[1]

Function Documentation

Definition at line 654 of file zopeedit.py.

00654 
00655     def askRetryCancel(message):
00656         return MessageBox(message, title, 
00657                           MB_OK + MB_RETRYCANCEL + MB_ICONEXCLAMATION 
00658                           + MB_SYSTEMMODAL) == 4

Here is the caller graph for this function:

Definition at line 659 of file zopeedit.py.

00659 
00660     def askYesNo(message):
00661         return MessageBox(message, title, 
00662                           MB_OK + MB_YESNO + MB_ICONQUESTION +
00663                           MB_SYSTEMMODAL) == 6

Here is the caller graph for this function:

Error dialog box

Definition at line 651 of file zopeedit.py.

00651 
00652     def errorDialog(message):
00653         MessageBox(message, title, MB_OK + MB_ICONERROR + MB_SYSTEMMODAL)

Here is the caller graph for this function:

def ExternalEditor.zopeedit.fatalError (   message,
  exit = 1 
)
Show error message and exit

Definition at line 750 of file zopeedit.py.

00750 
00751 def fatalError(message, exit=1):
00752     """Show error message and exit"""
00753     global log_file
00754     errorDialog('FATAL ERROR: %s' % message)
00755     # Write out debug info to a temp file
00756     debug_f = open(mktemp('-zopeedit-traceback.txt'), 'w')
00757     try:
00758         # Copy the log_file before it goes away on a fatalError.
00759         if log_file is not None:
00760             log_file.seek(0)
00761             shutil.copyfileobj(log_file, debug_f)
00762             print >> debug_f, '-' * 80
00763         traceback.print_exc(file=debug_f)
00764     finally:
00765         debug_f.close()
00766     if exit: 
00767         sys.exit(0)

Here is the call graph for this function:

Here is the caller graph for this function:

Sets up a suitable tk root window if one has not
   already been setup. Returns true if tk is happy,
   false if tk throws an error (like its not available)

Definition at line 687 of file zopeedit.py.

00687 
00688     def has_tk():
00689         """Sets up a suitable tk root window if one has not
00690            already been setup. Returns true if tk is happy,
00691            false if tk throws an error (like its not available)"""
00692             # create a hidden root window to make Tk happy
00693         if not locals().has_key('tk_root'):
00694             try:
00695                 global tk_root
00696                 from Tkinter import Tk
00697                 tk_root = Tk()
00698                 tk_root.withdraw()
00699                 return 1
00700             except:
00701                 return 0
00702         return 1

Here is the call graph for this function:


Variable Documentation

Copyright (c) 2001, 2002 Zope Corporation and Contributors.

All Rights Reserved.

This software is subject to the provisions of the Zope Public License, Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.

Definition at line 19 of file zopeedit.py.

Definition at line 846 of file zopeedit.py.

Initial value:
00001 ('Zope External Editor %s\n'
00002                        'By Casey Duncan, Zope Corporation\n'
00003                        'http://www.zope.com/')

Definition at line 849 of file zopeedit.py.

Definition at line 768 of file zopeedit.py.

Definition at line 858 of file zopeedit.py.

Definition at line 46 of file zopeedit.py.

tuple ExternalEditor.zopeedit.logger = logging.getLogger('zopeedit')

Definition at line 45 of file zopeedit.py.

string ExternalEditor.zopeedit.title = 'Zope External Editor'

Definition at line 638 of file zopeedit.py.

Definition at line 23 of file zopeedit.py.