twisted

    3熱度

    2回答

    我試圖從http://twistedmatrix.com/documents/current/core/howto/trial.html的「Twisted的測試驅動開發」中重現這個例子。 我創建的文件: calculus/__init__.py calculus/base_1.py calculus/test/__init__.py calculus/test/test_base_1.py

    0熱度

    1回答

    我最近發現了Twisted python庫,並試圖使用測試腳本進行設置。 from twisted.internet.protocol import Protocol, Factory from twisted.internet import reactor class Pong(Protocol): def connectionMade(self): self.tra

    0熱度

    1回答

    我運行此代碼: import argparse from tqdm import tqdm from sys import argv from pprint import pformat from twisted.internet.task import react from twisted.web.client import Agent, readBody from twiste

    1熱度

    2回答

    我使用buildbot作爲我的配置項。它是用扭曲的蟒蛇建造的。 我的建造工人在10分鐘後大概會迷路。 我的網絡很好,但想知道爲什麼我的工人迷路了。 我想知道在什麼情況下我們會看到這種扭曲的python錯誤。 錯誤: remoteFailed: [Failure instance: Traceback (failure with no frames): <class 'twisted.interne

    0熱度

    1回答

    我使用雙絞線Python和有一些代碼基本上是這樣的: class TimeoutException(Exception): pass def timeout(msg): raise TimeoutExpection(msg) def create_timeout(len, msg): return reactor.callLater(len, timeout

    0熱度

    1回答

    我是Twisted web服務器和Heroku的新手。 我想在Heroku 使用雙絞線Web服務器我使用這樣 from twisted.internet import protocol, reactor import os class Knock(protocol.Protocol): def dataReceived(self, data): print 'Client

    1熱度

    1回答

    我正在嘗試用AutoBahn [twisted]運行Python WebSocket服務器。 這裏是我的服務器代碼(的Python): *various imports* class webSocket(WebSocketServerProtocol): def onConnect(self, request): print("some request connected {}".

    0熱度

    1回答

    我有在這裏一個小疑問就扭曲了前當我在瀏覽通過量的扭曲的例子(這是寫得很好),我看到使用cred的例子。我不得不提到,這種好奇心是因爲我使用的扭曲越多,我越喜歡它,試圖圍繞它來理解它的功能。現在我的問題是爲什麼首先我會用cred?如果它是簡單的用戶通行證憑證,那麼可以像對待大多數Web應用程序一樣使用對數據庫的簡單檢查嗎?如果製作異步然後想不出DB客戶端的異步版本來達到同樣的?我可以得到什麼好處通過

    5熱度

    1回答

    我有一個Scrapy中的網頁抓取工具,可以獲取數據項。我想異步地將它們插入到數據庫中。 例如,我有一些插入項目到我的數據庫使用SQLAlchemy的核心事務: def process_item(self, item, spider): with self.connection.begin() as conn: conn.execute(insert(table1).value

    2熱度

    1回答

    enter image description here 請幫幫我,爲什麼錯誤也是這樣嗎? 見上面的圖片,我運行我的代碼並導入這個庫。 import paho.mqtt.client as mqtt from twisted.internet import reactor, protocol from txws import WebSocketFactory import json