Sugree

Main menu

  • About
  • Project
    • English
    • Thai

Python Newbie

Submitted by sugree on Fri, 01/11/2008 - 00:01
  • Joke
  • Python
  • Ubuntu
  • Thai

file encoding

(10:42:18 PM) mimoly: sugree, คือ จะถามหน่อยค่ะ พอดีเขียน.py ไว้อัน แล้วใส่ภาษาไทยลงไป ทีนี้พอมาเรียกเป็นสคริปต์ของxchat แล้วมันไม่รองรับน่ะค่ะ
(10:42:34 PM) mimoly: มันไม่ยอมให้เรียกเลยล่ะ
(10:42:57 PM) mimoly: เลยอยากรู้ว่า python นี่ มันไม่ซัพพอร์ทภาษาไทยเหรอคะ
(10:43:06 PM) mimoly: หรือว่าเป็นที่เอ็กซ์ฉะ
(10:43:25 PM) sugree: อ่า
(10:43:34 PM) sugree: ตอนเซฟบอกว่าเป็น utf-8 รึเปล่า
(10:43:46 PM) sugree: ใส่ magic เป็น utf-8 รึยัง
(10:44:40 PM) mimoly: magic คืออะไรเหรอคะ
(10:44:48 PM) mimoly: ข้าวเพิ่งหัดเขียนเอาวันนี้เอง
(10:45:02 PM) pFz[0]: อ้าว
(10:45:12 PM) pFz[0]: กำ
(10:45:27 PM) pFz[0]: นึกว่าเรียนมาแล้ว
(10:45:42 PM) sugree: # -*- coding: utf-8 -*-
(10:45:53 PM) sugree: ใส่แบบนี้ใน .py
(10:46:08 PM) sugree: เซ็ตที่ editor ให้เป็น utf-8 ด้วย
(10:46:18 PM) sugree: LANG ก็ได้
(10:58:29 PM) ***pFz[0] หาว หาว หาว
(10:59:14 PM) pFz[0]: หากระทู้ตอบแก้เซ็ง
(11:03:07 PM) mimoly: 8jt
(11:03:09 PM) mimoly: ค่ะ
(11:03:13 PM) mimoly: ลองแปปนะคะ
(11:07:28 PM) mimoly:  File "/home/mimoly/Documents/aaa.py", line 2
(11:07:29 PM) mimoly:      coding: utf-8
(11:07:29 PM) mimoly:            ^
(11:07:29 PM) mimoly:  SyntaxError: invalid syntax
(11:07:29 PM) mimoly:  Error loading module /home/mimoly/Documents/aaa.py
(11:07:53 PM) sugree: ใส่ให้เหมือนเป๊ะนะ
(11:08:00 PM) pFz[0]: ทำไมไม่สำเนาไปเลย
(11:08:03 PM) sugree: # -*- coding: utf-8 -*-
(11:08:06 PM) sugree: มี # ด้วย
(11:08:11 PM) sugree: ชิดซ้ายสุด
(11:08:31 PM) mimoly: อ่ะ
(11:08:33 PM) sugree: พวก -*- ก็เอามาด้วย
(11:08:41 PM) sugree: เค้าถึงเรียก magic ไง
(11:08:42 PM) mimoly: มันไม่กลายเป็นคอมเมนท์ไปเหรอคะ =w=
(11:08:49 PM) sugree: ใช่ มันคือ comment
(11:10:26 PM) mimoly: อ้ะ
(11:10:29 PM) mimoly: ได้แล้วค่ะ
(11:10:42 PM) mimoly: ขอบคุณมากเลยนะคะคุณsugree
(11:11:00 PM) mimoly: ใจดีเหมือนปู่พิ้งเลย =w=
(11:11:10 PM) pFz[0]: - -
(11:11:16 PM) ***pFz[0] ๑๒   ใคร ๆ ก็รู้
(11:11:33 PM) sugree: ฮ่ะๆ
(11:11:51 PM) sugree: เอาไว้รอ python 3k ก็ไม่ต้องใส่แล้ว
(11:12:21 PM) mimoly: ค่ะ *w*

python web application

(11:12:52 PM) mimoly: python บนเวบนี่ ต้องรันที่ฝั่งเซิฟเหมือนphp ไหมคะ
(11:13:11 PM) sugree: เอ่อ...
(11:13:30 PM) sugree: หมายถึง web server?
(11:13:38 PM) mimoly: ค่ะ
(11:13:55 PM) sugree: django turbogears?
(11:14:10 PM) mimoly: พอดีข้าวเพิ่งหัดน่ะค่ะ อาจใช้คำพูดไม่ค่อยถูก ต้องขออภัยด้วย =w=
(11:14:12 PM) pFz[0]: ท่าทางจะไม่รู้จัก
(11:14:20 PM) pFz[0]: ใช้คำพูดถูกแล้ว
(11:14:33 PM) sugree: ผมตอบไม่ถูกเอง
(11:14:46 PM) pFz[0]: เอ๊ะ หรือ ถามไม่ตรงคำตอบ
(11:14:58 PM) sugree: ไม่เห็นมีคำถาม
(11:15:04 PM) mimoly: เอ่อ ถามต้องมาก่อนสิคะปู่พิ้ง T T

running python

(11:17:33 PM) mimoly: sugree, ปกติ ใช้อะไรรันไฟตอนเหรอคะ
(11:18:34 PM) sugree: อี๊ก
(11:18:45 PM) sugree: bash
(11:19:10 PM) mimoly: มีที่โหลดไหมคะ
(11:19:15 PM) mimoly: รบกวนหน่อย >w<
(11:19:18 PM) sugree: อี๊ก
(11:19:24 PM) pFz[0]: ฮา ๆ ๆ
(11:19:26 PM) sugree: ผมตอบอะไรไป
(11:19:54 PM) mimoly: sugree, เอ่อ เป็นอะไรรึเปล่าคะ
(11:20:17 PM) sugree: รัน <- หมายถึงอะไรครับ
(11:20:47 PM) mimoly: คือ แบบว่า
(11:23:13 PM) mimoly: sugree, แบบว่า ดูผลของโปรแกรมที่เราเขียนมาน่ะค่ะ
(11:23:53 PM) sugree: รันในเชลล์ไง
(11:24:08 PM) sugree: ใช้ลินุกซ์ไม่ใช่เหรอ
(11:24:15 PM) sugree: หรือผมนึกไปเอง
(11:24:51 PM) mimoly: นั่นแหละ
(11:24:54 PM) mimoly: ทำไงอ่ะ * *
(11:25:39 PM) sugree: ./aaa.py
(11:25:51 PM) sugree: chmod +x aaa.py ก่อน
(11:27:38 PM) mimoly: ในเทอมินัลได้เลยเหรอคะ * *
(11:28:19 PM) sugree: ใช่แล้ว
(11:29:12 PM) ***mimoly ลอง
(11:29:26 PM) mimoly: * *
(11:30:38 PM) mimoly: ว้าววว
(11:30:42 PM) mimoly: ได้จริงๆด้วย
by Sikachu (not verified) on Fri, 01/11/2008 - 00:48 #14

IRC ที่ไหนครับนี่? Codenone?

  • reply
by sugree on Fri, 01/11/2008 - 08:34 #15

ubuntu-th

อืม น่าจะเปิด #codenone เหมือนกันนะ แต่ Twitter ก็ดีแล้ว

  • reply
by pphetra (not verified) on Fri, 01/11/2008 - 08:34 #16

แฟนไม่บ่นหรือครับ "กลับมานอนได้แล้ว chat กับสาวอยู่ได้"

  • reply
by sugree on Fri, 01/11/2008 - 08:56 #17

อึ๊ย บังเอิญผ่านมาครับ เพื่อนเก่าฝากให้หาคนเก่งลินุกซ์ไปเซ่นสังเวย

  • reply
by Wattana (not verified) on Fri, 01/11/2008 - 09:28 #18

ฮา ดี Programmer like musician...

  • reply
by witthawat (not verified) on Fri, 02/08/2008 - 14:45 #69

ไม่ทราบว่า ผมจะติดต่อคุณ Sugree ได้อย่างไรครับ ถ้าอย่างไรช่วยติดต่อกลับด้วยครับ เบอร์โทร0818185278

  • reply
by sugree on Fri, 02/08/2008 - 20:04 #70

วิธีที่ดีที่สุดคือ Twitter ว่าแต่มีเหตุอันใด วิธีอื่นดูได้ใน self

  • reply

Post new comment

The content of this field is kept private and will not be shown publicly.
Input format
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockcode> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <html>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <html>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • You can use Markdown syntax to format and style the text. Also see and Markdown Extra for tables, footnotes, and more.
  • Twitter-style @usersnames are linked to their Twitter account pages.
  • Twitter-style #hashtags are linked to search.twitter.com.

More information about formatting options

Popular Tags

Assumption BarCamp BarCampBangkok BarCampBangkok2 BarCampBkk2 Django Drupal DrupalCamp DrupalCampBangkok Education Family Google Hardware Hardy Health Java jibjib Joke NokNok OpenOffice.org OpenSource Podcast Python Review SoC Social Network Trip Twitter Ubuntu Weekly Suki
more tags

Powered By

debian
apache
drupal
drupal.in.th
feedburner

© 2007-2008 Sugree Phatanapherom. Creative Commons [Feed Content / Comment]
RoopleTheme