Skip to content
This repository has been archived by the owner on Nov 22, 2019. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mfe committed Nov 14, 2013
2 parents 3b7fd92 + 7e5b40e commit 1b90bd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions plotThatLut/plot_that_lut.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ def show_plot(fig, filename):
split_filename = os.path.splitext(filename)
filename = '{0}{1}'.format(split_filename[0],
split_filename[1].replace(".", "_"))
currdir = os.path.dirname(os.path.abspath(__file__))
export_path = 'img/export_{0}.png'.format(filename)
fig.savefig(export_path)
abs_export_path = '{0}/img/export_{1}.png'.format(currdir, filename)
fig.savefig(abs_export_path)
return export_path
else:
matplotlib.pyplot.show()
Expand Down Expand Up @@ -175,9 +177,6 @@ def plot_cube(lutfile, cube_size, processor):
return show_plot(fig, filename)





def supported_formats():
"""Return supported formats
Expand Down
5 changes: 4 additions & 1 deletion plotThatLut/plot_that_lut_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""

from os import path
import ntpath
import sys
import traceback

Expand Down Expand Up @@ -111,7 +112,9 @@ def __copyUploadedFile(upfile):
break
all_data += data
# copy uploaded file on the server
backup_filename = "uploads/{0}".format(upfile.filename)
backup_filename = "{0}/uploads/{1}".format(currdir,
ntpath.basename(
upfile.filename))
saved_file = open(backup_filename, 'wb')
saved_file.write(all_data)
saved_file.close()
Expand Down

0 comments on commit 1b90bd9

Please sign in to comment.