Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

My utility functions. Will be adding more

Project Description


This is a collection of utility functions, which can simple, and are a whole lot useful.

This version of the utility functions includes only those dealing with the files, directories, full paths of those.


Get the expanded path of directory dir_

The home directory of ~ is /home/rv and home directory of zope is /usr/local/zope

>>> full_path('~')
>>> full_path('~zope')

For a non existant user ~test, the result will be current_directory/~test

>>> full_path('~test')

Join the list to form a directory path

This is just a convenience function.

>>> join_path('~', 'test')
>>> join_path('/home/rv', 'test')
>>> join_path('test', 'README.txt')

determine if dir_ is a directory.

>>> is_directory('.')
>>> is_directory('~')
>>> is_directory('/')
>>> is_directory('no/such/directory')

get a list of files(absolute path) in directory dir_

the .directory happens to exist in my computer, but for now
the function works as intended.

>>> get_files_in('/home/')
>>> '/etc/passwd' in get_files_in('/etc/')

get a list of directories(absolute path) in directory dir_

>>> sorted(get_directories_in('/home/'))
['/home/guest', '/home/rv']
>>> '/home/rv/Desktop' in get_directories_in('~')

get the latest file in given directory

>>> get_latest_file_in('~/expertpy/roopeshv.utils', prefix=[])


version 0.0.1

  • added few convenience functions
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
roopeshv.utils-0.0.2-py2.6.egg (6.1 kB) Copy SHA256 Checksum SHA256 2.6 Egg Jun 17, 2010
roopeshv.utils-0.0.2.tar.gz (2.9 kB) Copy SHA256 Checksum SHA256 Source Jun 17, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting