15,181 Topics

Member Avatar for
Member Avatar for Caulm64

#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 …

Member Avatar for sneekula
0
10K
Member Avatar for hellohellohello

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 …

Member Avatar for akiva.berger
0
5K
Member Avatar for fheppell

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 …

Member Avatar for snippsat
0
2K
Member Avatar for fheppell

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 …

Member Avatar for slate
0
350
Member Avatar for sravan953

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?

Member Avatar for aru123
0
2K
Member Avatar for DTSCode

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 …

0
113
Member Avatar for bryann

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 …

Member Avatar for mathijs
0
248
Member Avatar for marigold23

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 …

Member Avatar for mrv8corvette
0
6K
Member Avatar for moustafaalsayeh

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.

0
105
Member Avatar for WILLIAM_5

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 …

Member Avatar for nichom
1
623
Member Avatar for lewashby

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) …

Member Avatar for robertwehner
0
105
Member Avatar for srinu_1
Member Avatar for robertwehner
0
197
Member Avatar for srinu_1

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) …

Member Avatar for snippsat
0
372
Member Avatar for alon.lavi.7

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. …

0
41
Member Avatar for Tcll

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 …

Member Avatar for Tcll
0
184
Member Avatar for vegaseat
Member Avatar for vunkas
2
764
Member Avatar for upadhyay_1

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 …

Member Avatar for rrashkin
-1
252
Member Avatar for srinu_1

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 …

Member Avatar for srinu_1
0
378
Member Avatar for Frank15

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 …

Member Avatar for kindo
0
321
Member Avatar for aplh_ucsc

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.

Member Avatar for Gribouillis
0
4K
Member Avatar for subbudaita

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

Member Avatar for Assembly Guy
0
110
Member Avatar for nichom

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 …

0
169
Member Avatar for Khoo

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 ...

Member Avatar for tinstaafl
0
135
Member Avatar for Khoo

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 …

0
89
Member Avatar for Mahesh_9

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

Member Avatar for Schol-R-LEA
-1
143
Member Avatar for Zahra_1

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 …

Member Avatar for sneekula
0
3K
Member Avatar for krystosan

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 ?

0
174
Member Avatar for kuchi

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 +

Member Avatar for vegaseat
0
321
Member Avatar for Zahra_1

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?

Member Avatar for vegaseat
0
158
Member Avatar for Zahra_1

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 …

Member Avatar for vegaseat
0
238

The End.