python-2.6

    0熱度

    2回答

    我在Mac OS X El Capitan上運行python 2.7.10。 我下載了pygame 1.9.1,它在Python的命令行版本上工作正常。但是,如果我編寫一個在PyCharm上使用pygame庫的程序,它會顯示這樣的錯誤消息。 /System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 /Users/j

    2熱度

    1回答

    我試圖讓一個Django應用程序啓動並運行。這些庫有點過時(它目前在Django 1.4上)。 我有或多或少的工作時,我試圖蟒蛇2.6,但是當我使用Python 2.7更改爲virtualenv中我得到的錯誤: Unhandled exception in thread started by <function wrapper at 0x7f057b17c320> Traceback (most

    0熱度

    1回答

    我試圖找到一種方法來在python中「監聽」wifi連接狀態並執行我在計算機連接到wifi時執行的某個功能。 該函數將連接到服務器套接字並向其發送一些信息。 有沒有人有任何想法如何實現這一點? 謝謝!

    2熱度

    1回答

    我正在使用Python 2.6.6,並嘗試從json字符串生成ordered_dict。我可以理解我可以使用json Decoder/loads的object_pairs_hook,但不幸的是它在2.6.6中不受支持。有什麼出路嗎? e.g. template_s = '{ "aa": {"_type": "T1"}, "bb": {"_type": "T11"}}' json.loads(t

    0熱度

    1回答

    我很新的Python(2.6.7) 我怎麼能轉換的輸出: todays_date = datetime.datetime.today() print todays_date yesterday = todays_date - timedelta(days=1) print yesterday 其中產量到: 2015-11-22 23:44:45.166081 2015-11-21 23

    1熱度

    1回答

    在一個virtualenv建關的Python 2.6.6,我試圖pip install的2.8.10.1 2.6 Unicode的 DMG發現here從而: pip install -Iv http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-univers

    2熱度

    1回答

    我正在調整適用於Python 2.7的第三方Python包(它被聲明)來處理Python 2.6,它雖然已經過時,但仍然是我職權範圍內許多機器上的標準Python。 我一直在使用compileall模塊來幫助我確定兼容性問題,而事實上我已經發現了很少。只有其中的一個已經被證明非常抗拒:提供給我的代碼使用「與」在幾個地方的標識,既作爲關鍵字參數 newitems.append(Data(item[:

    0熱度

    1回答

    我需要在debian中安裝python 2.6.6或2.6.7 8.2 我是一個用戶。 我試圖安裝,但我有一個錯誤信息: 「無法找到所需的位構建模塊......」 我想要做這門課程: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-01sc-introduction-to-electrical-eng

    0熱度

    1回答

    在Python 2.6.8我寫一個Unicode字符串時,遇到下列錯誤: Traceback (most recent call last): File "test.py", line 10, in <module> f.write(bytearray(u, 'utf_8')) TypeError: argument 1 must be string or pinned bu

    2熱度

    3回答

    我試圖使解析多個參數,可以是單個,逗號分隔或空值的列表理解。 下面是一個簡短的工作一段代碼: csv_ip = '192.168.1.1,192.168.1.20' single_ip = '33.44.33.22' empty_ip = None ip_list = [ip for ip in [csv_ip.split(','), single_ip, empty_ip] if ip]