Package nMOLDYN :: Package GUI :: Module ASCIIToNetCDFConversionDialog :: Class ASCIIToNetCDFConversionDialog
[hide private]
[frames] | no frames]

Class ASCIIToNetCDFConversionDialog

source code

Widgets.Toplevel --+
                   |
                  ASCIIToNetCDFConversionDialog

Sets up a dialog from where the user can convert a file with numeric data in ASCII or CDL format to NetCDF format.

The ASCII file may contain some comments introduced with the # character. These comments will also be written in the NetCDF output file (|comment| attribute). The numeric datas have to be organized by column. The only restriction is that all the columns should have the same length.

Instance Methods [hide private]
 
__init__(self, parent, title=None)
The constructor.
source code
 
body(self, master)
Create dialog body.
source code
 
buttonbox(self)
Add standard button box.
source code
 
ok(self, event=None) source code
 
cancel(self, event=None) source code
 
validate(self) source code
 
apply(self)
This method is called when the user clicks on the OK button of the conversion dialog.
source code
 
openASCIIFile(self, event=None)
This method/callback is called when the user press Return on the entry of the input file browser or browse directlry from the file browser.
source code
Method Details [hide private]

__init__(self, parent, title=None)
(Constructor)

source code 

The constructor.

Parameters:
  • parent - the parent widget.
  • title (string) - a string specifying the title of the dialog.

body(self, master)

source code 

Create dialog body. Return widget that should have initial focus.

apply(self)

source code 

This method is called when the user clicks on the OK button of the conversion dialog. It performs the conversion from the loaded NetCDF file to the selected ASCII file.

openASCIIFile(self, event=None)

source code 

This method/callback is called when the user press Return on the entry of the input file browser or browse directlry from the file browser. It will set the filebrowser entry to the name of the browsed file and propose and set a name for the output file based on the basename of the browsed file.