« first day (2169 days earlier)      last day (2780 days later) » 

8:00 PM
0
Q: Send data to front end using flask

kiran6i wanted to send data to front end which is received by a post request. Below is python endpoint. @app.route("/got_message", methods=['GET', 'POST']) def hello_monkey(): print(request.method) print(request.args) print(request.values.get("Body")) val = request.values.get("Body", ...

does that make sense to any of you?
 
Yeah. It's unclear.
Therefore, the sense I made of it was to vote as such
aaaand closed
 
That comes up at least every other day. The opposite too: "call Python function from JavaScript".
 
-1
A: how to install python module via terminal?

jrbedardYou can install using umake sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make sudo apt-get update sudo apt-get install ubuntu-make umake ide pycharm umake ide pycharm-professional More info here

wat??
 
8:18 PM
how to fix car via wrench
 
Cabbage everyone !
I have csv file that I add data into it via a python script, the problem is that sometimes data is on is a multi line string, therefore once added to the csv it screw up all it's structure, how can I avoid that ?
 
@davidism I'm already using csv module to handle my csv file .
 
Then newlines shouldn't mess up the structure.
 
8:27 PM
Then you're writing valid csv and the structure is fine.
 
First Column,"Contains
Newline",ThirdColumn
That is a valid csv row. Because the newline is contained in quotation marks, it should not be interpreted as a row delimiter.
It's no different from an entry that contains a comma really.
 
@QuestionC Does it need to be wrapped between quotation marks ?
 
Yes, that's CSV. They explained that in the sentence after the code.
 
You need to properly define your delimiters so your csv reader knows what to do with your data. If you look at the documentation davidism posted, there are different ways to handle the csv file based on how it is structured.
@AnttiHaapala ha...I could have sworn I voted to close that one....I obviously didn't :P
 
8:36 PM
There is no way to express a multi-line string in CSV without quotation marks around the newline.
 
and delv ^
 
Ok thank's everyone for the clarity, also what would you suggest me to go with csv or db ? because I just found an awesome very easy module called dataset that let you handle your data in a db easily, basically my app only add data to the csv and retrieve the same data based on one filter only .
 
Really, you just need to know that python's csv module is correct.
>>> import csv
>>> with open('eggs.csv', 'w') as csvfile:
...   spamwriter = csv.writer(csvfile)
...   spamwriter.writerow(['First Column', 'Contains\nNewline', 'ThirdColumn'])
...
>>>
 
lol
am I in candid camera, I am trying to review docs,
 
Choosing between csv and database is like choosing between Vespa and Winnebago. They reflect radically different capabilities.
 
8:40 PM
but the revq doesn't work
 
But most people just need the Vespa.
 
Can I have a Westfalia instead of a Vespa?
I think they're cooler
and I have kids....
 
good old honda for the whole family
 
amazing
 
I really hope that gets passed down to his son.
 
8:48 PM
Why not just bring your whole neighborhood? youtube.com/watch?v=kvDpoA9BkrE
 
This reminds me of when I used to hitch rides on the back of tractors when I'd visit family years ago.
 
good for transporting cattle as well.
 
hahaha
 
9:12 PM
stackoverflow.com/questions/6118635/… 2 votes needed for a stupid java resource request :D
 
9:35 PM
@AndrasDeak lol: Demonstrations in Helsinki tomorrow: one against racism and fascism, one against racism towards Finns specifically (this is code for white privileged heterosexual men being threatened by foreigners and feminists), one directly against the one against racism and fascism (so presumably in favour of fascism - wonder if they thought this through), one against Turkey's actions in Kurdistan and one against the equal marriage act.
... all of them within 4 hours in pretty much the same place...
 
lel, status.bitbucket.org started displaying "MAJOR OUTAGE" caused by "an incomplete push" just as I pushed something there
whatever that means :/
 
@AnttiHaapala niiiiiice:D
recbg
did that IRC become a thing while I was away?:P
 
10:11 PM
@vaultah If I had to guess, they tried pushing code and it didn't work. Halfway through the push process. Anything else is just really weird.
 

« first day (2169 days earlier)      last day (2780 days later) »