小编use*_*293的帖子

Python缩进错误:

我已经尝试过notepad ++和eclipse但是即便如此,它在第18行显示了一个缩进错误.我不知道,为什么它会给我一个像这样的错误......?请帮我.

from brisa.core.reactors.qtreactor import QtReactor
reactor = QtReactor()
from brisa.core import config
from brisa.upnp.device import Device
from brisa.upnp.device.service import Service, StateVariable
class QtDevice(QtGui.QWidget):
     def __init__(self):

         QtGui.QWidget.__init__(self)
         self.verticalLayout = QtGui.QVBoxLayout(self)
         self.title = QtGui.QLabel("Qt Simple Device")
         font = QtGui.QFont()
         font.setPointSize(15)
         self.title.setFont(font)
         self.title.setAlignment(QtCore.Qt.AlignCenter)
         self.verticalLayout.addWidget(self.title)
         self.lineEdit = QtGui.QLineEdit(self)
         self.verticalLayout.addWidget(self.lineEdit)
         self.search_btn = QtGui.QPushButton("Start Device", self)
         self.verticalLayout.addWidget(self.search_btn)
         QtCore.QObject.connect(self.search_btn, QtCore.SIGNAL("clicked()"), self.start)
         self.stop_btn = QtGui.QPushButton("Stop Device", self)
         self.verticalLayout.addWidget(self.stop_btn)
         QtCore.QObject.connect(self.stop_btn, QtCore.SIGNAL("clicked()"), self.stop)
         self.lineEdit.setText(’My Generic Device Name’)
         self.root_device = None
         self.upnp_urn = ’urn:schemas-upnp-org:device:MyDevice:1’


     def _add_root_device(self):
         project_page = ’http://brisa.garage.maemo.org’
         serial_no …
Run Code Online (Sandbox Code Playgroud)

python

4
推荐指数
3
解决办法
2万
查看次数

python进入cygwin

如何在Cygwin中安装Python?我的桌面上有安装文件,并希望将其安装到cygwin中.

python cygwin

-3
推荐指数
1
解决办法
6416
查看次数

标签 统计

python ×2

cygwin ×1