示例#1
0
文件: plotcsv.py 项目: Imme1992/wflow
def getcsvname():
	themodel = wfl.GetModelByPartialName('wflow')
		
	dialog = OpenFileDialog()
	
	if themodel:
		dialog.InitialDirectory = os.path.join(themodel.DirectoryPath,themodel.DefaultOutputDirectoryName)
	else:
		dialog.InitialDirectory ="C:\\"
	 
	dialog.Filter = "csv files (*.csv) | *.csv"
	dialog.FilterIndex = 1
	dialog.RestoreDirectory = False
	dialog.Title = "Select a WFlow result csv file: "
	
	if (dialog.ShowDialog() == DialogResult.OK):
		thefile = dialog.FileName
		
	return thefile
示例#2
0
def getcsvname():
    themodel = wfl.GetModelByPartialName("wflow")

    dialog = OpenFileDialog()

    if themodel:
        dialog.InitialDirectory = os.path.join(
            themodel.DirectoryPath, themodel.DefaultOutputDirectoryName)
    else:
        dialog.InitialDirectory = "C:\\"

    dialog.Filter = "csv files (*.csv) | *.csv"
    dialog.FilterIndex = 1
    dialog.RestoreDirectory = False
    dialog.Title = "Select a WFlow result csv file: "

    if dialog.ShowDialog() == DialogResult.OK:
        thefile = dialog.FileName

    return thefile
示例#3
0
one = "c:\\repos\wflow-git\\examples\\wflow_rhine_sbm\\pmult\\store.csv"
two = "c:\\repos\wflow-git\\examples\\wflow_rhine_sbm\\run_default\\store.csv"

themodel = wfl.GetModelByPartialName("wflow")

dialog = OpenFileDialog()

if themodel:
    dialog.InitialDirectory = os.path.join(themodel.DirectoryPath,
                                           themodel.DefaultOutputDirectoryName)
else:
    dialog.InitialDirectory = "C:\\"

dialog.Filter = "csv files (*.csv) | *.csv"
dialog.FilterIndex = 1
dialog.RestoreDirectory = False
dialog.Title = "Select a WFlow result csv file: "

if dialog.ShowDialog() == DialogResult.OK:
    thefile = dialog.FileName

casename = os.path.dirname(os.path.dirname(thefile))
csvfile = os.path.basename(thefile)

print casename

runs = getrunids(casename)

print runs
示例#4
0
文件: tst.py 项目: Imme1992/wflow
one = 'c:\\repos\wflow-git\\examples\\wflow_rhine_sbm\\pmult\\store.csv'
two = 'c:\\repos\wflow-git\\examples\\wflow_rhine_sbm\\run_default\\store.csv'



themodel = wfl.GetModelByPartialName('wflow')
	
dialog = OpenFileDialog()

if themodel:
	dialog.InitialDirectory = os.path.join(themodel.DirectoryPath,themodel.DefaultOutputDirectoryName)
else:
	dialog.InitialDirectory ="C:\\"
 
dialog.Filter = "csv files (*.csv) | *.csv"
dialog.FilterIndex = 1
dialog.RestoreDirectory = False
dialog.Title = "Select a WFlow result csv file: "

if (dialog.ShowDialog() == DialogResult.OK):
	thefile = dialog.FileName
	
casename = os.path.dirname(os.path.dirname(thefile))
csvfile = os.path.basename(thefile)

print casename

runs = getrunids(casename)

print runs