omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Peer to Peer Chat

    Pythonista
    6
    11
    8743
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NoBetterName
      NoBetterName last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • ccc
        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 site:forum.omz-software.com SMS

        Also check out the Workflow app which has actions:

        • Call
        • Facetime
        • 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.

        https://techcrunch.com/2017/03/22/apple-has-acquired-workflow-a-powerful-automation-tool-for-ipad-and-iphone/

        1 Reply Last reply Reply Quote 0
        • NoBetterName
          NoBetterName last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • dgelessus
            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 imaplib module in the standard library for that.

            1 Reply Last reply Reply Quote 0
            • JonB
              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?

              1 Reply Last reply Reply Quote 0
              • ccc
                ccc last edited by

                @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

                1 Reply Last reply Reply Quote 0
                • NoBetterName
                  NoBetterName last edited by

                  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.

                  mikael 1 Reply Last reply Reply Quote 0
                  • ccc
                    ccc last edited by

                    Were you able to get tcp_charfinder to work?

                    1 Reply Last reply Reply Quote 0
                    • ccc
                      ccc last edited by

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • mikael
                        mikael @NoBetterName 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.

                        1 Reply Last reply Reply Quote 0
                        • julliemak
                          julliemak last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB Forums | Contributors