[Tutor] Trying to find a value in a function.
D2
borelan@wanadoo.fr
Fri Mar 14 09:23:02 2003
Magnus Lycka a écrit:
> Are you trying to make the program write itself? ;)
That's true in some way.
What i want to do is to create objects from text files without having to
program this simple task and to avoid filling forms repeatedly.
So i imagine a solution with three components :
Import structure, the description of the object being created
and the description of its constructor,
Format structure, the description of the source text file,
Relation structure, the description of the relationship between an
Import and a Format Structure.
Import structure must contain :
the class
the constructor function
the required positional arguments : named args
the arguments with default values : named defs
meaningful labels for the arguments.
additional properties.
Format structure will describe a source text file containing the
necessary data to create objects described in the import structure.
The separation used between fields (separator, field legth, ...)
unique or multiple lines records,
unique or multiple fields lines in mutiple lines records, etc.
The Relation strcture will describe the association between the fields
in the source text file and the object's properties. The labels in the
Import Structure will help to build this relationship.
The usof the function.
So i think i'll have to get the source lines of the function, and parse
it to find assignation and generate a list of them.
Does that make sense ?
Andre