Free Energy | searching for free energy and discussing free energy

Open Source Software => Open Source application software for your PC => Topic started by: ayeaye on October 13, 2018, 06:42:50 AM

Title: Python online compiler
Post by: ayeaye on October 13, 2018, 06:42:50 AM
I looked at quite a few. Then found the following, and it appeared to be good. (

The code can be edited, which is the most important for the purpose. One cannot provide a standard input data, which is bad. But one can provide an input file. The solution is to name it always "input.txt". So the example that i provided earlier, that inputs and outputs a list, becomes the following.

a = 1.2
f = open("input.txt")
for s in f:
   print(float(s) + a)

What was added is only file open and file close, and the file is always the same. The black triangle above there, runs it.

Title: Re: Python online compiler
Post by: ayeaye on November 04, 2018, 08:08:42 PM
To get some idea, parse a csv line from oscilloscope output, using the function nextt().

def nextt(sl, separator):
  endp = sl[0].find(separator)
  if (endp == -1): endp = len(sl[0])
  tok = sl[0][: endp]
  sl[0] = sl[0][endp + 1 : ]
  return tok

csv = ["-8.800000e-07,-0.0335937,27.7188,29.9703,0.00242187,,-8.800000e-07,1.40625e-06"]
while (csv[0] != ""):
  print(nextt(csv, ","))




Trinket. (