diff bin/wavecurve @ 1866:3c523c71da29

pyflakes cleanups and some refactors Ignore-this: f7372e678699175feb4e628eee3d768c
author Drew Perttula <drewp@bigasterisk.com>
date Sat, 25 May 2019 12:10:51 +0000
parents f066d6e874db
children
line wrap: on
line diff
--- a/bin/wavecurve	Sat May 25 12:06:01 2019 +0000
+++ b/bin/wavecurve	Sat May 25 12:10:51 2019 +0000
@@ -1,6 +1,6 @@
 #!bin/python
 import optparse
-import run_local
+from run_local import log
 from light9.wavepoints import simp
 
 
@@ -8,9 +8,10 @@
     print("reading %s, writing %s" % (inpath, outpath))
     points = simp(inpath.replace('.ogg', '.wav'), seconds_per_average=t)
 
-    f = file(outpath, 'w')
+    f = open(outpath, 'w')
     for time_val in points:
         print("%s %s" % time_val, file=f)
+    log.info(r'Wrote {outpath}')
 
 
 parser = optparse.OptionParser(usage="""%prog inputSong.wav outputCurve
@@ -30,8 +31,6 @@
 
 if options.all:
     from light9 import showconfig
-    from light9.namespaces import L9
-    from rdflib import RDF
     from light9.ascoltami.playlist import Playlist
     graph = showconfig.getGraph()