Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
在applescript用python寫code!
Jul 20th 2013, 14:05

本人最近學了 python
然後用的是window7 系統
回到家中 我想用我的macbook寫 (有python
然後在上課時
有用了一個notepad++(是用來編寫程式
然後似乎applescript editor 也可以拿來代替notepad++(因為notepad++不支援apple
但當我開起 applescript 打上 python 的指令時(檔名已指名.py

例如:
a = 0
print a + 1
然後在applescript 按執行

他就會顯示 a 尚未定義
但在line1 我就已經定義它為 0

然後拿去終端機執行
會顯示:
AppletekiMacBook-Pro:~ Apple$ python /Users/Apple/Desktop/python.py.scpt
File "/Users/Apple/Desktop/python.py.scpt", line 1
SyntaxError: Non-ASCII character '' in file /Users/Apple/Desktop/python.py.scpt on line 2, but no encoding declared; see https://www.python.org/peps/pep-0263.html for details

換種方式:
# a = 0
# b = 3
print a + b
他這次就會跳出 line3 的 a 和 b 沒有定義

然後拿去終端機開啓
會出現:
AppletekiMacBook-Pro:~ Apple$ python /Users/Apple/Desktop/python.py.scpt
File "/Users/Apple/Desktop/python.py.scpt", line 1
SyntaxError: Non-ASCII character '' in file /Users/Apple/Desktop/python.py.scpt on line 2, but no encoding declared; see https://www.python.org/peps/pep-0263.html for details
AppletekiMacBook-Pro:~ Apple$

所以請問大大們
這該怎麼處理QQ
這明明都是python 的指令 為什麼無法執行QQ

然後有什麼是可以拿來apple用 類似notepad++的軟體呢?

然後要怎麼讓applescript在撰寫時
旁邊會出現數字告訴你是第幾行呢><

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - https://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
創作者介紹
創作者 女王的誕生線上看tv,     女王的誕生線上看 第2集,     女王的誕生線上看4,     女王的誕生線上看第4集 的頭像
mmosko

女王的誕生線上看tv, 女王的誕生線上看 第2集, 女王的誕生線上看4, 女王的誕生線上看第4集

mmosko 發表在 痞客邦 留言(0) 人氣( 0 )