14,946 Topics

Member Avatar for
Member Avatar for Chupakun

Hi there, I have a simple piece of software written up that I'm running off the terminal's command line interface. Very recently, it was asked of me to create a GUI for it. So I basically made one to reflect how I would use the software but I actually haven't …

Member Avatar for Chupakun
0
1K
Member Avatar for zjjca

Hi all, I just want to know if it is possible to add a background image in text widget Thanks ps: I got python version 2.4.4

0
25
Member Avatar for evaristegalois

Hello I am new to python. I am looking for resources with good examples for learning python. I need python for data processing. thanks

Member Avatar for SgtMe
0
35
Member Avatar for Pinchanzee

Hey guys, new here. Decided to start learning Python and this community looks like a perfect place to learn with the help of others. A bit of a forum-related problem at the moment though, when the browser is loading "ad.amgdgt.com" it takes about 4 minutes to load each time I …

Member Avatar for Pinchanzee
0
93
Member Avatar for G_S

Hi people, the title says it all: The user manual of my program is an HTML document, and I want the OS's default browser to open it directly once the user clics on help. The function that the help menu entry invokes is this: [CODE=python]os.popen("/usr/local/firefox/firefox ./html/index.html")[/CODE] Now this only works …

Member Avatar for G_S
0
4K
Member Avatar for G_S

Hello, I've been looking for this here but haven't been able to find an answer that fits my case: I have a tkinter GUI consisting in a button and a Text (a textbox). You write the whole text in the textbox, then press the button and it uses the get() …

Member Avatar for G_S
0
102
Member Avatar for ic_m

Need help to code a program which: - validate user input, accept values that a user has entered (ex, a, b, c, d, e) - any other values other than these are to be treated invalid with a message and block it from processing. - Prompt the user to enter …

Member Avatar for baki100
0
182
Member Avatar for cyon

I'm trying to import a module that checks an .ini config file for correct syntax (via regex patterns). If the syntax is wrong, I want the main code to crash (and hopefully log the error, too). I need some guidance on how I should do this. My current approach doesn't …

Member Avatar for TrustyTony
0
368
Member Avatar for jinjonBoo

