f.read(myInteger1, myFloat1, myString1)
My data file will be:
'b' 'breadth of member' 250
'D' 'overall depth of member' 550
Each line having three entries: <variable name>,<Description>,<Default vaule>
These may be separated by comma, tab or space. If I am able to read
and have list like:
varList[ [ 'b', 'breadth of member', 250 ] , [ 'D', 'overall depth of
member', 550 ] ]
then that will serve my purpose.
With regards,
--
H.S.Rai
Please send another email with a short example file attached, which is
*exactly* like the file you want to read in. I'm sure somebody will
respond with a snippet of code to do what you want.
The code will likely look like
varList = [x.replace(',',' ').split() for x in open('file').readlines()]
William
Thanks to William and David for helping me. I may able to achieved
what I targeted with following code:
f = open('example01Data.txt')
varList = [x.split(' // ') for x in f.readlines()]
where data in example01Data.txt is separate by " // ", sample data is
below signature.
Now the problem I am facing to use it in LaTeX, is reported in next email.
Thanks and regards,
--
H.S.Rai
=======================
b // breadth of beam // 300
d // effective depth of beam // 550
D // overall depth of beam // 600
A_st // area of reinforcement // 0
phi_b // diameter of reinforcing steel bar // 12