diff --git a/g.py b/g.py index 5bffa113e..0c5f286be 100644 --- a/g.py +++ b/g.py @@ -17,8 +17,14 @@ def ftnstr(x): #------------------------------------------------------ filetime def filetime(t): # i=t.rfind(".") - i=6 + i=rfnd(t,".") t=t[:i][-6:] t=t[0:2]+":"+t[2:4]+":"+t[4:6] return t +#------------------------------------------------------ rfnd +#Temporary workaround to replace t.rfind(c) +def rfnd(t,c): + for i in range(len(t)-1,0,-1): + if t[i:i+1]==c: return i + return -1 diff --git a/ssort.f b/ssort.f index e8cfa462b..9c4cb8f7a 100644 --- a/ssort.f +++ b/ssort.f @@ -26,7 +26,8 @@ c = -2 means sort x in decreasing order and carry y along. nn = n if (nn .lt. 1) then - print *,'n = ',nn,' kflag = ',kflag,' in ssort.' + print*,'ssort: The number of sort elements is not positive.' + print*,'ssort: n = ',nn,' kflag = ',kflag return endif c diff --git a/wsjt.py b/wsjt.py index 0179b23af..a26545e94 100644 --- a/wsjt.py +++ b/wsjt.py @@ -92,7 +92,6 @@ g.freeze_decode=0 g.mode="" g.ndevin=IntVar() g.ndevout=IntVar() - #------------------------------------------------------ showspecjt def showspecjt(): g.showspecjt=1 @@ -1239,8 +1238,8 @@ def update(): msg4.configure(text=t,bg='red') t=g.ftnstr(Audio.gcom2.decodedfile) - i=0 # i=t.rfind(".") + i=g.rfnd(t,".") t=t[:i] lab3.configure(text=t) if mode.get() != g.mode or first: