Answer the question
In order to leave comments, you need to log in
Python + Potgres?
people in general, it became necessary to do the following - connect to pg with a python script to get the data and write it on the web server as date.php . downloaded www.jetbrains.com/pycharm downloaded python.projects.pgfoundry.org but here is the fact and what to do next. I even forgot to import how? tell me pzhs
UPD
the process went faster.
you need to write the array received from the database in the form
[
[1147651200000,67.79],
[1147737600000,64.98],
[1147824000000,65.26],
[1147910400000,63.18]
]
something like this happened
f = open('text.txt', 'w')
r=[]
e=[]
for name,d, in db.prepare('''SELECT
"ID",
"FName"
FROM
"SC_Wonder"."TMineObj" ;'''):
#print(str(name) + '\n')
r.append(name)
e.append(d)
f.write('[')
for i in range(len(d)):
f.write('['+str(r[i])+','+str(e[i])+']')
f.write("]")
f.close()
Answer the question
In order to leave comments, you need to log in
Better take this .
There in examples just almost your script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question