Hi folks

I feel like this is a simple task, but being so new to python and not having the time to fully come to grips with it I am utterly overwhelmed...

I simply want to replace whatever text is at a particular position in a particular line with the value I have read from another file. For example (clearly wrong)

ifile = open('inputfile.txt','r')

#Read inputfile.txt which contains multiple lines with 2 cols of data, the 1st col contains the name of a variable & the 2nd col a new value to use such that eg. line[0]=('Variable1', 'new_value1'); line[1]=('Variable2', 'new_value2')

with open('ofile.txt', 'w') as outfile:
    with open(ifile, 'r') as infile:
        for line in infile:
            if line.startswith('Variable1'):
                outfile.write(#???write new_value1 to line x from position y to z of the line (incl blanks) ???)
                continue
            if line.startswith('Variable2'):
                outfile.write(#???somehow write new_value2 to line i from position j to k of the line (incl blanks) ???)
                continue

Helpies?
Thanksies!

Unfortunately none of those links are able to help me.

The problem is that the file I need to overwrite is a large text file full of numbers in particular places, corresponding to reads from the calling Fortran code, without any keywords to identify the variables. I have to refer to the user manual to deduce what line of the text file and what positions within that line correspond to the variable of interest.

The relative position of the variable's numeric value in the file is, fortunately, quite consistent, so if I can specify a point in the text file by using a line number and character position range on that line I can essentially treat the variable location as a cartesian point, with line number as y and character position as x1->x2.

I do not need to edit hundreds of variables, only a few, but I need to change the value of those few variables many times, so I can hard-code in the specific position I need to edit for each variable according to it's name. I could then read in the name as the first element and the value as the second element of the line:
e.g. line[0]=('Variable1', 'new_value1')

I would then check if the first value of the line is "Variable 1" and if it is then replace a particular location in the model's input file, based on line number and character position, with "new_value1"

I have NO clue.

If you need to change at places which are very specific and at are constant it is better you use regular expressions as the expression changes according to your data..

This is is the sample expressing I am passing you which may help you in getting an idea

(?<=imgfurl)(.*)(?=dim)

This is the expression to get all the data which appear to be constatnd between words imgfurl and dim

Like this write your own regular expression according to your data

Thank you for the suggestion, but unfortunately that solution won't work either.

I have attached a copy of the input file to illustrate exactly what I'm working with. I need to be able to replace any one of the numbers in that file.

I truly see no other option besides a line and position-on-the-line specification for a write statement.

I cannot perform any sort of search for a point of reference based on some word or non-numeric text because clearly there are none (there are some line labels but I can already specify a line - it's the line;line-position specification that is the problem). I also cannot perform a search for a particular number to replace because the numbers change all the time and can be repeated for different variables.

Attachments
TEST RUN
END NOTE                                                                END NOTE
      NOSAMV=        1 (NUMBER OF DIMENSIONS THAT MUST STAY THE SAME)
      NODIMV=        2 (NUMBER OF DIMENSIONS TOTAL)
TESTWET /IDP...R00        00        00
Full TEST model domain                                                  R2 TITL
TEST Model      27 NOV '07   3/ 9/ 2 1: 8:27 IDPV6.0                    R3 DATE
Halfdt,Titide,Tstart,Trst,Tstop,Tirst,Tihisp,Tihist,DAYOFFSTSWIFT
0.50,100.,0.,0.,5000.,5000.,5000.,5000.,0.                              R4 TIMEA
999999999999999999999999   20.   50.999999  250.    0.    0.999999     0R5 TIMEB
     0     0     2     1     0     5     1     4     1     1     1     0R6 FLAGS
     7     7     7     7     7     7                                    R7 INPR1
     7     7     7     7     7     7     7                              R8 INPR2
     0   100   100   100     0     0     0     0   100                  R9 OTPR1
   100     0     0     0     0     0     0                              R10OTPR2
  360.  720. 1440. 1800. 2160. 2520. 2880. 3240. 3600. 3960. 4320.      R11 PRT1
 4680. 5040.                                                            R12 PRT2
                                                                        R13 PRT3
                                                                        R14 PRT4
    11   101     1     0     1     0     0     0     0     4     0     0R15 DIMA
     0     0                                                            R16 DIMB
   0.0   0.0   0.5     0     0     0     0     0     0     0            R17 CNST
   0.0    0.  100.  1.50   0.0  0.01   5.0   1.0   0.5   1.0  1.00   0.0R18 PHCH
   9.807   .0018  .00129  1.0000   .5144    14.3  1000.0   0.950 140.002R19 COFA
                                                                        Ploter D
                                                                        Nctitl D
                                                                        Hx  USED
                                                                        Dxpdy ED
                                                                        Iplc SED
                                                                        Linx SED
     25.   1.025    .698     0.0     25.     25.     25.                R26 COFB
    1    5    5 TESTWL                                                  WL-Sta.
    1    5    5 TESTCS                                                  UV-Sta.
                                                                        END DAM
      0.      0.     0.0                                                RS8 WIND
 1 9  1  2  1 49 1  2.9697 BOTTOM LT CORNER   TOPBOT LT CORNER          RS12_1
 2 9  1 50  1 52 1  2.9697 MIDDLE LT2         MIDDLE LT2                RS12_2
 3 9  1 53  1100 1  2.9697 BOTTOP LT CORNER   TOP LT CORNER             RS12_3
 411 10  2 10100 1  2.9697 BOTTOM RT CORNER   TOP RT CORNER             RS12_4
 1   0.050  30.0     0.0                                                RS13_1
 2   0.050  30.0     1.0                                                RS13_2
 3   0.050  30.0     0.0                                                RS13_3
 4   0.050  30.0                                                        RS13_4
 1   0.0   CON1               ppt/psu                                   RS20_1     
 1 0.0                                                                    RS21_1
 1                                                                        RS22_1
                                                                          RS23
                                                                          RS24
                                                                          RS25                                                             
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00
 -1.00 -1.00 -1.00 -1.00

I looked at the file. It's a very nice file. Still I have no idea what should be replaced with what.
Can you please explain this, assuming that I am going to play a computer, that is, exhibit an intelligence slightly higher than one of a amoeba?

I looked at the file. It's a very nice file. Still I have no idea what should be replaced with what.
Can you please explain this, assuming that I am going to play a computer, that is, exhibit an intelligence slightly higher than one of a amoeba?

Right, so every single number in that file represents a parameter in my (BIG) computer model - it is an input file, and the position of the values in the text file is extremely important if they are to be read into the parameters correctly by the Fortran code my model is written in.

Some of the parameters in that file I would like to vary and then rerun the model to see the effect of changing the value. Which parameters I end up wanting to vary in particular don't matter because whatever method works for one should work for all.

I have a separate file containing the new values I would like to use (let's call it input2.txt). In order to use these values I have to know 1) what parameter the values in input2.txt correspond to, 2) where that parameter's position is in the main input file time.txt, and 3) how to replace the original value with the new value.

To solve 1) I have proposed that each line in input2.txt contain first a label (being the name of the parameter I want to replace) and a value (the new value I want to use in time.txt).

To solve 2) I would then use the label to identify which parameter it is. Knowing this I can use the model's user manual to determine exactly where in time.txt the new value must go: this information will be comprised of a line number, and a range within that line e.g. line 23, character position 20 to 25.

I do not know how to solve 3) - how do I write the confounded value I have read from input2.txt into the exactly correct position within time.txt?

