PDA

View Full Version : The Ultimate Python Modules and Operations Reference (Please make it so...)



1337455 10534
October 2nd, 2007, 09:31 PM
Can we have a setup on this thread where people can come in and specify a task they need to accomplish in Python, and a very nice responder can say "///"? For example,


>>> Hey, how do I give the terminal commands through my .py script?
a responder would say;
>>>

import os
os.system(" insertterminalcommandhere ")


That would be extremely helpful!! And ubuntuforums can get a break from all of the people who will make extra threads for every single Python problem they encounter. Come to think of it, there should be something similar for more languages. Oh well, I write Python, sooo:

Python Problem #1:
>>> How do you add a repository using just terminal commands in a script? I know import os and os.system(" ///") is involved somewhere! Are the commands like "wget ---"? And how would you add the keys (GPG's, URLs) and enable the repos? Please help... Thank you.

CptPicard
October 2nd, 2007, 09:35 PM
Much easier to post a new thread with a descriptive subject so you can see it at a glance and mark it solved when it is. Nobody would bother digging through the thread for stuff to answer just for the express purpose.

1337455 10534
October 2nd, 2007, 10:00 PM
In the case that *someone* might find this useful, can somebody just answer the question? That would suffice.

pmasiar
October 2nd, 2007, 10:07 PM
Just post new thread with meaningfull title and possibly mark it as python. Nobody is going to wade through off-topic comments on multi-page thread, and you don't want to manage table of topics by hand. Google is good at searching, let THEM handle that.