Is there anyways to run python script in background?

Is there anyways to execute a python script and still be able to use blender?

For example I am working with sockets in blender with a python script, but I can only send/recieve datawith it running but it disables blender basicly mean it would let me use blender until I cancel the script or it finishes sending the data…

I think the redraw function allows blender to redraw during your python script executon with a different value (Blender.Window.Redraw(1)?). Check the blender guide.

The answer really is no,
blender will not respond until the script is done.
you cannot use threads either.

Now, you can append your important objects to the Blender object and they will stick around, and usually that would be all that is necescary.

(are you thinking about multiplayer for the game engine? Why can’t you do this to the blender source?)