It works OK on Linux ( Ubuntu 14.04 + Python 2.7.6 ) except it prints a
bunch of unicode characters for spaces on each line, looks pretty bad.

There are other ways to monitor decodes outside of UDP messaging using
Python. You could simply parse the ALL_TXT file for the current time -1
minute at the top of each minute + <some time delay to allow for
decoding or whatever>, or simply run the loop at time + 5 seconds or
whatever in a loop. That would allow you to also format the line to you
liking.

I guess it boils down to what you want to do with the data as to which
way is the best approach.

73's
Greg, KI7MT



On 08/20/2016 10:50 AM, David Tiller wrote:
> Dan,
> 
> I'm running OSX 10.9.5 and python 2.7.1. Your test program also didn't work 
> here. For whatever reason, this one does:
> 
> from socket import socket, AF_INET, SOCK_DGRAM
> sock = socket (AF_INET, SOCK_DGRAM)
> sock.bind (('127.0.0.1', 2237))
> while True:
>         data, addr = sock.recvfrom(1024)
>         print data
> 
> 
> --
> David Tiller
> Sr. Architect/Lead Consultant | CapTech
> (804) 304-0638 | 
> dtil...@captechconsulting.com<mailto:dtil...@captechconsulting.com>
> 
> 
> 
> On Aug 19, 2016, at 10:41 PM, Dan - VA3MA <va...@me.com<mailto:va...@me.com>> 
> wrote:
> 
> Hi
> I’ve written a small Python program to fetch the UDP data sent by WSJT-X on 
> localhost port 2237.
> It is listed below
> It can get a socket connection to WSJT-X but it then just sits waiting to 
> receive.
> I’ve tried everything I know of the get it to receive - even running as root.
> But nothing - it just sits waiting for some data at statement  
> [sock.recv(1024)]
> 
> Would appreciate any thoughts and suggestions to get this working on OSX El 
> Cap.
> ( the same program runs fine under Windows! - as Bill G4WJS as shown me)
> 
> 
> here is the program
> 
>>>> from socket import socket, AF_INET, SOCK_DGRAM
>>>> sock = socket (AF_INET, SOCK_DGRAM)
>>>> sock.bind (('127.0.0.1', 2237, ))
>>>> while True:
> ...     sock.recv(1024)
> ...
> 
> 
> Thanks & 73
> Dan VA3MA
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> wsjt-devel mailing list
> wsjt-devel@lists.sourceforge.net<mailto:wsjt-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/wsjt-devel
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> wsjt-devel mailing list
> wsjt-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wsjt-devel
> 

-- 
----------------------------------------------------------------
Launchpad....: https://launchpad.net/~ki7mt
Ubuntu Hams..: https://launchpad.net/~ubuntu-hams-devel
Debian Hams..: https://alioth.debian.org/projects/pkg-hamradio/
JTSDK........: https://sourceforge.net/projects/jtsdk/
OpenPGP......: C177 6630 7115 78FE 9A2B 9F7F 18C0 F6B7 0DA2 F991

------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to