Stubaan> I do not know how to solve 3) - how do I write the confounded value I have read from input2.txt into the exactly correct position within time.txt?
Let's get this last part first out of the way. You don't change it in place, you save it to a temporal buffer file and after finishing you overwrite the original.

Assuming your lines must keep same length after change. Assuming that everything is predictably formated.

For simplicity let say you have this file

Cool@Deepblue:~/Programming/Python$ cat time.txt

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

Now, to read this file line by line you might write:

while 1:
    line = inputfile.readline()  # grab a line
    if not line: break             # end of file reached
    # we do something with line now

If you want to know when you are in a particular line number, you can keep track of it and if you get to the wanted line you can perform modification on it:

lineno = 0                      # line tracker
while 1:
    line = inputfile.readline() # grab a line
    if not line: break              # end of file reached
    lineno = lineno + 1          # current working line
    
    if lineno == chosen_line:    # are we there yet?
        # Some work on given line will happen here
    else:
        # Copy as it is into temp file

Stubaan> To solve 1) I have proposed that each line in input2.txt contain first a label (being the name of the parameter I want to replace) and a value (the new value I want to use in time.txt).

Stubaan> To solve 2) I would then use the label to identify which parameter it is. Knowing this I can use the model's user manual to determine exactly where in time.txt the new value must go: this information will be comprised of a line number, and a range within that line e.g. line 23, character position 20 to 25.

OK. You need some values now and a couple files to work with:

parameterline = 2  # an arbitrary line to work on it; can be obtain from file

datamod = '-2.00'  # some data for modification, it can be obtain from a file as well
start_point = 19   # start_point = len('-1.00 -1.00 -1.00 ') 


inputfile = open('time.txt', 'r')

outputfile = open('time.txt.out', 'w')



lineno = 0              # line tracker

while 1:

    line = inputfile.readline()  # grab a line

    if not line: break             # end of file reached

    lineno = lineno + 1          # current working line

    if lineno == parameterline:     # are we there yet?

       # here's the working bit that makes the sustitution.

        modifiedline = line[:start_point] + datamod + line[start_point + len(datamod):]

        outputfile.write(modifiedline)

    else:

        outputfile.write(line)      # copy line as it is into temp file



inputfile.close()                   # done with it.

outputfile.close()                  # rename afterward with the original name

Cool@Deepblue:~/Programming/Python$ cat time.txt.out

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -2.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

-1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00 -1.00

Edited 6 Years Ago by Aia: I like to edit

Wow - Aia THANK YOU!

I need to absorb all of that and see where it gets me, but it definitely seems to be very much the sort of solution I am looking for.

I am currently swamped with other problems I need to be working on right now, having spent too long on this issue the past week, but hopefully some time in the coming week I can return to it and wrap it up, and then report back with good news.

My sincere thanks! And I really appreciate you taking the time to lay out the thought processes behind your proposed solution. Most of my recent Python frustrations stem from feeling like I am implementing code that I don't really understand because I do not have the luxury of time to study Python and work myself into it. This helps me learn and helps me - perfect!

Aia owe you big time!

This article has been dead for over six months. Start a new discussion instead.