Lost with sockets

Lost with sockets

Postby Larry » Mon Aug 12, 2013 3:14 pm

Hello,

I read a lot on the net, but cannot figure out something : are sockets helping to make two local scripts to communicate ?

I know about subprocess but do socket prevent the whole reloading of a script ?

I would like to have a script one ever running and not doing anything but if I call it from another script. A bit like a websocket.

Some don't like the ever running scripts but sometimes, it is necessary. So, do sockets may help in this case ?

Many thanks,
Larry
 
Posts: 9
Joined: Sat Jul 06, 2013 7:33 am

Re: Lost with sockets

Postby micseydel » Mon Aug 19, 2013 8:32 pm

Sockets are a way for programs to communicate with each other, locally or across a network, and sometimes even within the same program (I believe IDLE does it).

Larry wrote:I know about subprocess but do socket prevent the whole reloading of a script ?

I have no idea what you're trying to say here. subprocess is about running other programs from Python, which is separate from sockets, both of which are things I don't see a relation to "reloading of a script" (whatever that is).

Larry wrote:A bit like a websocket.

Web sockets are sockets that you use over a network. They're not different things.

Larry wrote:Some don't like the ever running scripts but sometimes, it is necessary. So, do sockets may help in this case ?

I wish I could give you good advice, but I don't know from this post what your case is. Sockets are a good way for inter-process communication, including over a network. When you mention scripts that are always running, you have to say something more to relate that to sockets.

If you could describe what you're trying to accomplish, we'd love to try to help.
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 927
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest