Ask Your Question
0

Case opening file dir

asked Jul 24 '15

anonymous user

Anonymous

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)

2 answers

Sort by » oldest newest most voted
0

answered Jul 25 '15

jconto gravatar image

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.

link
0

answered Jul 27 '15

Veiko gravatar image

Thank you for help.

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

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jul 24 '15

Seen: 2,253 times

Last updated: Jul 27 '15

Related questions