Data over bluetooth

Hello!
I've wrote a script in python which sends data from PC's bluetooth to HC-06 module on arduino.

sock=bluetooth.BluetoothSocket( bluetooth.RFCOMM )
sock.connect((address, port))

sock.send(str(myfunction()))

This is a piece of code in python which sends the data. So, I have to send it like a string, but my data are integers.
Here is my problem. I really don't get it, how to process data in arduino. I get the data from serial.read function (HC-06 uses serial communication), but then I have numbers in string.
How can I convert this numbers in string to integers?
Thank you very much in advance.

I've tried this way:

int data;
data = (int)myserial.read();

but it's not working.

Here is my problem. I really don't get it, how to process data in arduino.

An example of what you are sending would be useful.

The Serial.read() function reads one digit of the string, if that is indeed what you are sending.

Casting the int that Serial.read() returns to an int is pointless. Expecting Serial.read() to do what Serial.parseInt() does is equally pointless.

I suspect one of the examples in serial input basics will be suitable. There is also a parse example.

It is not essential to send data as strings but if you send "raw" integers you need to take account of endian-ness. And using strings makes debugging easier so I would use them unless performance is a big issue.

...R