15,181 Topics
| |
Hi! I've got an assignment to read an input file and do some calculation and a graph and fancy stuff like that. The problem I am having is reading the file. I get a file that looks like this: [code] 0.00 1.776e-12 3.756e-07 0.000e+00 0.000e+00 0.20 1.769e-12 2.377e-07 0.000e+00 0.000e+00 … | |
we installed Openoffice.org 2.3 and i am tryingt to run the script by importing UNO and it is throwing up an error saying there is no module called pyuno. I am not able to find pyuno.py file in the location where i have installed open office Please assist. | |
I am trying to add user input using the raw_input function to string url_orig. I am attempting to replace the spaces with +'s to make a 'google search'. the replace function works fine in IDE but not when I excecute the program. Any help will be appreciated [code]url_orig = 'http://www.google.com/search?hl=en&q=' … | |
Hi, I'm tring to write a script that as to be executed by root on linux... This script execute other bash script normally like root, the problem was that I have to log what my script do. I choose the logging library... Perhaps I have to write the log in … | |
Okay, I appreciate everyone's help! i am trying to work out how to find a duration type thing.. i have created this as an example of what i am trying to do. [CODE] ### gaining inputs start= raw_input("What time did the tv show start: (Format = 14, 12) ") finish= … | |
just wondering if there is anything in python to give the date automaticly, just like excel has =today() cheers. | |
Hi everyone, I just started working with Python and programming in general (i chose it as a school subject for this year) and i received a task(scroll a bit more down).. since im a total newbie with Python in general.. i was hoping someone could please explain this task in … | |
well, after the help i have had already tonight, i thought i might come ask another issue i am having with saving the file with the .txt extention. i can save each file as the car model first name for each entry, however it wont put the .txt extention on … | |
listText=["Car","Bike"] for intkLoopIndex in range(0,2) f.write(str(listText[intkLoopIndex])+ '\n') i am using the above code to write a string onto a document. How can i display the text in [B]bold [/B]in the document? Can i set the font property when i write? | |
Hi I was wondering if there was any way i could use a module or some code to enable and disable my wireless network becuase i often have the problem that it wont connect and enabling and disabling it a number of times nearly always fixes it and i was … | |
This function arranges a list of number. If we try z= [4, 4, 2 ] the result will be after some steps 4,3,2,1 but my list is z = [ 1, 1] and I want if a cycle of number coming up again and again the main program will discover … | |
Iterating over a list, possibly deleting elements. It's the bane of my existence. Suppose, for instance, we have a list of numbers, and want to iterate over it and delete each and every odd one. Sounds simple, right? Sorta. It's trivial, but the code you end up with is pretty … | |
Hi All, first of all thanks to all for helping me out till now, whenever i got stucked somewhere that time u all helped me out.I need some more help of u all.I am using python 2.5 along with wxpython,and i need to increase the visibility of the dialogs and … | |
Greetings, I am trying to do a reconnect type of thing for when sqlserver disconnects me i check and reconnect to execute a query. here is some code that i wrote, I really don't know what to use since there is not isconnected method or reconnect method in pymssql. Any … | |
can someone show me some code to convert rankine temperature to kelvin? rankine is in the same scale as fahrenheit, but it starts at absolute zero. so 0R = -459.67F, heres is what I have convert to kelvin [code=python] def __init__(self, value=0): Fah=value-459.69 Cel=(Fah-32)*5/9.0 value=Cel-273.15 Temperature.__init__(self, value) [/code] convert back … | |
I am not sure how to word this question. If I am defining function() to be a user input prompt, does the [code] name_of_prompt = raw_input("") [/code] name of prompt equal the name of fucntion or could it be prompt_funct1? If so, when using if...elif statements to call on other … | |
Hi all, I have a little project that I think would be possible to accomplish using python. I'm a beginner at this sort of thing, so I am posting the basic information in the hopes that someone out there could help me get started or point me in the right … | |
hello, I have to write a program that draws a chart from dictionary entries. I am able to make a draw a chart however it is unsorted. How can i get it sorted. Please help asap. THANKS in advance. [CODE]from random import shuffle from graphics import * def main(n): win … | |
os version =windows xp hi guys i'm having problems using pygame the following code just does not seem to work. Code: ( text ) 1. clock=pygame.time.Clock() 2. while True: 3. sound1.play() 4. clock.tick(60) 5. pKeys = pygame.key.get_pressed() 6. Eves=pygame.event.get() 7. villian.face() 8. villian.hert() 9. if Eves[KEYDOWN] and pKeys[K_UP]: 10. hero.moveup() … | |
I am still reading the learing python o'reilly book and not sure the best way to approch my problem. Given c:\dir1\dir2\dir3. I want to zip all files in dir3 if those files are older than 30 days using 1 zip file (ie. dir_3_files.zip). If all files in dir3 are older … | |
hey everybody I'm taking a computer class right now and one of the projects I need to do is create a very simple pizza-ordering menu. At this pizzeria, there is only one kind of pizza you can order: regular (cheese) with no toppings. Your choices are what size of pizza, … | |
I would like to convert word document .doc tp acrobat .pdf using Python. Please help. | |
hi pythoners, i have problem in understanding bind method of socket module i have read many articles and even pythons help and docs but i couldnt feel what it really is so anyone can help me please? | |
Hello, I wanted to know if Python can be bundled with any C++ project so that it can be installed when the executable of the project is run. I use Python 2.4 and PyXML-0.8.4 on Windows XP SP2. | |
Just noticed an odd little problem. Instead of explaining it, take a look at this IDLE run: [code]>>> ================================ RESTART ================================ >>> class test: eggs = True >>> var1 = test() >>> var2 = "text" >>> type(var2) <type 'str'> >>> type(var2) == str True >>> type(var1) <type 'instance'> >>> type(var1) … | |
Hey, Does anyone know how to pickle classes that have classes within them? I get back the top level attributes, but not the attributes under them. For instance: [code] import pickle class authorObj(): class authors(): pass q = authorObj() q.authors.name = 'somebody' output = open('test.pkl', 'wb') pickle.dump(q, output) output.close() [/code] … | |
Can someone please tell me what I am doing wrong with this loop. I want to end the loop when either one of the tanks armour reaches zero. Also if I wanted to add more tanks how can I have the loop end? Thanks import random class Tank (object): def … | |
Hey, this time I'm back with a threading error! I need to write code that gets the address of a message sender while at the same time letting the user know that the pygame didn't freeze, so I started a thread to keep control of the screen while searching for … | |
Okay i'm probably majorly over thinking this but i need to create a counter that counts how many weeks a certain value gets exceeded, except i honestly don't know how to do it. I thought of find the end max value and taking it away from the first max value … | |
Hi I have been working on a blackjack program and i have hit a brick wall as one of my Global assignments isn't working for some reason [code] import random class Cards(object): def __init__(self): global cards global player global comp global comp_tot global playert cards = {2:4,3:4,4:4,5:4,6:4,7:4,8:4,9:4,10:16,'ace':4} player = [] … |
The End.