15,181 Topics
| |
#Name: Calum Macleod #Date : November 6, 2012 #Purpose: A Python program with a loop that lets the user enter a series of whole numbers. #The user should enter the number -99 to signal the end of series. #After all the numbers have been entered, #the program should display the … | |
I need to read excel files and compare them and produce new outcomes using Python. i have realized that by suing the following codes I can read an excel file: import xlrd wb = xlrd.open_workbook('values.xls') wb.sheet_names() But i keep getting error of: [COLOR="Red"]Traceback (most recent call last): File "C:/Python26/Atest/filename.py", line … | |
I'm writing a script that downloads files for web design, and this line produces Traceback (most recent call last): File "bootlace.py", line 60, in <module> download(data['jquery'], 'Downloading jquery. (File size %s)', 'js/') File "bootlace.py", line 11, in download file_size = int(meta.getheaders("Content-Length")[0]) IndexError: list index out of range That line is … | |
I'm learning django and for the latest version of the tutorial i'm using, you must have python 3 installed. Despite the fact I have python 3 installed, python 2.7.6 is being loaded. My path originally had no reference to python, so I added it. C:\Ruby200-x64\bin;C:\Users\Freddy\AppData\Roaming\npm;C:\python33\python.exe However, python 2.7.6 is still … | |
| Can the sibprocess.call('') function be used to execute .mp3 files, it doesn't work for me. Which function is used to run any video or audio file from within Python? |
so i "finished" my irc bot in python. by finished i mean it only connects to irc.quakenet.org #cplusplus (you can see it if you connect. its called DTSCode-Bot). however, the point of my class isnt just to create a bot. i also want to create a client. so i cant … | |
I am trying to create a Caesar Cipher in Python. I have managed to put together my program with the help of some other websites but have hit a bit of a wall. My code allows me to encrypt a single character and will then ouput this and write it … | |
Hey there everyone. well i have been working on python for about 2 months now and i just cant seem to get my background image to work. I have created the GUI with Tkinter and put a label in it with my name etc, but the idea was to have … | |
Hi there, I am a novice in python. I want to use python in web development but I don't know where I start. Please help me. | |
Hi everyone, I recently installed Python on Windows. I wanted to develop a gui program using Tkinter. The problem is that when I try to import Tkinter module. It gives me a 'module not found' error. But I thought Tkinter was preintalled within Python's installation. It is even more confusing … | |
In the following program why is pwd.getpwuid returning my user and group names followed by three commas? Where ar ethe commas coming from? #!/usr/bin/python3 import os, stat, pwd dirList = os.listdir() permissions = (stat.filemode(os.stat(dirList[1]).st_uid)) string = permissions + ' ' string = string + dirList[1] print(string) temp = os.stat(dirList[1]) print(temp.st_uid) … | |
hi, can any one help me to use the jira in python how create the code ?? how ro run it ??? | |
hi, **please help me to solve the error for:** **text1.txt:** line1 <data> line2 <items> line3 <match name="item1" rhs="domain.com"></match> line4 <match name="item2" rhs="domainn.com"></match> line5 <match name="item2" rhs="1010data.com"></match> line6 </items> line7 </data> **text2.txt:** line1 djshjsdf line2 sdfngjfg check domain.com,domain.com,1010data.com in text2.com, if not there print domain.com,domain.com,1010data.com in to the 3rd text file(text3.txt) … | |
I'm trying to create a window with QWebView as its central widget and set inside it only the youtube clip box without the rest of the information on that youtube webpage. The YouTube links can change by request of the user. I found this [example](http://stackoverflow.com/questions/15983148/the-sound-dont-stop-when-qwebview-window-closed-loaded-with-youtube-video) where it works that way. … | |
so.. to put this simply: >>> BU5 = bu(5) >>> BU5() 0 >>> BU5(1024) 1024 >>> BU5 == bu(5) False >>> BU5 <__main__.bu instance at 0x00AC5E40> >>> bu(5) <__main__.bu instance at 0x012C6788> BU5 == bu(5) is supposed to return True due to it's expected usage: >>> var = bu(5)() #read … | |
Shows you how to play sound files with the pySFML module and Python. | |
QUESTION DEFINITIONS var P1_1 = new Array("P1_1", "An audit charter should:", "A. be dynamic and change often to coincide with the changing nature of technology and the audit profession.", "B. clearly state audit objectives for the delegation of authority for the maintenance and review of internal controls.", "C. document the … | |
text1.txt: line1 hdfbghasbfas line2 jdsbvbsf line3 <match name="item1" rhs="domain.com"></match> line4 <match name="item2" rhs="domainn.com"></match> line5 <match name="item2" rhs="1010data.com"></match> need to retrive domain.com,domainn.com,1010data.com to "result.txt" `` import re f1 = open("C:/Users/Netskope/Desktop/m/test1.txt", "r") f2 = open("C:/Users/Netskope/Desktop/m/result.txt", "w") d1 = f1.readlines() for line in d1: match = re.findall('<match name="item1" rhs="(\w.+")', line) if match in … | |
Hi there, I'm not a developer. I'm a graphics designer. I would like to learn about web development. For that I'm doing research in different languages. Most of them suggested PHP and Python. I know little about PHP. But Python I don't rightly know. Tell which one I can go … | |
if __name__ == "__main__": args = parse_args() install_path = os.getcwd() if os.getuid() != 0 and args.create_user and not args.no_install_prequisites: While compiling the above source code in windows i get this error > module' object has no attribute 'geteuid' windows can any one resolve this. | |
Hi Is there any possibility to update tuples dynamically(in a :for loop" say) Else is there possiblity to dynamically create a new tuple? Thank you in advance | |
Currently I am working on a project (on and off for two months) called Chrono Leap. The main idea is that you will be able to go from the past to the present to the future whenever you want. You will face creatures and all that jazz as you go … | |
Hello, I'm using import win32crypt from my python file. When I execute the python using IronPython in C# ? I got this error : No Module found Win32Crypt. var ipy = Python.CreateRuntime(); dynamic test = ipy.UseFile(@"mypythonscript.py"); mypythonscript.py import win32crypt ... | |
Can anyone explain why this error happen ? I try to decrypt password from database file. cursor.execute('SELECT action_url, username_value, password_value FROM logins') for result in cursor.fetchall(): password = win32crypt.CryptUnprotectData(result[2], None, None, None, 0)[1] if password: print 'Site: ' + result[0] print 'Username: ' + result[1] print 'Password: ' + password … | |
hi i need a script for "searching some domain name(www.google.co.in) in text file and compare it with data in second text file, if the domain name is not there in second text file and write that domain name in to the third text file | |
how to create a loop that will make sure that my dice can be rolled as many times as required? here's my code as a start off. import random dice=random.randrange(1,5) dice2=random.randrange(1,7) dice3=random.randrange(1,13) sim=input (“Which sided dice would you like to roll? You can choose a 4-sided dice, a 6-sided dice … | |
I have made a python script that takes path of a folder and dispalys images in gallery or slideshow made in pyqt? So how do I add a right click menu of the folder in finder to pass the same folder path as argument to python script ? | |
Hi, we are going to inroduce graphics in our project using python (Version 2.4), I coulsn't find the module related to graphics in this version. Is there anything you know please share that. I would be thankful if you could share the modules which suites Python 2.4 + | |
in python, I want to code for the user to choose between a 4-sided dice, a 6-sided dice or a 12-sided dice. how do i do that? | |
import random dice=random.randrange(1,5) dice2=random.randrange(1,7) dice3=random.randrange(1,13) sim=input (“Which sided dice would you like to roll? You can choose a 4-sided dice, a 6-sided dice or a 12-sided dice.”) if output=4 then print (“The 4-sided dice has rolled to”,dice) elif output=6 then print (“The 6-sided dice has rolled to”,dice2) elif output=12 then … |
The End.