0

Case opening file dir

  • retag add tags

Hey

I try to make PSSE open file by my entered name. But it doesn't open it with string file directory. What kind of variable it needs or is there another way. My sample code is below and error under ##

name= str(raw_input('')) print(name) sav='.sav' casename=name+sav fdir='C:\PSS\FAILID\%s' %casename psspy.case(r"""str(fdir)""")

File not found. str(fdir).cnv (OpnApplFil/OPNPTI)

anonymous user
asked 2015-07-24 05:37:55 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Thank you for help.

Works fine now. I was using (r""" """) marks that the recorded macro added.

Veiko's avatar
3
Veiko
answered 2015-07-27 00:31:54 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Your code works fine. For the version below, run it after opening PSSe v.33 and enter 'savnw' [no quotes] to the question.

name= raw_input('enter a base case name [.sav]')
print (name)
sav='.sav'
casename=name+sav
fdir='C:\Program Files (x86)\PTI\PSSE33\EXAMPLE\%s'%casename
print (fdir)
psspy.case(fdir)

Your error message contains a '.cnv' extension. My guest is you are typing an invalid filename that it does not exist in your working folder.

jconto's avatar
2.9k
jconto
answered 2015-07-24 19:04:44 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer