Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-20-2009, 11:31 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 14

Rep: Reputation: 0
specifying a directory path in python

Hi, I'm trying to write a script in python to extract data from maillogs in gz format. I wrote a shell script but i now want to do this in python, as thats the preferred method where i work.

anyway does anyone know how to specify directory paths

for example the maillogs exist in /var/log so i want the script to go to that directory

would LOG_DIR="/var/log/" work?
Old 11-20-2009, 12:00 PM   #2
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40

I recommend reading some docs and tutorials.

Yes, you can set a Python variable that way.


linux, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add python to the PATH... trist007 Linux - Newbie 2 03-21-2009 09:11 AM
Find a file path and directory path ak.lokesh Linux - Newbie 3 02-19-2009 12:37 PM
Python upgradation,setting compiler $PATH jared78 Linux - Newbie 9 01-20-2006 12:12 AM
How to rsynce the actual directory path instead of just the directory at the end of Niceman2005 Linux - General 5 04-08-2005 07:58 PM
How do I change python search path Giallo998 Linux - Software 1 10-22-2003 07:27 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration