15,181 Topics
| |
| 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 … |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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" … | |
how do you write a code that calls the newline() funtion? | |
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: … | |
class Frame(Widget): def __init__(self, master=None, cnf={}, **kw): what is the meaning of **kw in this function, and what does it represent? | |
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 … | |
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': … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
A simple test of PySide's QFileDialog widget and its method getOpenFileNames. Use method getOpenFileName if you want just one file name. | |
Has anyone installed tkinter 8.6 on windows ? There is a known bug in filedialog.askopenfilenames which properly returns a tuple of file pathnames under linux, but returns a string under windows. Typical windows return string (should be tuple): C:/testdir/AnotherFile.txt {C:/testdir/This is file with spaces.txt} {C:/testdir/z_last-file test.txt} I'm curious if tkinter … | |
Hello Team, I've been having a wierd problem with 2 of my scripts and I now know the problem was in my if statements. code=sys.argv[1] phone=sys.argv[2] message=sys.argv[3] if code == 949: servId='62000001760' elif code == 947: servId='62000001840' else: servId='90928' print servId I run this script as: sudo python printserv.py 949 … | |
Ok, so i have the loop that creates the shape below, but instead of spaces, it has solid # signs. I can't figure out how to just get the design I showed below. Where am I going wrong in my code? NUM_STEPS = 6 def main(): for r in range(NUM_STEPS): … | |
How could I pass value entered by user, using tkinter’s Entry to another object? I manage to print it, but couldn’t sent it further… Here are parts of the code: def novo_vreme(): vreme1 = Vreme() root1 = Toplevel(root) root1.title("Vreme") naziv = "Vreme" L1 = Label(root1, text="Zadržavanje: ") L1.place(x=10, y=30) E1 … | |
Hi, Actually I am developing an application in python in which I want a feature by which the application can detect whether any name is male or female name. I did Google search on this, but could not find any algorithm/code by which I can do it. So finally I … | |
hi there! is it possible to writte a python program that transfer a sentence in the form of SVO (Subject Verb Object) into the form of SOV (Subject Object Verb)? Example: input: John eat bread output:John bread eat the sentence may be a complex sentence. | |
I am trying to find the max flow of a flow network and the final pattern of the network. But the program is giving me 1 answer and when i try and do it on paper i get a different answer, not sure if one is right or both is … | |
my question is, how do i use python to check a web site to see if it has an rss feed link and return that link | |
**I am Proggraming in python however i have come to a slight glich which i cannot solve! The issue is that when it prints out in a text files it only prints one line of the whole ouput! Otherwise it works! Please i need help to make this work! ** … |
The End.