Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pythonのアプリ開発にElectronという選択肢

massyuu
October 26, 2017

 Pythonのアプリ開発にElectronという選択肢

pyfukuoka #2
at 2017/10/26
in Fukuoka City

massyuu

October 26, 2017
Tweet

More Decks by massyuu

Other Decks in Programming

Transcript

  1. 'MBTL 1ZUIPOͷܰྔ8&#ΞϓϦέʔγϣϯϑϨʔϜϫʔΫ ܰͯ͘ϧʔςΟϯάػೳ͕͋Ε͹͍͍ͱࢥͬͯ࠾༻ ࠓճͷΞϓϦͷຊମ from flask import Flask, request app

    = Flask(__name__) @app.route("/", methods=['GET', 'POST']) def main(): if request.method == "POST" : # ϦΫΤετͷऔಘ user_name = request.form["username"] count = request.form["count"] IFMMPQZ
  2. +JOKB 1ZUIPO༻ͷςϯϓϨʔτΤϯδϯ ϩδοΫͱ)5.-Λ෼͚ͯ؅ཧͰ͖Δ QZͷதͰ)5.-Λॻ͖ͨ͘ͳ͍ͷͰ࠾༻ {% if tweets != '' %}

    <ons-page> <ons-toolbar> <div class="center">{{ user_name }} Tweet</div> <div class="right"><ons-button><a href="/">Back</a></ons-button></div> </ons-toolbar> <ons-scroller> <ons-list> {% for tweet in tweets %} <ons-list-item>{{ tweet.text }}</ons-list-item> {% endfor %} </ons-list> </ons-scroller> </ons-page> {% endif %} JOEFYIUNM
  3. 0OTFO6* 6*ϑϨʔϜϫʔΫ ؆୯ʹ͍͍ײ͡ͷ6*Λ࣮ݱͰ͖Δ σβΠϯηϯεͷͳ͍ࣗ෼Λॿ͚ͯ͘ΕΔ <ul> {% for tweet in tweets

    %} <li>{{ tweet.text }}</li> {% endfor %} </ul> <ons-list> {% for tweet in tweets %} <ons-list-item>{{ tweet.text }}</ons-list-item> {% endfor %} </ons-list> JOEFYIUNM