Fedora Linux Support Community & Resources Center
  #1  
Old 17th December 2005, 12:02 AM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Python help

Hey,
I have a question. I'm trying to make Python interpret my config files. Basically, my program needs to generate a config based on options the user imputs, and I have no idea how.

I was thinking, like in kadischi, the config could be a python file, but whenever I try that, I doesn't work. I type:
import config
and the variables still aren't set.
Any ideas?
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #2  
Old 17th December 2005, 12:57 AM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
EDIT: Sorry, stupid me. Forgot about open-source. I just copyed the fuctions from kadischi and use their syntax to read the config files.
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #3  
Old 18th December 2005, 06:34 AM
Daverz Offline
Registered User
 
Join Date: May 2004
Posts: 128
You could try ConfigObj. I don't like the config module in the standard library, it seems really un-Pythonic to me.
Reply With Quote
Reply

Tags
python

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python, IDLE, Python-tools Gnome. Deonis Using Fedora 2 12th March 2009 03:44 AM
python and python-irclib problem LostSon Programming & Packaging 3 6th March 2008 11:12 PM
Processing Conflict: python-devel conflicts python< 2.3.4-13.1 guarriman Using Fedora 0 15th September 2005 05:53 PM
/etc/cron.daily/yum.cron: Error: python-devel conflicts with python < 2.3.4-13.1 productive Servers & Networking 0 20th April 2005 08:51 PM


Current GMT-time: 06:31 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat