LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-04-2004, 06:37 AM   #1
gamehack
Member
 
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183

Rep: Reputation: 30
.conf Reading


I want to make a module in python so when I execute this func for example:
readmyconf(myprogram.conf)
every variable in the file to become a variable in my program.For example,conf:
name=something
ip=10.2.2.2

And in the program after executing my function there are the variables name and ip with the assigned values

Thanks in advance
 
Old 04-04-2004, 12:19 PM   #2
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Check out ConfigParser
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ProFTPd-MySQL, not reading SQL directives in conf. JohnnySA Linux - Software 0 08-10-2005 04:41 AM
Reading a conf file from a BASH script dinolinux Programming 5 08-03-2005 04:18 AM
Reading inetd.conf Echo Kilo Linux - General 6 03-17-2005 09:54 PM
SUSE 9.1: named.conf works, but including separate conf files doesn't??? registering Linux - Distributions 0 06-09-2004 04:03 PM
Re-reading Smb.conf magyartoth Linux - Networking 2 06-25-2002 04:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:48 AM.

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