Is There A Problem With makefile() On Win32?

Discussion in 'Python' started by John Abel, Sep 29, 2003.

  1. John Abel

    John Abel Guest

    Hi,

    I've a small script, which listens to a port on a remote machine. I'm
    trying to implement makefile. However, the code on Win32 Py 2.2.2

    def _Connect( self ):
    sockConn = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
    try:
    sockConn.connect( ( self.remoteMachine, self.remotePort ) )
    except socket.error, ErrorMsg:
    print "Got Me An Error"

    print "Going To Run MakeFile"
    sockFile = sockConn.makefile( 'r' )
    for tcpData in sockFile:
    print tcpData

    produces this:

    for tcpData in sockFile:
    TypeError: iteration over non-sequence

    On linux, it just sits there, ignoring the incoming data. Py 2.3.1 on
    linux/OSX works OK (I haven't got round to testing 2.3.1 on Win32). I've
    checked the docs for 2.2.3/2.3.1, and can't find anything to say it
    shouldn't work. My question then, is it fixed on 2.2.3, and will it work on
    Win32 (I have to develop scripts to run on Win32/linux/OSX)?

    Regards

    John
    John Abel, Sep 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    16
    Views:
    1,135
  2. fabio

    problem with a makefile

    fabio, Mar 9, 2006, in forum: C Programming
    Replies:
    4
    Views:
    381
    fabio
    Mar 10, 2006
  3. A Problem with makefile.

    , Nov 29, 2006, in forum: C Programming
    Replies:
    3
    Views:
    295
    CBFalconer
    Nov 29, 2006
  4. dolphin

    what is the problem about my makefile

    dolphin, Apr 16, 2007, in forum: C Programming
    Replies:
    6
    Views:
    354
    Kenny McCormack
    Apr 16, 2007
  5. problem in makefile

    , Jun 18, 2007, in forum: C Programming
    Replies:
    9
    Views:
    1,356
    CBFalconer
    Jun 18, 2007
Loading...

Share This Page