[Trac] edit trac.ini using python/shell
I want to edit trac.ini using python/shell. Whats the best way to do it. Want something like I should be able to read trac.ini into some sort of dictionary/list, check if some option is present in the dictionary, and edit its value. There are some options that I want to add like track.hg* = enabled, webauth plugin = disbaled webadming = enabled etc. If something like this is already present then it will be fine, otherwise i will write one myself. Can anybody guide me towards the best way of achieving this. Thanks in advance. Alind Sharma Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: edit trac.ini using python/shell
FWIW, I wrote a library/program called martINI for these ends that several of my software rely on: https://svn.openplans.org/svn/standalone/martINI/ However, there are at least half a dozen python solutions for reading + writing .ini files programmatically. Jeff On Tue, Aug 11, 2009 at 01:03:03AM -0700, alind wrote: After some more searching I found a library python-configobj http://www.voidspace.org.uk/python/configobj.html#downloading Am I suppose to use some other thing. IMHO this will work fine for me. Thanks. On Aug 11, 12:42 pm, alind sharma alind_...@yahoo.com wrote: I want to edit trac.ini using python/shell. Whats the best way to do it. Want something like I should be able to read trac.ini into some sort of dictionary/list, check if some option is present in the dictionary, and edit its value. There are some options that I want to add like track.hg* = enabled, webauth plugin = disbaled webadming = enabled etc. If something like this is already present then it will be fine, otherwise i will write one myself. Can anybody guide me towards the best way of achieving this. Thanks in advance. Alind Sharma Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now!http://messenger.yahoo.com/download.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: Knowing Enough to be Dangerous
On Aug 10, 12:32 pm, Leonardo Santagada santag...@gmail.com wrote: On Aug 10, 2009, at 12:05 PM, Emmanuel Blot wrote: This is only needed if you want to install from a subversion repository made by svn 1.6, Actually, if you checkout the code with a SVN 1.6 *client*, the repository server/format does not matter. that is what I tried to say, if you check out code with 1.6 the working copy entries file cannot be read by setuptools. I wrongly used the dvcs nomenclature, that what you have on your machine is a repository... which is not the case with svn, sorry. -- Thank you for your responses. I appreciate all of them. I did not realize how many different considerations there are for an installation. ray --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Looking for WikiNegotiator for Trac=0.11
Hello ! Does anybody know about a version of WikiNegotiator written for Trac=0.11 (i.e. without ClearSilver and so on ...) ? If not, what should be done to «upgrade» it ? Do I only need to implement templates using Genshi ? What do they actually do (i.e. templates) ? Thanks in advance . -- Regards, Olemis. Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: edit trac.ini using python/shell
On Tue, Aug 11, 2009 at 4:03 AM, alindalindsha...@gmail.com wrote: After some more searching I found a library python-configobj http://www.voidspace.org.uk/python/configobj.html#downloading Am I suppose to use some other thing. IMHO this will work fine for me. Thanks. On Aug 11, 12:42 pm, alind sharma alind_...@yahoo.com wrote: I want to edit trac.ini using python/shell. Whats the best way to do it. Want something like I should be able to read trac.ini into some sort of dictionary/list, check if some option is present in the dictionary, and edit its value. There are some options that I want to add like track.hg* = enabled, webauth plugin = disbaled webadming = enabled etc. If something like this is already present then it will be fine, otherwise i will write one myself. Can anybody guide me towards the best way of achieving this. Thanks in advance. Alind Sharma Why bother? If you already have Trac, just use what Trac uses: from trac.config import Configuration. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Re: edit trac.ini using python/shell
On Aug 11, 3:38 pm, Erik Bray hyugaricd...@gmail.com wrote: On Tue, Aug 11, 2009 at 4:03 AM, alindalindsha...@gmail.com wrote: After some more searching I found a library python-configobj http://www.voidspace.org.uk/python/configobj.html#downloading Am I suppose to use some other thing. IMHO this will work fine for me. Thanks. On Aug 11, 12:42 pm, alind sharma alind_...@yahoo.com wrote: I want to edit trac.ini using python/shell. Whats the best way to do it. Want something like I should be able to read trac.ini into some sort of dictionary/list, check if some option is present in the dictionary, and edit its value. There are some options that I want to add like track.hg* = enabled, webauth plugin = disbaled webadming = enabled etc. If something like this is already present then it will be fine, otherwise i will write one myself. Can anybody guide me towards the best way of achieving this. Thanks in advance. Alind Sharma Why bother? If you already have Trac, just use what Trac uses: from trac.config import Configuration. I second that, however, generally when I want to read ini files, I use the good 'ol ConfigParser library. as a matter of fact, I think I still use this recipe, or a variant of it: http://code.activestate.com/recipes/65334/ you only need the LoadConfig method to read it, the rest is just code to support the python standard main() function with some values: pre def LoadConfig(file, config={}): returns a dictionary with key's of the form section.option and the values config = config.copy() cp = ConfigParser.ConfigParser() cp.read(file) for sec in cp.sections(): name = string.lower(sec) for opt in cp.options(sec): config[name + . + string.lower(opt)] = string.strip (cp.get(sec, opt)) return config /pre and the commented/follow up tighter write method looks like the way to write. lets you do this: assming your object is cfg print cfg.sectionX.parameterY.value and cfg.sectionX.parameterY.value=newvalue type addressing, with this type or recipe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---
[Trac] Setup notifications
Hello, i'd like to know if it is possible to setup the notifications so that additionally to the normal notifications, the notifications for opened and closed tickets are send to a specific mail address (nothing else --- not this cc-field). Regards, Hendrik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---