Skip to content

Commit

Permalink
Use regex to remove various problematic chars from movieName
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Moore committed Oct 1, 2012
1 parent e0f081c commit 465f6ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omero/export_scripts/Make_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import omero.util.figureUtil as figUtil
import omero
import omero.min # Constants etc.
import getopt, sys, os, subprocess
import getopt, sys, os, subprocess, re
import numpy
import omero.util.pixelstypetopython as pixelstypetopython
from struct import *
Expand Down Expand Up @@ -541,7 +541,7 @@ def writeMovie(commandArgs, conn):
if not movieName.endswith(".%s" % ext):
movieName = "%s.%s" % (movieName, ext)

movieName = movieName.replace(" ", "_").replace("'", "") # spaces etc in file name cause problems
movieName = re.sub("[$&\;|\(\)<>' ]","",movieName) # spaces etc in file name cause problems
framesPerSec = 2
if "FPS" in commandArgs:
framesPerSec = commandArgs["FPS"]
Expand Down

0 comments on commit 465f6ca

Please sign in to comment.