import webapp2
import jinja2
import os

template_env = jinja2.Environment(
	loader=jinja2.FileSystemLoader(os.getcwd()))

class InputPage(webapp2.RequestHandler):
	def get(self):
		#self.reponse.out.write('asdf')
		template = str(template_env.get_template('input.html'))
		context = {
			'abc':1,
		}
		self.response.out.write(template.render(context))

	def post(self):
		try:
			text_input = str(self.request.get('input_textarea')) ####
			template = template_env.get_template('input.html')
			context = {
				'input_text':text_input,
			}
			self.response.out.write(template.render(context))
		except ValueError:
			pass



application = webapp2.WSGIApplication([('/input',InputPage)],debug=True)

๊ธฐ๋ณธ์ž‘์—…์ค‘์— #### (19๋ฒˆ์งธ ์ค„)์—์„œ ์ง„ํ–‰์ด ์•ˆ๋˜๊ธธ๋ž˜, str() ํ•จ์ˆ˜๋Š” ๋ถ„๋ช… ๋ฌธ์ œ๊ฐ€ ์—†๋Š”๋ฐ ๋ง์ด๋‹ค.

ํ„ฐ๋ฏธ๋„๋กœ ๋“ค์–ด๊ฐ€์„œ ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๋‹ค๋ณด๋‹ˆ 2~3๋ฒˆ ์ปค๋งจ๋“œ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ Segmentation fault: 11

๊ตฌ๊ธ€๋ง์„ ํ•˜๋‹ˆ, ๊ฝค ํ”ํ•œ ์—๋Ÿฌ๋”๋ผ.

 

ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

cd /Library/Frameworks/Python.framework/Versions/3.3
cd ./lib/python3.3/lib-dynload
sudo mv readline.so readline.so.disabled

2.7๋ฒ„์ „์„ ์“ฐ๋Š” ์‚ฌ๋žŒ์€ 3.3๋Œ€์‹  2.7๋กœ ๋ฐ”๊ฟ”์„œ ํ•˜๋ฉด ๋œ๋‹ค.

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

[GAE/Python] Schema ์ˆ˜์ •ํ•˜๊ธฐ #2. ์‚ญ์ œ

์ด๋ฒˆ์—๋Š” DB์—์„œ ํ•ญ๋ชฉ์„ ์‚ญ์ œํ•˜๋Š” ๊ฒƒ. https://cloud.google.com/appengine/articles/update_schema ๋ฐ http://sandrylogan.wordpress.com/2010/12/08/delattr/ ์‚ฌ์ดํŠธ ์ฐธ์กฐ   class AlbumModel(ndb.Expando): #ndb.Model -> ndb.Expando๋กœ ๊ต์ฒด artist…
Read More

0. ํ”„๋กœ์ ํŠธ ์ง„ํ–‰์ƒํ™ฉ (์ •๋ฆฌ์ค‘)

1. ํ•œ์ชฝ์œผ๋กœ๋Š” ๋ฐ์ดํ„ฐ์…‹(Data set) ๋Š˜๋ฆฌ๊ธฐ, ํ•œ์ชฝ์œผ๋กœ๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์งœ๋Š” ๋‘๊ฐ€์ง€ ํŠธ๋ ‰์œผ๋กœ ์ง„ํ–‰ ์ค‘. ๋ถ€์กฑํ•œ ์‹œ๊ฐ„์„ ํ™•๋ณดํ•˜๊ธฐ ์œ„ํ•ด ๊ทผ๋ฌด ์‚ฌ์ด์‚ฌ์ด์—…
Read More

๋งฅ(Mac)์—์„œ ์ดํ•ดํ•˜๋Š” ๋„์ปค(Docker) #2. Hyperledger Sawtooth ์—ฐ๊ฒฐ๊นŒ์ง€

https://steemit.com/kr/@junn/mac-docker-1 ์— ์ด์€ Mac์—์„œ Docker ์ดํ•ดํ•˜๊ธฐ 2ํƒ„์ž…๋‹ˆ๋‹ค. ์ด๋ฒˆ ํฌ์ŠคํŒ…์€ ๋‹ค์Œ ์ˆœ์„œ๋กœ ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค. (1) ubuntu๋งŒ ์„ค์น˜๋œ image์— python์„ ์„ค์น˜ํ•œ…
Read More

1. ๋งฅ๋ถ์œผ๋กœ๋Š” ์–ด๋ฆผ์—†๋‹ค.

<์˜ค๋Š˜์˜ ์‹คํ—˜> ๋ฌด๋ ค! ๋”ฅ๋Ÿฌ๋‹ ์ˆ˜์ค€์— ๋‹ค๊ฐ€๊ฐ€์ง€๋„ ๋ชปํ•˜๋Š” ๋ช‡๋…„์ „์˜ LeNet-5 ๋ชจ๋ธ์„ ์ด์šฉํ•ด ํ•œ๋ฒˆ ์ž‘์—…์„ ๊ตฌ์„ฑํ•˜์˜€๋‹ค. ๋‹จ์ˆœ ์„ฑ๋Œ€ ๊ฒ€์ถœ๋ชจ๋ธ๋กœ์„œ ๋ผ๋ฒจ๋ง๋œ…