473,703 Members | 2,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using QFtp class in PyQT

Kim
Hi everybody,
I tried to write simple FTP program using PyQt version 3.11. The
document say that QFtp has been implemented, but i keep getting error
message from my simple program :

My Program:

from qt import *
from qtnetwork import *

def gotSignalStart( *arg):
print "start ",arg

def gotSignalState( *arg):
print "state ",arg

def gotListInfo(*ar g):
print "List info ",arg

def doFTP():
fh = QFtp()
QObject.connect (fh,SIGNAL("sta rt()"),gotSigna lStart);
QObject.connect (fh,SIGNAL("sta teChanged()"),g otSignalState);
QObject.connect (fh,SIGNAL("lis tInfo()"),gotLi stInfo);
fh.connectToHos t("ftp.trolltec h.com")
fh.login()
print fh.state()
if fh.state() != QFtp.Unconnecte d : fh.close()

doFTP();

Error messages:

QObject::connec t: No such signal QFtp::start()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::stateChan ged()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::listInfo( )
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
0
QSocket::writeB lock: Socket is not open
Can anyone help?
Thanks very much
Kim
Jul 18 '05 #1
1 2392
On Monday 19 April 2004 2:59 pm, Kim wrote:
Hi everybody,
I tried to write simple FTP program using PyQt version 3.11. The
document say that QFtp has been implemented, but i keep getting error
message from my simple program :

My Program:

from qt import *
from qtnetwork import *

def gotSignalStart( *arg):
print "start ",arg

def gotSignalState( *arg):
print "state ",arg

def gotListInfo(*ar g):
print "List info ",arg

def doFTP():
fh = QFtp()
QObject.connect (fh,SIGNAL("sta rt()"),gotSigna lStart);
QObject.connect (fh,SIGNAL("sta teChanged()"),g otSignalState);
QObject.connect (fh,SIGNAL("lis tInfo()"),gotLi stInfo);
fh.connectToHos t("ftp.trolltec h.com")
fh.login()
print fh.state()
if fh.state() != QFtp.Unconnecte d : fh.close()

doFTP();

Error messages:

QObject::connec t: No such signal QFtp::start()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::stateChan ged()
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
QObject::connec t: No such signal QFtp::listInfo( )
QObject::connec t: (sender name: 'unnamed')
QObject::connec t: (receiver name: 'unnamed')
0
You must give the full (C++) signature of the signal, eg...

SIGNAL("listInf o(const QUrlInfo &)")
QSocket::writeB lock: Socket is not open


QFtp is asynchronous. You need an event loop to make sure things actually
happen.

Phil

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2850
by: Ilya Knizhnik | last post by:
Dear All, I am fairly new to Python. I have found it an easy language to learn and a very usefull one for many tasks. Currently I am working on a python project that involves a GUI and it was suggested that PyQt is the best way to design that GUI. However since PyQt is rather new, I have not found much documentation on it, or examples in it. The only useful tutorial/book I have found is at www.opendocspublishing.com/pyqt/ but it is...
35
7753
by: Vamsi Mudrageda | last post by:
I am kind of new to Python, and after trying and using wxPython, I found it kind of lacking in easy-to-read documentation, speed at loading, and GUI response-time. So I am looking for an another GUI toolkit that is cross-platform for Python, and am leaning toward PyQt (PyGTK is kind of dull looking in comparison). Unfortunately, although TrollTech says Qt is cross-platform, its license strategy has me a bit confused. So here is to...
8
4850
by: simo | last post by:
OK, so I'm at the stage where I want to make a choice between wxPython and PyQt. Currently I'm using wxPython mainly due to the fact that it has GPL Linux and Windows versions. I prefer Qt to wxWindows, but am confused with all the Windows licensing issues. For the moment this is just for my own tinkering and utility apps, but
3
2069
by: Fabio | last post by:
Hi all, I'm about to write an application, and I'd like to use PyQt, but before choosing this toolkit I would like to clarify some particular licensing issues; if some user has already touched these, I would like to hear from his experiences. This app should be cross-platform, so, given qt licensing policies, I would buy a commercial PyQt license and a commercial Qt license. Could I license the application under the GPL for Gnu/Linux...
3
2276
by: Kenneth McDonald | last post by:
If this is not an appropriate newsgroup for this type of posting, please let me know and (if possible) suggest an alternative. I've done a fair bit of research on the net, but information is scattered all over the place and I haven't been able to find mailing lists relating specifically to python and UIs. I'd like to start using Python for some GUI programming again. I'd like to use Tk, but it seems to be dying a slow death, so it's...
3
2070
by: Phil Thompson | last post by:
Riverbank Computing is pleased to announce the release of PyQt v4.0beta1 available from http://www.riverbankcomputing.co.uk/pyqt/. PyQt is a comprehensive set of Qt bindings for the Python programming language and supports the same platforms as Qt (Windows, Linux and MacOS/X). Like Qt, PyQt is available under the GPL and a commercial license. PyQt v4 supports Qt v4 (http://www.trolltech.com/products/qt/index.html). PyQt v3 is still...
1
6075
by: Peter TB Brett | last post by:
Hi folks, Although the PyQt documentation indicates that QGLWidget & friends have been ported to Python for the PyQt bindings, I'm not entirely sure what's necessary to make the normal OpenGL/GLUT interface available. Does PyQt work okay with PyOpenGL? Or is a more complicated workaround needed? If anyone has experience with working with Python/Qt/OpenGL and can offer
9
12303
by: anders | last post by:
I am writing a plugin for a piece of software in python, and I want to start up a PyQt GUI in the plugin, without stalling the main thread while the gui is running (later i will want to pass messages between the main thread and the gui thread). I'm new to pyqt, so I'm probably doing something very silly, but for the moment I'm just trying to get the first pyqt tutorial example running in a seperate thread: ----8<--------
3
3068
by: Marcpp | last post by:
Hi, I'm introducing to program in python + pyqt. I have a main window that call a second window (to introduce a info with textedit) when press the second window button I need to return to the main window the info introduced in the second window. I've seek in the pyqt doc examples but i don't find it. Have you any example?
0
8744
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8659
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9240
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7846
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6585
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4674
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2055
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.