15,190 Topics

Member Avatar for
Member Avatar for lewisrs89

What I am trying to code is a Multiplication quiz game. The trouble I am running into is that I can't seem to figure out how to pass values from one function into another without getting an error. from Tkinter import * class App(Tk): def __init__(self): Tk.__init__(self) self.headerFont = ("Helvetica", …

Member Avatar for woooee
0
218
Member Avatar for rahulinfy

code part1: name1="rahul" name2="rahul" code part2: name1=[1,2,3] name2=[1,2,3] If I run the following code: print name1 is name2 I get "True" for code part1 and I get "False" for code part2 why? why the "reference" is same for name1 and name2 in "code part1" and different for name1 and name2 …

Member Avatar for snippsat
0
212
Member Avatar for tony75

Hi I need to Write a function which takes as input two strings and count how many words are both in the two strings. Display the results sorted according the length of the word (longer first) and in case of equality by the alphabetical order?

Member Avatar for tony75
0
170
Member Avatar for giancan

Dear friends, I completed my script that makes use of opencv (import cv2) and I am experiencing problems with py2exe and other similar compiler. I work on a win7 64bit machine but all my packages and python (2.7) are 32bit because I was already planning to distribute my software on …

Member Avatar for giancan
0
377
Member Avatar for Helper guy

Suggest i am wonder about where to i start Pythone because i like it very much and i want to learn but i dn't know where to start so please suggest me ...................................

Member Avatar for M.S.
0
191
Member Avatar for NiescierJ

Hey i am new to python and i am trying to update my GUI every 3 seconds 4 times. I have tried time.sleep() but it doesnt work. Any ideas? for i in range(4): #creates 10 circles randomly on the canvas for _ in range(10): circle1= Circle(canvas, random.randint(1,750), random.uniform(1,450), "red") time.sleep(3)

Member Avatar for NiescierJ
0
125
Member Avatar for kaushik240

hey people.... i want to write a python program that should open a html file that I created and stored in the same directory. What should i place inside the server code to implement this??

Member Avatar for slate
0
69
Member Avatar for gskssit

Hi, I have a PCL file which consists of following lines for the first few lines. uil_file_new.go( "C:\MSC.Software\Patran_x64\20121/template.db", @ "C:\Users\IMEMS SDC\Desktop\patran\plate.db" ) set_current_dir( "C:\Users\IMEMS SDC\Desktop\patran" ) The uil_file_new.go which is a default command for creating new database in patran. Now i want to keep the file name as an user …

Member Avatar for Stefano Mtangoo
0
235
Member Avatar for Koljik

stupid title i know :) But anyways, is there a way to "go to" a previous line. something like this: 1. something 2. something 3. something 4. if a<b: (go to) / (do) third line ty

Member Avatar for Koljik
-1
238
Member Avatar for user45949219

I've got a program that is designed to access a nested list and then print values from a certain column in each sublist. My problem being, I don't know how to edit this to provide more freedom with what values I wish to print out. This is how it looks …

Member Avatar for TrustyTony
0
191
Member Avatar for Ismatus3

Hello , When i call a window from the main one , how to hide this one , after calling the second , and define it as a main window , this is the code of the two windows : def InterfaceDeps(): global interf1 interf1 = Toplevel() interf1.geometry("500x400") interf1.title(' Base …

Member Avatar for Ismatus3
0
137
Member Avatar for in_xx

Hi, I am creating a GUI using wxPython. The first window involves making a box with attributes such as title (Big Font Text, results from a file that i will be reading in, want an arrow that changes position depending on results. So think of it like a progress bar. …

Member Avatar for in_xx
0
158
Member Avatar for clouds_n_things

I'm working on re-writing a 2 decade old python program, but I'm hitting a 'resource busy' error when executing. Does anybody have any ideas? The program is below, and the output is below that. Thanks! from scapy.all import * import optparse print "\n--Example format is -s (controller IP: 172.0.0.0), -S(spoof …

0
120
Member Avatar for TempoGnome

Hi! I've been making this game for fun and have run into a few problems, a friend recommended me to ask you guys for help. I have three problems: 1. The player doesn't recongnize when it's not on a platform and because of this it won't fall down. I've narrowed …

Member Avatar for zjtpjs4
0
349
Member Avatar for christopher.north.520125

Ok, literally my first day of learning Python. I am working my own way through Python Programming for the Absolute Beginner and am encountering my first glitch. I downloaded 3.3.1 and am just starting to play around. When I run my program in the Python Shell it works as it …

Member Avatar for vegaseat
0
114
Member Avatar for jellybean21

Hi Guys, I urgently need help with this python project I'm really stuck with it, finding it very confusing at this stage. If anyone could offer me any help I'd really appreciate it!! Heres the question- Data mining is the process of sorting through large amounts of data and picking …

Member Avatar for TrustyTony
0
231
Member Avatar for dusto

Ok, so my program's input is the number of days someone worked. They earn .02 a day. Each day they work after the first, their pay doubles...(.04, .08, .16....) my code below displays the days worked and the money earned each day. I think i did it the hard way …

Member Avatar for woooee
0
123
Member Avatar for Necrozze

Im doing this game for school and it's supposed to be finished real soon and then of course al the problems start coming up, the game now crashes, sometimes after a few seconds and sometimes directly on start. Don't really know why, a thought is that its doing to much …

Member Avatar for Necrozze
0
387
Member Avatar for laver68xo

I'm trying to take a file that looks like this: >taxon1 ACCGTGGATC CCTATTGATT GGATATTATC >taxon2 TTCATATGTA GGATTTCATA GATGGCCCCC And get it to look like this taxon1 ACCGTGGATCCCTATTGATTGGATATTATC I'm using a python script, so far this is what I have: #!/usr/bin/python import sys if len(sys.argv) < 2: print "usage: finalmyscript.py infile.txt" …

Member Avatar for HiHe
0
201
Member Avatar for ddannieellee
Member Avatar for nouth

this time I have only one textfile and I want to remove all duplicate lines so that each and every single line in it is unique unto itself. with open("textfile") as w: for line in w: W = line with open("textfile") as d: c = 0 for line in d: …

Member Avatar for TrustyTony
0
361
Member Avatar for otengkwaku

class Frame(Widget): def __init__(self, master=None, cnf={}, **kw): what is the meaning of **kw in this function, and what does it represent?

Member Avatar for dashing.adamhughes
0
683
Member Avatar for jon92

hello, before people start saying what have i tried, i have not got a clue where to start if i'm honest with you and was wondering if someone could point me in the right direction. i need to create an application which stores information about people(age,name etc),should also be able …

Member Avatar for jon92
0
216
Member Avatar for lizaron

I have a data set like this data=[{u'a': u'D', u'b': 100.0, u'c': 201L, u'd': datetime.datetime(2007, 12, 29, 0, 0), u'e': datetime.datetime(2008, 1, 1, 6, 27, 41)},{u'a': u'W', u'b': 100.0, u'c': 201L, u'd': datetime.datetime(2007, 12, 29, 0, 0), u'e': datetime.datetime(2008, 2, 4, 6, 27, 41)},{u'a': u'W', u'b': 100.0, u'c': 202L, u'd': …

Member Avatar for zjtpjs4
0
270
Member Avatar for mkweska

Hello all! I was able to make a program that writes random numbers to a file depending on how many the user requests. I now need to write a program that read those numbers...prints them... then at the end adds all the numbers from each line together and adds them. …

Member Avatar for snippsat
0
173
Member Avatar for mkweska

Ok thank you in advance for any help! The problem: Write a program that asks the user for the name of a file. The program should display the contents of the file with each line preceded with a line number followed by a colon. The line numbering should start at …

Member Avatar for snippsat
0
474
Member Avatar for Ismatus3

Hello , I am asking about how to create a cickable Area in a Tkinter windows , or if i can make a label Clickable ? this is how the labels are defined : for z in rows: distligne = 15 + distligne a = (z[0].strip(),z[1].strip(),z[2].strip()) print z[0] print a …

Member Avatar for Ismatus3
0
290
Member Avatar for nouth

textfileA = one word per line textfileB = multiple words per line textfileC = words that I have manually found already if words from textfileA also exist in textfileB, I need to replace the words in textfileB with "error" and write the replaced words from textfileB to new lines in …

Member Avatar for nouth
0
324
Member Avatar for Ismatus3

Hello , I am asking about houw to get a hand form of the mouse when it is over a "Label" , this Label is Clickable and defined like this : def callback(event): print "clicked at", event.x, event.y Interface1() lab1dep = Label(interf1, text="Departement Informatique" ,bg = "blue" ,font=("times",12, "bold"), fg …

Member Avatar for Ismatus3
0
228
Member Avatar for vegaseat

A simple test of PySide's QFileDialog widget and its method getOpenFileNames. Use method getOpenFileName if you want just one file name.

3
3K

The End.