15,175 Topics
| |
| I installed wxPython2.8-osx-unicode-py2.7 from the wxpython website using their .dmg installer file. When I used the included uninstaller to remove wxPython it would not accept my password. I think this may be because my password contains some non-alphanumeric characters. Can anyone help? I'm running OSX 10.6.8. |
How would I be able to have a button that's command is to return it's text in the button to a variable | |
hello, I'm trying to resolve an issue that is requested to create a game with the same kind of Flow Free. Where I have to create a NxN matrix, which must be greater than or equal to 2 and less than or equal to 7. The size is selected by … | |
How do I display images in QListView of size of standard thumbnail size like 250 x 200 , and file nametext should wrap to next line , right now the images displayed are very small and are not positioned under each other in proper row column order. import sys import … | |
I am trying yo create symbolic link on my mac, but when i try to run i get error saying original item searchMethod cannot be found `$ ln -s '/usr/bin/env python ~/Development/python/searchMethod/python/searchMethod.py' searchMethod` | |
Hey all, I have the following code that is working fine; basically it finds all files on my desktop and then prints the specific ones that I am looking of. I save all files to my desktop and the files contain the clients name so I figure once a week … | |
I have a company scanner but very often people forget to remove scanned (confidencial documents) I want to create a script which will once day check a "/home/scanner" folder and if there are any files it moves them to my /home/Administrator folder. I dont really dont know how to start. … | |
how can i produce my buttons using while loop and a list if stirng # python 2.x #from Tkinter import * #from tkFont import Font # python 3.x from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) … | |
hello sir, i have a xml file like <book> <title>abc</title> ........ <details> <name>abc</name> ..... <author>shakespere</author> <year>1980</year> </details> <details> <name>xyz</name> ..... <author>anand</author> <year>1995</year> </details> </book> i need to print the values of author,year if details.name == title here is my code DomTree = xml.dom.minidom.parse(file) book = DomTree.documentElement for t in domain.getElementsByTagName("title"): … | |
Why is this not working, no errors? photo exists in correct position... gui doesnt alwyas show up, image doesnt. Using python 3 from tkinter import * from random import * import time mainGUI = Tk() width2= 319 height2 = 240 widthOfScreen = mainGUI.winfo_screenwidth() #Get the width of the screen heightOfScreen … | |
hello there im doing this homework assignment and we are making 'facebook' like system now... to sum up, when i press a certain link next to that link has to be printed - liked or sth... the problem is i dont know how to detect when i press the link … | |
I wish to create a loop which adds images across a screen with random positions: photo1 = PhotoImage(file=address) #Assign image to PhotoImage XValue = randint(0,widthOfScreen-width2) #width2 = image width YValue = randint(0,heightOfScreen-height2) #width2 = image height Label(mainGUI, background = "white", image = photo1, borderwidth = 0).place(x=XValue, y = YValue) the … | |
def main(): p =input("Enter your sentence: ") words = p.split() wordCount = len(words) print ("The word count is:", wordCount) main() I get the read out: Enter your sentence: Hello world Traceback (most recent call last): File "C:/Python27/idk.py", line 11, in <module> main() File "C:/Python27/idk.py", line 3, in main p =input("Enter … | |
how do i backspace from last number and also clear th? last equation and add a quit button????????? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) def frame(frame, side=LEFT, bg="black"): f = Frame(frame, background=bg, padx=5, pady=5) … | |
Please help me, I want to make a quiz in python (And a game, if I get the time), can someone help me? I saw the topic projects for beginners, but it was a .dat file (which I opened using notepad 2), I don't know how to use a dat … | |
I have a code which add extra memcache instance at run time, but this makes my keys lost. I know there are several libraries available like consistent_hash, hash_ring but I am unable to use them in my code. I know there is ketama available but couldn't find python code sample … | |
I am trying to work on this problem but am confused with how to approach it. I am trying to create a program in python that analyzes a text file and counts how many time various words are used within it. I understand what I need to do but am … | |
How to exit a program but keep the turtle window open? I have tried exit() but it doesn't keep the turtle window open | |
I have to write the an AVLTree in python, followed all the instructions and I feel I have it just right, only problem is I can't figure out how to display my tree. I have to use the test given below, as well as the 2 methods below in the … | |
Hi, I'm looking for a little help. I'm trying to create a script with the ability to take home page as an argument, printing a message to say something about the site and then validate whether or not this is a valid URL. I'm relatively new to Python and haven't … | |
I know this is stupid but how do i add a quit button? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) def frame(frame, side=LEFT, bg="black"): f = Frame(frame, background=bg, padx=5, pady=5) f.pack(side=side, expand=YES, fill=BOTH) return f … | |
from graphics import * def patchdrawer(): win = GraphWin("Patch drawer", 100, 100) for x in range(0, 5): for y in range(1, 6): p1 = Point(x * 20, (y - 1) * 20) p2 = Point((x + 1) * 20, y * 20) rectangle = Rectangle(p1, p2) if (x + y) … | |
raceback (most recent call last): File "C:/Python32/n", line 1, in <module> from Tkinter import * # button text list cmdlst = ['7', '8', '9', '+', '%', '4', '5', '6', '-', '**', '1', '2', '3', '*', '//', '.', '0', 'CL', '/', '='] class MyButton(Button): backref = None def Click(self): # back … | |
Hello there i was typing a python code and got this error saying: 26 27 for eil in open("msgs.txt"): # nuskaito ir parodo visas zinutes => 28 date, person , msg = eil.split("#") 29 print(date+person+"<b>"+msg+"</b><br> <hr>") 30 date = '', person = '', msg = ' ', eil = '----\n', … | |
hello sir, I have doubt that how to redirect the ouput text of a command (while working on unix cmd prompt) to a file using python.please help me with sample code. | |
I am new to Pyramid, Python, Jinja2 , jQuery AJAX, MongoDB and mongoengine. I was told to delvelop a system using these technologies. I am at a point where I do not know how to go futher. I have searched the web for answers, but found nothing that is helpful. … | |
I am new to Pyramid, Python, Jinja2 , jQuery AJAX, MongoDB and mongoengine. I was told to delvelop a system using these technologies. I am at a point where I do not know how to go futher. I have searched the web for answers, but found nothing that is helpful. … | |
Hello there? I am extremely new to python, and am trying to attend the lectures about hashing. Please cd you ceck the following code and error, and just tell me how to make it work. Please I am not that advanced user of python. I am very basic. def create(smallest, … | |
Is there a function that I can use to find out if a file is a block device? And another for a character device. I'm trying to create a funtion that will build a string the is exactly like the result you get from running ls -l for a slightly … | |
This snippet prints a python list of strings in multicolumn format (similarly to linux `ls` command). It uses module prettytable, available in [pypi](https://pypi.python.org/pypi/PrettyTable). |
The End.