15,179 Topics
| |
can someone please help me I am facing a problem; I want to draw an image in the canvas depending on the value of the IntVar called position however I get an error; Exception in Tkinter callback Traceback (most recent call last): File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__ return self.func(*args) … | |
hey guys I need help! I need a calendar program in pyhon!! without import module. can you hlp me?? | |
Just a small example showing how to draw circles with PySide (public PyQT). I used LightShot to capture the display, which gives you a link to the picture. http://prntscr.com/kw6b6 | |
Hello, I would like to know if there is any wway to change the Title of an input box( Left Upper Corner). Lets say we have the input box: x= input("blah blah blah") if we run that the title of the input box would be like "Python input" or something, … | |
*Hi, I am trying to plot a 3D surface plot. I have a list of x,y,z values. They are all of different dimensions. y1 y2 y3 y4... x1 z11 z12 z13 z14 x2 z21 z22 z23 .... x3 ................. x4 x5 . . . etc..* import csv from mpl_toolkits.mplot3d import … | |
Write a correct, well-structured, well-documented Python program to create a list of lists containing student information. You are to create one master list whose elements must be lists containing elements for the student’s first name, last name, major, credit hours completed, and quality points earned. (The organization of the master … | |
I started learning PyQt from zetcode, as far as i know sys.argv reads in the parameter from coomandline and first being the name of file itself, so if sys.argv is a list then what being passed to QtGui.QApplication() in def main(): app = QtGui.QApplication(sys.argv) ex = Example() sys.exit(app.exec_()) | |
Trying to go thru the contents of a table with the following layout indexfield1,art1,art2,art3,art4 In this table indexfield and art1 are always filled art2, art3, and art4 can be empty. In pseudo-code this is what I want to do: for each art of table where indexfield = x: do bladibla … | |
Does anyone have experience with calling a Python script to parse data into a Scribus template and generate a pdf file ? I know about the ScribusGenerator by Ekkehard Will, which works pretty well, but I have a tailormade python script that combines data from 2 csv tables. Would it … | |
Hi, I'm learning python and I just started to learn about classes. To get a handle on this, I decided to make a black jack game and create 3 classes: deck, hand, and card. I created a card class, but I am not sure how I would implement it in … | |
so I have written a acript that logs into google calendar and pulls the next weeks events and stores them in variables. I am stuck at how to get these variables and put them into a html page does anyone have any ideas? I am running the script once a … | |
The program I'm making is a program that will display a word in one language and ask for the translation in another. It will then display if it's right or wrong. However, when I test to see if it works, it will display all of the versions of Incorrect, even … | |
Please let me know how to sort the list of String in either ascending / descending order without considering special characters and case. ex: list1=['test1_two','testOne','testTwo','test_one'] Applying the list.sort /sorted method results in sorted list ['test1_two', 'testOne', 'testTwo', 'test_one'] but the without considering the special characters and case it should be … | |
I'm trying to go thru a file with product codes and rateband prices and quantities (productcode, pricea, qtya, priceb, qtyb, pricec, qtyc, priced, qtyd, pricee, qtye). For a certain group of up to 4 productcodes I need to sum up the values of the price cells after testing the qty … | |
Hello, I have the following Python Code. I would like to replace the block2=(letter1<<16) + (letter2<<8) + 32 using array module. ANy help is appreciated! for letter1 in range(65,90): for letter2 in range(65,90): ptext=chr(letter1)+chr(letter2)+chr(32) block2=(letter1<<16) + (letter2<<8) + 32 ctext=pow(block2,e,n) table[ptext]=ctext | |
Hello developers, I have written this code which walks through the html files in a directory and fetches event and date information and print it on screen. I want this data to be stored in a database. I have installed mongodb and pymongo module. How can I insert the output … | |
Hello Developers, I am a beginner in python and need help with writing a regular expression for date and time to be fetched from a html document. In the following code I am walking through the html files in a folder called event and printing the headings with h1 tag … | |
Hi There. I joined here some three years ago when i created my ONE and ONLY Python program that actually functions as intended *YAY*, it's a little ugly and i've decided to return and learn more, improve it and maybe start up some new projects. I'm a little confused as … | |
Hey! Just wondering how you make the code keep asking for a correct file input until a correct file is inputted, rather than just exiting the program when incorrect? f = input("Enter a file name: ") try: infile = open(f, "r") except: print("File not found:", f) text = infile.read() print(text) | |
3 1 100 80 2 100 70 3 110 60 4 140 50 5 140 200 6 230 10 7 235 200 8 240 20 9 240 30 10 240 30 I am inputting the above in a simulator that simulates people in line at a store. The 3 means … | |
My problem with my TIC TAC TOE game is that it does not save end the game when someone has won if they have more than four moves. THe method of my code to check if someone has won is that it goes over a list of list. The list … | |
i want to make sure that people can quit in the middle of the game and the question is random not in order... please help me.. # make input equal to Python3 style input even in Python2 import random try: input = raw_input except: pass question =" " print("Welcome to … | |
Hello all, I was just wondering if anyone has code snippet for a function that is a multi-queue.....this is for python 2.3 or 2.4 I think so it has to be a bit primitive. The program is simulating people at a store arriving at the checkout, the input from a … | |
I stuck at the part about how many question they want for their game.This is the requrirement. Write a program for an application that let the user host a quiz game. The application will have a collection of questions with short answers. The program should ask the user how many … | |
So I am done with the code below, I will run it like this "python hw3.py < code.txt" I think I have a problem with the indentation or something. the code.txt has a mixed up text in it that is offset using a caesar cipher but it has to be … | |
def random(fileName) setup = open(fileName, "r" ) z = setup.readline() waiting = stack() for line in setup: customerNum, arrivalTime, serviceTime = line.split() plane = Customer(customerNum, arrivalTime, serviceTime) push(waiting, plane) setup.close() print "The data file specifies a", z, "-server simulation." print "There are", len(waiting) , "arrival events in the data file." … | |
Hi guys, Having a bit of a problem with reading and writing to a file. I have a file that has a lot of symbolic stuff I want to remove. And get a new kinda clean file with just the numbers and names. And it finds the line where it … | |
I am creating a bar graph essentially **just by only using the graphics module**. I am stuck with it. Below is my code that I have done which creates a perfect square. (10 x 10) so for every one bar I was it to decrease by 10. def drawRectanglePatch(win, x, … | |
How can i locate a file or a folder using python like some when we right click in downloaded files using firefox and open containing folder,and it opens the explorer and pre selects the file downloaded. how can this functionaly be implemented using python standard library ? however this code … | |
Hi, Im new to programming and to Python. Im making a program to get weather information from online, parse it the way I want to, then have Festival read it aloud to me. I got the weather info and parsing done exactly how I want but am getting an error … |
The End.