Peer to Peer Chat
None of the online server and client programs for peer to peer chat rooms work on iOS. I'm not quite sure why. I'm not even sure that socket is the right path for me. Is there any way to use my Pythonista app as a client and directly send messages? I'm thinking of a custom SMS or even SMTP sender/receiver. Can iOS and Pythonista do something like this?
ccc last edited by ccc
SMTP mail send is built into Python https://docs.python.org/3/library/smtplib.html#smtp-example
On SMS, put into Safari
Also check out the Workflow app which has actions:
- Post to Slack
- Send message
- Run Editorial Workflow
- Run Script (Pythonista)
- Open X-Callback URL
From Pythonista, you can webbrowser.open('workflow://run-workflow?name=name&input=input') to kick off a workflow.
I don't really understand socket or HTTPlib or anything like that, but I'm looking for something that I can send and receive all inside Pythonista. I hope this makes sense. I like Workflow, but it isn't what I was looking for. SMTP and SMS are great, but you can only send them through Pythonista, not receive them. I guess my very broad question could be narrowed down to this:
Is there any Apple-based or Pythonista-based system that I could take advantage of to send and receive messages through Pythonista?
dgelessus last edited by
@NoBetterName In general the SMTP protocol is only used for sending mail. To receive mail (or rather to read and manage mails on your account) you'd use the IMAP protocol. Python also has an
imaplibmodule in the standard library for that.
JonB last edited by
What specifically are you trying to do? create your own "messenger" type program? Or just some other generic client/server application?
@NoBetterName https://github.com/fluentpython/example-code/tree/master/18-asyncio/charfinder has a script called
tcp_charfinder.pythat might be worth checking out. It uses asyncio to avoid blocking calls so it is Python 3 only
I'm trying to make a peer to peer messaging program, as the title suggests. I need a program that directly sends messages to other devices. Thanks for your help guys.
Were you able to get
@NoBetterName I would be interested to work with you on the chat client if you open a repo with a reasonable license. If you put the parts that you know how to do in there, we can build the rest together.
mikael last edited by
@NoBetterName, if you want to create a p2p chat, and the emails, sms etc. were just ideas on how to move the chat messages, I suggest you check Pubnub and/or getstream instead. Or Amazon Web Services, Azure or Google messaging and notification services. All have example chat implementations and free options to get started with.
julliemak last edited by
This post is deleted!