- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
25 Posted Topics
Re: It uses firefox to play mp3's. Odd. But overall 10/10. | |
Re: How can you access files in directories in a ZIP?, i.e: ZIP --> Folder --> File --> Python? I can do this on Linux, but not on Windows... | |
Re: Is it possible to add a wx switch to the compiler? I know my wx apps compile fine.. For something as large as SPE, it could be any number of things.. Sorry. | |
Re: That is pretty ingenious! Does it work without using lambda? e.g '1':"w/e", etc ![]() | |
Re: Is it possible to do a [code=python] import os os.system('tskill firefox') [/code]? | |
Re: You, my friend, need to try concatenation. I believe that it works with both lists and strings, so this is what you'd do; [code] final = fileString1 + '\n'+ fileString2 + '\n' + "" + integerData outfile = open('outfile','w') outfile.writelines(final) outfile.close() [/code] edit: you can set any object as a … | |
Hi, I'm a high-school freshman that wont be taking a programming class until next year. I am proficient at Python, and they decided to put me in AB Programming, which is Java. When I first started programming on a z80 TI-83+ with BASIC, I set out to make my life … | |
I need to convert .docx files to .doc (on Linux and Windows). I'm planning to use the zip mod to access all of the internal XML documents. Then I'll the /word/document.xml and I need to parse it so that it will read all of the text in the tags, place … | |
Hi, I am in the search of my 'perfect' Linux fit. So far, Ubuntu 7.10 seems to be getting the most points, but it is slow compared to Zenwalk and others. My hardware is pretty good, it can manage Compiz Fusion fairly well, but boot times and desktop nice-ness (*as … | |
Re: Your best method would be to use lists (in C, arrays). (BTW: 1. I don't think you can use self outside of a class. 2. raw_input always returns a string ) [code] data = [] type = raw_input("Type: ") entry = raw_input("Entry: ") data.append(entry) def report(data): x = len(data) print … | |
Re: [code] guess == int(raw_input("enter an integer:")) [/code] should be [code] guess = int(raw_input("enter an integer:")) [/code] If you try to assign a value to a variable using '==', you will return a Boolean data validity confirmation ;), that is to say, it will return True if the two variables are … | |
Re: A web browser is better suited for such, but please search the global module index, there will be something in there for you. | |
Hi, to me, specifying hardware for compiling the kernel is the biggest pain and things never seem to go perfectly. Either the boot process is too slow, or sound doesn't work, or something... Is there a script that will determine what to omit or compile based solely on the hardware … | |
Re: [code=python] a = input("Number: ") b = 2 + a filename = eval(str(b)) outfile = open('%s' % filename,'w') outfile.write(b) [/code] | |
Re: Very simple :); Do you know what to do? Do you even know what you want to do? There's a wide variety of games... I'm sure you've heard of Pygame.. why don't you test it out. I made a lil star-wars thing in a week.. | |
Re: Webbrowser is great too. [code] import webbrowser as WEB WEB.open('anyfile.extension') # are URL's accepted? probably # or under Linux, you could; # import os # os.system('firefox URL') # and then # os.system('killall -9 firefox') [/code] | |
Re: If you want to send data to external programs, your easiest method is using sys.argv. After executing your first program, you'd need to execute the other program with your data in the argument within your code. [code] import os def main() : hours = input ("How many hours do you … | |
Re: If you have kernel source, look in promising folders. There isnt great documentation on where to find things, I dont think. There are daemons (background tasks), active, dead, zombie (killed but still active), and paused processes (thread-types, I guess). And I have no clue what a data structure is. Good … | |
Re: Yeah, it may be better to backup your files and Gconf, then do a manual reinstall via CD. The dist-upgrade method messed up all of my default programs (on Feisty). To linux: do you have an UbuntuForums account? You'd benefit, its a great forum. | |
Re: Get easygui and look at the source for fileopenbox or diropenbox. [url]http://www.ferg.org/easygui/index.html[/url] | |
Re: If you dont read the link; [code=python] yourfile = open('yourfilename.txt','r') # r stands for read yourtext = yourfile.readlines() print yourtext [/code] | |
Re: yeah, really, wth? what is paragnet and how is source code difficult to get? What's there to decrypt??? | |
So I have a pyGTK app going on nicely, but it requires sudo permission (under Linux) to perform a BASH operation. If I prompt for a password using a GUI, is there any way I can do my BASH stuff without sudo asking the user for a password in the … | |
Re: I'm not gonna bother changing your approach, just perhaps you code. I wouldn't define a function in a function. Try classes. And its good syntax to define a function before you use it. [code=python] import math #class MyMath: def isEvenAndPrime(n): print "="*52,"\nERROR:",n,"is already prime." def primeTest(p): stop = int(math.ceil(math.sqrt(p/2)))+1 for … |
The End.