¡@

Home 

python Programming Glossary: output_filename

Image resizing with django?

http://stackoverflow.com/questions/1164930/image-resizing-with-django

os.path import StringIO def thumbnail filename size 50 50 output_filename None image Image.open filename if image.mode not in 'L' 'RGB'.. Image.ANTIALIAS # get the thumbnail data in memory. if not output_filename output_filename get_default_thumbnail_filename filename image.save.. # get the thumbnail data in memory. if not output_filename output_filename get_default_thumbnail_filename filename image.save output_filename..

How to create full compressed tar file using Python?

http://stackoverflow.com/questions/2032403/how-to-create-full-compressed-tar-file-using-python

a .tar.gz for an entire directory tree def make_tarfile output_filename source_dir with tarfile.open output_filename w gz as tar tar.add.. make_tarfile output_filename source_dir with tarfile.open output_filename w gz as tar tar.add source_dir arcname os.path.basename source_dir..

Convert Word doc to PDF - Python [closed]

http://stackoverflow.com/questions/4818342/convert-word-doc-to-pdf-python

import subprocess import shutil input_filename 'input.doc' output_filename 'output.pdf' p subprocess.Popen 'unoconv' ' stdout' input_filename.. ' stdout' input_filename stdout subprocess.PIPE with open output_filename 'w' as output shutil.copyfileobj p.stdout output You can also..

Handling subprocess crash in Windows

http://stackoverflow.com/questions/5069224/handling-subprocess-crash-in-windows

file using LAME . def convert_mp3_to_wav input_filename output_filename converts the incoming mp3 file to wave file if not os.path.exists.. input_filename command lame silent decode input_filename output_filename process subprocess.Popen command stdout subprocess.PIPE stderr.. if process.returncode 0 or not os.path.exists output_filename raise AudioProcessingException stdout return output_filename..

Creating an ARFF file from python output

http://stackoverflow.com/questions/5230699/creating-an-arff-file-from-python-output

not m print Ignoring the file original_filename continue output_filename m.group 1 '.arff' with open output_filename w as fp fp.write.. continue output_filename m.group 1 '.arff' with open output_filename w as fp fp.write '''@RELATION wordcounts @ATTRIBUTE word string..

Matplotlib - label each bin

http://stackoverflow.com/questions/6352740/matplotlib-label-each-bin

in seconds ' pyplot.ylabel 'Bits of Ham' pyplot.savefig output_filename I'd like to make the x axis labels a bit more meaningful. Firstly..