Download A4 - Wingware Python IDE
Transcript
71 assert isinstance(myvalue, mymodule.CMyClass) For extension modules written in C/C++, Wing will try to load and inspect the module to determine its contents. However, due to the design of Python’s extension module capability, the resulting information is more limited than what can be obtained from a Python file. To augment this, Wing can be given an interface file, which is a Python skeleton that replicates the functions, attributes, classes, and methods defined by the extension module. These files should be given the name of the extension module plus *.pi. For example, for an extension module imported as mymodule, the interface file would be named mymodule.pi. Examples of interface files can be see in resources/builtin-pifiles inside your Wing IDE installation. 4.11. Auto-save The source code editor auto-saves files to disk every few seconds. The auto-save files are placed in a subdirectory of your User Settings Directory. If Wing ever crashes or is killed from the outside, you can use these files to recover any unsaved changes. Copy the auto-save files to overwrite the older unsaved files, doing a comparison first to verify that the auto-save file is what you want. 4.12. Notes on Copy/Paste There are a number of ways to copy and paste text in the editor: • Use the Edit menu items. This stores the copy/cut text in the system-wide clipboard and can be pasted into or copied from other applications. • Use key equivalents as defined in the Edit menu. • Right-click on the editor surface and use the items in the popup menu that appears. • Select a range of text and drag it using the drag and drop feature (pressing shift before dropping will move text rather than copy it) • On Linux, select text anywhere on the display and then click with the middle mouse button to insert it at the point of click. • In emacs mode, ctrl-k (kill-line) will cut one line at a time into the private emacs clipboard. This is kept separate from the system-wide clipboard and is pasted using ctrl-y (yank-line). On Windows and Mac OS X, ctrl-y will paste the contents of the system-wide clipboard only if the emacs clipboard is empty.