Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #55721 > unrolled thread

Re: AF_UNIX socket not supported

Started byJean-Paul Calderone <calderone.jeanpaul@gmail.com>
First post2011-02-08 04:49 -0800
Last post2011-02-08 13:28 +0000
Articles 5 — 3 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: AF_UNIX socket not supported Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-02-08 04:49 -0800
    Re: Where and when does Python say this to you? gracemia gracemia <gracemia@gmail.com> - 2011-02-08 13:27 +0000
    Re: Where and when does Python say this to you? gracemia gracemia <gracemia@gmail.com> - 2011-02-08 13:26 +0000
      Re: Where and when does Python say this to you? Grant Edwards <invalid@invalid.invalid> - 2011-02-08 14:54 +0000
    Re: Where and when does Python say this to you? gracemia gracemia <gracemia@gmail.com> - 2011-02-08 13:28 +0000

#55721 — Re: AF_UNIX socket not supported

FromJean-Paul Calderone <calderone.jeanpaul@gmail.com>
Date2011-02-08 04:49 -0800
SubjectRe: AF_UNIX socket not supported
Message-ID<b2134cf5-d4d0-4538-a240-0e3d0b7aacfb@w19g2000yqa.googlegroups.com>
On Feb 8, 7:30 am, gracemia <grace...@gmail.com> wrote:
> Hello !
>
> I'm trying to develop with AF_UNIX socket type in python (2.5) but
> python says that AF_UNIX is not supported
> How can I do for work with AF_UNIX sockets?
>
> Thank you

Where and when does Python say this to you?

http://docs.python.org/library/socket.html#socket.AF_UNIX

Jean-Paul

[toc] | [next] | [standalone]


#55745 — Re: Where and when does Python say this to you?

Fromgracemia gracemia <gracemia@gmail.com>
Date2011-02-08 13:27 +0000
SubjectRe: Where and when does Python say this to you?
Message-ID<20112882733usenet@eggheadcafe.com>
In reply to#55721
This is the simple code:

----------------------------------------
import socket

sock = socket(AF_UNIX, SOCK_STREAM)
------------------------------------------

Thank you

Submitted via EggHeadCafe 
SQL Server CLR Stored Procedures for External Access
http://www.eggheadcafe.com/tutorials/aspnet/08c40d08-af4a-41f6-9352-91ac82b90078/sql-server-clr-stored-procedures-for-external-access.aspx

[toc] | [prev] | [next] | [standalone]


#55895 — Re: Where and when does Python say this to you?

Fromgracemia gracemia <gracemia@gmail.com>
Date2011-02-08 13:26 +0000
SubjectRe: Where and when does Python say this to you?
Message-ID<20112882627usenet@eggheadcafe.com>
In reply to#55721
 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)

Thank you !


Submitted via EggHeadCafe 
Statistics, Probability, Lotteries and Dumb Programmers
http://www.eggheadcafe.com/tutorials/aspnet/041de19a-e704-468f-bd3c-79164fc739f5/statistics-probability-lotteries-and-dumb-programmers.aspx

[toc] | [prev] | [next] | [standalone]


#56051 — Re: Where and when does Python say this to you?

FromGrant Edwards <invalid@invalid.invalid>
Date2011-02-08 14:54 +0000
SubjectRe: Where and when does Python say this to you?
Message-ID<iirles$p1j$1@reader1.panix.com>
In reply to#55895
On 2011-02-08, Chris Rebert <clp2@rebertia.com> wrote:
> On Tue, Feb 8, 2011 at 5:26 AM, gracemia gracemia <gracemia@gmail.com> 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 all those names. Normal `import` doesn't dump all
> the importee's names into the importer's namespace;

Unfortunately, it's somewhat common for example code in various places
to show the above usage (where somebody did a "from <whatever> import
*).  IIRC there used to be examples like that even in the official
docs, but I haven't seen any there in a while.

But examples that look like that are still pretty easy to stumble
across using Google.

I'm guessing he copied the code from a "tutorial" example like this:

http://www.evolt.org/node/60276

-- 
Grant Edwards               grant.b.edwards        Yow! hubub, hubub, HUBUB,
                                  at               hubub, hubub, hubub, HUBUB,
                              gmail.com            hubub, hubub, hubub.

[toc] | [prev] | [next] | [standalone]


#56099 — Re: Where and when does Python say this to you?

Fromgracemia gracemia <gracemia@gmail.com>
Date2011-02-08 13:28 +0000
SubjectRe: Where and when does Python say this to you?
Message-ID<20112882825usenet@eggheadcafe.com>
In reply to#55721
this is the simple code:

--------------------------------------------------
import socket

# Create an unbound and not-connected socket.
sock = socket(AF_UNIX, SOCK_STREAM)

---------------------------------------------------

Thank you !

Submitted via EggHeadCafe 
SharePoint Tip / Thought of the Day WebPart
http://www.eggheadcafe.com/tutorials/aspnet/14280ff8-3c9f-46bd-8214-9267e613c8ec/sharepoint-tip--thought-of-the-day-webpart.aspx

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web