15,175 Topics

Member Avatar for
Member Avatar for rbyrd

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.

Member Avatar for Gribouillis
0
77
Member Avatar for CodingCabbage

How would I be able to have a button that's command is to return it's text in the button to a variable

Member Avatar for vegaseat
0
988
Member Avatar for fsrgio

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 …

Member Avatar for fsrgio
0
152
Member Avatar for krystosan

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 …

Member Avatar for krystosan
0
2K
Member Avatar for krystosan

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`

Member Avatar for rojomoke
0
472
Member Avatar for Craig_2

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 …

Member Avatar for Craig_2
0
405
Member Avatar for ZielonySBS

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

Member Avatar for Gribouillis
0
19K
Member Avatar for dean.ong.14

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

Member Avatar for vegaseat
0
242
Member Avatar for sandeeep11

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

Member Avatar for vegaseat
0
268
Member Avatar for CodingCabbage

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 …

Member Avatar for vegaseat
0
370
Member Avatar for evaldas.blauzdziunas

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 …

0
106
Member Avatar for CodingCabbage

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 …

Member Avatar for CodingCabbage
1
14K
Member Avatar for Cassidy_2

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 …

Member Avatar for vegaseat
0
270
Member Avatar for dean.ong.14

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

Member Avatar for TrustyTony
0
492
Member Avatar for Panarchy

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 …

Member Avatar for EarthHorse
0
5K
Member Avatar for Prithiv_1

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 …

Member Avatar for Prithiv_1
0
335
Member Avatar for jallen111

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 …

Member Avatar for rrashkin
0
244
Member Avatar for CodingCucumber

How to exit a program but keep the turtle window open? I have tried exit() but it doesn't keep the turtle window open

Member Avatar for Gribouillis
0
301
Member Avatar for dp121307

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 …

0
193
Member Avatar for Lost&Found

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 …

Member Avatar for Gribouillis
0
306
Member Avatar for dean.ong.14

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 …

Member Avatar for dean.ong.14
0
195
Member Avatar for Jamie_2

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

Member Avatar for Jamie_2
0
647
Member Avatar for dean.ong.14

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 …

Member Avatar for sneekula
0
758
Member Avatar for evaldas.blauzdziunas

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', …

Member Avatar for evaldas.blauzdziunas
0
341
Member Avatar for manohar1111

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.

Member Avatar for Gribouillis
0
186
Member Avatar for renierdbruyn

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

0
112
Member Avatar for renierdbruyn

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

0
108
Member Avatar for speen

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

Member Avatar for speen
0
243
Member Avatar for lewashby

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 …

Member Avatar for woooee
0
539
Member Avatar for Gribouillis

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

Member Avatar for Gribouillis
3
2K

The End.