gracemia gracemia wrote: > File "prueba.py", line 4, in <module> > sock = socket(AF_UNIX, SOCK_STREAM) > NameError: name 'AF_UNIX' is not defined > > code: > > import socket > sock = socket(AF_UNIX, SOCK_STREAM)
You need to qualify the variable names with the module name: import socket sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) Have you worked through the tutorial http://docs.python.org/tutorial/index.html already? -- http://mail.python.org/mailman/listinfo/python-list