Permalink
Browse files

Remove pathname determination from createThumbs() and make it its own…

… function (getpathname()), then invoke from inside createThumbs().
  • Loading branch information...
1 parent 7e0a0ac commit cce3da12a8e5b3434345a7ddfd150611535983b6 Dayo Adewunmi committed Mar 4, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 public/thumble
View
@@ -4,7 +4,7 @@
# Author : Dayo Adewunmi
# Email: : jargonsummary@googlemail.com
# Date : 20120304
-# Version : 0.3
+# Version : 0.4
# Usage :
# Notes :
# Python version : 2.6.6
@@ -15,22 +15,22 @@ import PIL
from PIL import Image
import re
-# Create thumbnails from images
-def createThumbs():
- """ """
- # Get current directory path
+def getpathname():
+ """ Get pathname of current working directory."""
absolutePath = os.getcwd()
+
+ return absolutePath
- # Get the name of the current directory
- currentdir = os.path.basename(absolutePath)
-
+def createThumbs():
+ """ Create thumbnails from images."""
linebreak = 1
newrow = '</div></div><div class="newrow">'
samerow = '</div>'
# Go through the filenames in the current directory...
- for dirname, subdirname, filenames in os.walk(absolutePath):
+ #for dirname, subdirname, filenames in os.walk(absolutePath):
+ for dirname, subdirname, filenames in os.walk(getpathname()):
for filename in filenames:
# Find all images
if isImageFile(filename):

0 comments on commit cce3da1

Please sign in to comment.