Problem with serial-port comunication

i have a problem, I'm doing a python script that communicates with Arduino but the problem is that every time I close the python script and I open the Arduino is restarted, and that is because it is closed and the serial port is opened so How I can solve this problem, How i can do my arduino isn´t restart. thanks

How I can solve this problem,

Don't close the serial connection ?

or

I believe that there is a hardware hack for the Arduino that prevents the reset but interferes with uploading programs so you have to reset it manually when uploading.

Either you fix the python code to not open/close the serial connection when data is sent, or defeat the arduino auto reset using a resistor or capacitor.

ok, I'm thinking not close the port does a little bulnerable my script so I think the best way is to use resistor or capacitor, but do not know how, so could you please tell me about it?. thanks

This must have taken me about 10 seconds to find
http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection

A 100 ohm resistor between 5v and the reset pin, or a 5uf capacitor between the reset pin and ground will probably work.

This Python - Arduino demo keeps the serial port open until the Python program is finished with the Arduino.

...R