TelePyth Manual: Basics

First of all, import telepyth package:


In [1]:
import telepyth


Use token from .telepythrc.

Next, set the token so that TelePyth backend could identify you among Telegram users. To get one start a chat with TelePyth Bot by using \start command. You will be given an access token, e.g. 3916589616287113937.


In [2]:
%telepyth -t 3916589616287113937


Use token 3916589616287113937.

All right, now you are all set to send any text message with telepyth inline magic like this


In [3]:
%telepyth 'Wow, such magic'


Out[3]:
'Wow, such magic'

Or even like that


In [4]:
%%telepyth 'Very magic'
print('Put more code here')
f1 = 1
f2 = 2
f3 = f1 + f2


Out[4]:
'Very magic'
Put more code here

See advanced guide to get moar magic.