Monthly Archives: July 2010

Python 2 與 Python 3 的相容性

前幾天 Python 2.7 正式釋出 (2010/07/03),預定是 Python 2 最後一個 major release,於是又有人再討論要怎麼寫出 Python 2 與 Python 3 都能夠跑的程式碼,以維持單一 codebase。 在「The real problem with Python 3 – no business case for conversion (was “I strongly dislike Python 3″)」這篇提到了一些語法及模組技巧 (基本上就是用 Python 2 與 Python … Continue reading

Posted in Computer, Murmuring, Programming, Software | Leave a comment

AWS S3 的 Bucket Policy

以 Referer 決定是否可以存取的功能等了好久:「Amazon S3 Bucket Policies – Another Way to Protect Your Content」。 Bucket Policy 必須以 Amazon 自訂的語法設定條件,可以看某些 header 設定是否允許存取 S3 的物件,像是 User-agent 與 Referer。 不過看了文件,沒有 regular expression 可以用?只有 shell expression (支援 * 與 ? 而已),應該是夠用但感覺還是怪怪的…

Posted in AWS, Cloud, Computer, Murmuring, Network, Security, WWW | 1 Comment