python

Appunti python

telegram lib telepot

pip install telepot
python -m pip install telepot
python3 -m pip install telepot
python3 -m pip3 install telepot
python3 -m pip install telepot

find your bot data
(sendbox) dietpi@DStarGW:~/ISS_phishing/sendbox/project$ python
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import telepot
>>> bot = telepot.Bot('XXXXXXXXXXXXXXXXXXXXXXXXx')
>>> bot.getMe()
{'username': 'Gr1964Bot', 'can_join_groups': False, 'first_name': 'Gp_Home_bot', 'can_read_all_group_messages': True, 'supports_inline_queries': False, 'id': 179215035, 'is_bot': True}

* ambiente virtuale 2:
virtualenv telepot-example
cd  telepot-example
pip install telepot
cd telepot-example/
source bin/activate
deactivate

* per usare ambiente virtuale 3:
sudo apt-get install python3-venv
python3 -m venv sendbox
pip install telepot
pip install serial
per rimuovere un modulo sbagliato
  pip uninstall serial
quello corretto e' questo
  pip install pyserial

gestione stringe https://www.computerhope.com/issues/ch001721.htm


Per usare il modem senza innescare la ricezione dei caratteri in echo
meglio andare in echo off poi conv (ctrl-C echo on per ripristinare)