Hi there everyone. I'm new to Python, and i'm programming a game application, using pyOpenGL. The thing is, the program crashes and exits when i push a key (but i don't want (at least for now) help for that), but i wish i could see the error that appears on …

Member Avatar for Tech B
0
340
Member Avatar for G_S

The question is simple: I have two scrolled text widgets (I'm using tkinter and python 3.x), and I want to synchronize them, that is I want both scrollbars to move at the same time when the user moves the mouse wheel. Both widgets are suppossed to contain the same text, …

Member Avatar for SoulMazer
0
354
Member Avatar for radioflyer1

I am attempting to design and implement a horse race game, but I keep getting lost in the while loops and if statement in the horse selection and wager prompt. Would someone please help me get passed this problem? Thanks. [CODE]print ("It's a beautiful day out here folks. A fine …

Member Avatar for radioflyer1
0
194
Member Avatar for jamesl22

Hi, I'm getting some errors when compiling Python 2.6.5 on MInGW with gcc 4.5.0. I'm getting these errors: [icode]gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototyp es -I. -IInclude -I../Include -DPy_BUILD_CORE -o Python/thread.o ../Pyth on/thread.c In file included from ../Python/thread.c:121:0: ../Python/thread_pthread.h: In function 'PyThread_start_new_thread': ../Python/thread_pthread.h:200:2: error: aggregate value used …

Member Avatar for jcao219
0
180
Member Avatar for G_S

Hi, I have a very simple question: first of all, my code: [CODE=python] import os def test(): x = "Linux" y = "Windows" if os.name == "posix": print(x) if os.name == "nt": print(y) else: print("there is a problem") [/CODE] Run that code on Linux (don't know about windows) and it'll …

Member Avatar for G_S
0
144
Member Avatar for G_S

Hi, I have a minor quesion today: can somebody tell me how to change basic style options for buttons using ttk. I'd like my buttons and entry fields to have rounded corners. I know this is possible but documentation on ttk (for python) seems to be inexistent on the Web. …

Member Avatar for G_S
0
9K
Member Avatar for radioflyer1

I can't determine how to randomly list horses as they cross various parts of the track. Will someone please point me in the write direction? [CODE]if bet > 1: #starts the race, if bet when bet is placed print (""" Here come the horses now, folks. They're being loaded into …

Member Avatar for griswolf
0
150
Member Avatar for SoulMazer

Hi, I've tried searching around for other problems similar to mine, and I was unable to find any. I seem to not be able to "color" text in a TextCtrl widget on Windows, but I can on Linux. I have a little screenshot and some code to show this: [URL="http://i189.photobucket.com/albums/z266/Capn_Soul/WinLinuxDifference.jpg"]Screenshot[/URL] …

Member Avatar for SoulMazer
0
806
Member Avatar for SoulMazer

Hi, I'm trying to color some text with wxPython but I am having some trouble. I am using the SetStyle method of the TextCtrl widget. My problem is that the coloring works perfectly on Linux but does not under Windows. My script basically gives a vocabulary test, and if you …

Member Avatar for vegaseat
0
144
Member Avatar for lewashby

In the following program I have a few questions. [B]results.txt[/B] Johnny 8.65 Juan 9.12 Joseph 8.45 Stacey 7.81 Aideen 8.05 Zack 7.21 Aaron 8.31 [CODE]scores = {} result_f = open("results.txt") for line in result_f: (name, score) = line.split() scores[score] = name result_f.close() print("The toop scores were:") for each_score in sorted(scores.keys(), …

Member Avatar for vegaseat
0
94
Member Avatar for lewashby

[CODE]line = "101;johnny 'wave-boy' Jones;USA;8.32;Fish;21" s = {} (s['id'], s['name'], s['country'], s['average'], s['board'], s['age']) = line.split(";") # above, why is "s" and the end of the key list surrounded by parenthesis? print("ID: " + s['id']) print("Name: " + s['name']) print("Country " + s['country']) print("Average " + s['average']) print("Board type: " …

Member Avatar for snippsat
0
154
Member Avatar for drfrev

hello, I'm rather new to python, and I'm trying to make a simple macro program, i have the mouse setup but duplicating the keyboard actions is a giving me a bit of trouble. the website I'm using isn't for python but i found it for a reference: [url]http://www.codeproject.com/KB/system/keyboard.aspx[/url] I found …

Member Avatar for jcao219
0
366
Member Avatar for pyprog

Let's say I want to create two classes Owner and Pet [CODE]class Owner(object): def __init__(first_name, last_name, address, phone): self.first_name = first_name self.last_name = last_name self.address = address self.phone = phone class Pet(object): def __init__(name, owner) self.name = name self.owner = Owner.__init__(first_name, last_name, address, phone)[/CODE] Did I pass the class Owner …

Member Avatar for pyprog
0
104
Member Avatar for hondros

Here is my issue: I have a program, that downloads roms off the internet. Everything works fine, but I would like to show an indefinite progress bar while it is downloading. I have that with the following code: [code] # -*- coding: utf-8 -*- # Form implementation generated from reading …

Member Avatar for woooee
0
521
Member Avatar for miac09

Hi, I have the following files and can match but, am having trouble with getting the output to write correctly to a data matrix format that I need and would appreciate any help with getting the code right. File 1 has a list of numbers and Files 2, 3 and …

Member Avatar for woooee
0
180
Member Avatar for missthom

Hi every one, I am using some tools for reverse engineering for Python code. I want to Reversing Sequence diagram for my Python code but I can't get Sequence diagrams, only get class diagram. Can you help me? I am using Visual paradigm 8 and Enterprise Architect. If you used …

0
25
Member Avatar for WildBamaBoy

This is a section of a program I made that keeps track of some money I'm saving. :cool: When I enter how much I want to add it saves what I enter to a file and updates the current amount I have saved, also in the file. When I enter …

Member Avatar for WildBamaBoy
0
156
Member Avatar for AlexMessi10

Hello everyone, I am making my thesis in the university using Python as programming language and Django as framework, I have doubts about choose data from de models class, for example I have the class Tribunal, and I am able to generate an Excel with all the objects of that …

0
21
Member Avatar for TrustyTony

I have been thinking about order operations and generalized * in Python recently. I want to share some of my thinking here, even the topic is quite theoretical, considering the beauty and orthogonality of the language. [B]Point one[/B] You can do comparison with tuples of numbers in Python [CODE]>>> (0,0)<(1,1)<(2,2) …

Member Avatar for TrustyTony
0
333
Member Avatar for Tommymac501

I am trying to sort a file by a quick sort comparison. The problem lies in parsing the string and comparing fields. I use the following to break up a line: records = [line.split(spl) for line in file(filename)] and the following to sort: records.sort( lambda a,b: cmp(a[fieldNo],b[fieldNo]) ) This works …

Member Avatar for TrustyTony
0
93
Member Avatar for ryan461

I'm testing to get my python script to still run if the smtp server it uses went down. I have a local mail server im testing this with. The issue is when testing it, i get a large spew of text. It checks all its libraries and such, untill its …

Member Avatar for ryan461
0
373
Member Avatar for MoosePaste

I am beginning to write a tkinter program that will generate a DnD 3.5 Character Sheet. I haven't gotten very far. I'm using Python 3, and for some reason the sticky option of the .grid() method isn't working. When I run the code below, I get an error that says: …

Member Avatar for woooee
0
10K

The End.