Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
5994d34e
Commit
5994d34e
authored
May 03, 2015
by
Vincent Castellano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement calling from python into C. Need to implement command queue to execute during netloop.
parent
3a13f800
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
104 deletions
+127
-104
pytest.py
pytest.py
+10
-2
python-tg.c
python-tg.c
+117
-102
No files found.
pytest.py
View file @
5994d34e
import
tgl
import
pprint
our_id
=
0
pp
=
pprint
.
PrettyPrinter
(
indent
=
4
)
def
on_binlog_replay_end
():
pass
def
on_get_difference_end
():
pass
def
on_our_id
():
pass
def
on_our_id
(
id
):
our_id
=
id
return
"Set ID: "
+
str
(
our_id
)
def
on_msg_receive
(
msg
):
pp
.
pprint
(
msg
)
tgl
.
send_msg
(
msg
[
"from"
][
"type"
],
msg
[
"from"
][
"id"
],
"PONG!"
)
return
"Got msg from "
+
msg
[
"from"
][
"peer"
][
"first_name"
]
def
on_secret_chat_update
(
peer
,
types
):
...
...
python-tg.c
View file @
5994d34e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment