Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. from flask import Flask, render_template, redirect, url_for
  2.  
  3. app = Flask(__name__)
  4.  
  5. @app.route('/')
  6. def index():
  7.  
  8. return render_template('index.html')
  9.  
  10. @app.route('/move')
  11. def b():
  12. import movingin
  13. return redirect(url_for('index'))
  14.  
  15. @app.route('/call')
  16. def c():
  17. import firstcall
  18. return redirect(url_for('index'))
  19.  
  20. if __name__ == '__main__':
  21. app.run(debug=True, host='0.0.0.0')
  22.  
  23. import pygame
  24. pygame.mixer.init()
  25. pygame.mixer.music.load("/home/pi/Music/first call.wav")
  26. pygame.mixer.music.play()
  27. while pygame.mixer.music.get_busy() == True:
  28. continue
  29.  
  30. <div class="col-1-4 mobile-col-1-1">
  31. <div class="button"><a href="/move">Moving In</a></div>
  32. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement