15,181 Topics

Member Avatar for
Member Avatar for gleam.uahmed

Hi , I have 2 images and one on button and another one as a label i want that when label image comes on button so it show the transparent part of image , i have made this code but in this the transparent part is hide . Here is …

Member Avatar for gleam.uahmed
0
224
Member Avatar for ub007

Hi, I got this code snippet with the following usage: [CODE] def main(): # sample usage manager = LoadManager() manager.msg = ('www.example.com', '/') manager.start(threads=5, interval=2, rampup=2) if __name__ == '__main__': main()[/CODE] Works fine,but i would like to supply the following arguments through command line: msg threads interval rampup Plz could …

Member Avatar for richieking
0
226
Member Avatar for shiningstar100

hello can someone please advise as to how can i insert tab after every word while inputting it in a file? i have to read all the lines in a file. the file has tables. there are random spaces between the words. Output is to put this table to another …

Member Avatar for richieking
0
77
Member Avatar for raschko

Issue involves: python 2.7 pil pyopengl pyside In the midst of developing a small drawing test, I've run into a situation involving line computations. Currently the drawing test works, but only enables singular point drawing at the cursor position. [IMG]http://i246.photobucket.com/albums/gg94/Braschko/Forum%20Posts/Screenshot-1.png[/IMG] I've seen python interpretations of [URL="http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm"]Bresenham's line algorithm[/URL], which works …

Member Avatar for raschko
0
160
Member Avatar for jordan0420

Im building a database to hold files i am using anydbm and what i would like is something that does this: [CODE= Python] import Tkinter import anydbm import tkFileDialog file = tkFileDialog.askopenfile(parent=None,mode='rb',title='Choose a file') print file print str(file) db = anydbm.open("database", "c") # db["1"] = str(file) for file in files …

Member Avatar for jordan0420
0
156
Member Avatar for Archenemie

I have the code below and the exact same code works when its put outside the function but does not when its called as a function, and it seems the function is being called correctly because the print line works[CODE]import wx class DestroyButton(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, …

Member Avatar for Archenemie
0
198
Member Avatar for Geemon

I am sorry, I had a thread similar to this, but I have encountered a different bug. [CODE=python]def rm_b(acts): print("DINING ROOM") print(descriptions.dining) acts={"north":no_exit, "east":rm_c, "south":rm_e, "west":rm_a, "sandwich":'inv_add(sandwich, acts)'} prompt(acts)[/CODE] The "sandwich":'inv_add(sandwich, acts)' will not work. Same for all of the items I wish to allow the player to pick up. …

Member Avatar for griswolf
0
112
Member Avatar for Archenemie

I would like to destroy the second button by clicking the first I have also tried "return but2.Destroy() but everything returns an error message. Can anyone help? [CODE]import wx class DestroyButton(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, "title") panel = wx.Panel(self) but1 = wx.Button(panel, label = "click me") but2 …

Member Avatar for Archenemie
0
124
Member Avatar for MacUsers

Hi there, I was wondering if anyone can give some advise/tips on this. My goal is to figure out the broadcast address. The way I think I should do is: [LIST] [*]get/detect the IP address and the subnet mask or CIDR [*]convert the mask to binary form [*]count the number …

Member Avatar for MacUsers
0
1K
Member Avatar for D3BuG

Hey guys, So me and my friend are starting up a simple Text-Based-Post-Apocalyptic-Role-Playing-Game. Both of us have had 2 or so months of experience, we are no experts. So, I will appreciate any tips. I have been lurking these forums for a little while now, and decieded this is the …

Member Avatar for D3BuG
0
164
Member Avatar for dos_killer

im new to cgi scripting...im using python...and ubuntu... i changed apache2's default file to set the cgi directory to /var/www/cgi-bin...and there i i uploaded my simple cgi file...the cgi file runs perfectly fine when run through terminal...which means there is no error...but when i try to access it through a …

Member Avatar for richieking
0
276
Member Avatar for Dane2259

Could someone explain to me why this code will not print the 10th prime number? It says there is a syntax error on the fourth line (the x = range(3, math.sqrt(test_num)). It also says there is a syntax error on the sixth line (while prime_count < 10:). [code]import math test_num …

Member Avatar for richieking
0
120
Member Avatar for CharlieNewey

Hi there, I have a set of coordinates (data points) that I want to use Python3 to fit an exponential decay curve to. I've used this resource [URL="http://mathworld.wolfram.com/LeastSquaresFittingExponential.html"]here[/URL] as a base for building my program. The problem is, no matter what the x-value I put in is, the y-value ALWAYS …

Member Avatar for CharlieNewey
0
685
Member Avatar for dythanor

The title explains most of it. at the point in the code where this frame gets created it immediately opens, closes, then segfaults, and the whole program dies. the program worked find before this frame was added and the only code using this frame from outside of it is the …

Member Avatar for dythanor
0
470
Member Avatar for BoomYeyE

Hi so I made a program that uses 'Pygame', 'WxPython', and also I required a module from PyGame website which helps make a menu easier in pygame. I am knew to Py2exe and heard its the best one out there to make your .EXE file. I heard there are problems …

Member Avatar for BoomYeyE
0
72
Member Avatar for wirth.jason

I learned Python and understand the mechanics to write scripts with functions and classes, etc. Most of my scripts run via the interactive prompt but I've done a little GUI programming to create some menus and buttons. I don't understand how larger programs are put together on a high level. …

Member Avatar for sneaker
0
106
Member Avatar for LoveMyPadres

Hi I'm using pysnmp 4.1.1.4a (yes, I know there's a newer version but it has the same behavior) and py2exe. When I execute a pysnmp oneliner, like this: [CODE] errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().nextCmd( cmdgen.CommunityData('my-agent', 'public', 0), cmdgen.UdpTransportTarget((self.IPaddress, self.Port)), self.keydict[ key ][0] [/CODE] I get this output: [CODE] File …

Member Avatar for LoveMyPadres
0
348
Member Avatar for ampoliros

I am using a Pwm TextDialog (which inherits from ScrolledText which inherits from Text). It is being used as a real time status pop-up window. A good deal of the status messages use a carriage return ('\r') at the end of the message as a way of conserving vertical space, …

Member Avatar for ampoliros
0
2K
Member Avatar for Geemon

Hi I am new to the forums, and somewhat new to python. I'm trying to make a Text Based Adventure game. I don't have an error, but a bug. This is the code: [code]import descriptions inventory = [] gold = 0 acts = {"north":"hi"} def start(acts): print(descriptions.start) rm_a(acts) def rm_a(acts): …

Member Avatar for griswolf
0
206
Member Avatar for Cesiumlifeboat

Hello experienced python programmers! I come here in humble request of your guidance on my latest python endeavor. I'm writing my first program to make heavy use of lists within lists, and i've run into a rather unexpected problem. just for practice, I'm writing a program that simulates a simple …

Member Avatar for woooee
0
124
Member Avatar for Fluffybunny

Hi, I want to launch a java app from within python, and read back the test the java app writes in a command window. This is using python on windows. So, I have a basic java app which brings up a cmd.exe widow, and prints "hello world", waits for 5 …

Member Avatar for Gribouillis
0
109
Member Avatar for triksterx

I am using the following code to create a set of radiobuttons. The radiobuttons are created fine, but when it comes time to delete them, the buttons and text persist on screen. How do I go about ensuring that the radiobuttons get deleted? [code] import Tkinter class App(): def __init__(self): …

Member Avatar for TrustyTony
0
2K
Member Avatar for ramesh125
Member Avatar for quinnifir

ok. i am making this program called Human_Data to store peoples info on your computer. bwahaha. i need help with opening and reading peoples info, stored in a profile class. i am also confused with instances of classes. here is the code. [CODE]#----------------------------------| #Copyright Muffinware 2011 | #Human Data and …

Member Avatar for TrustyTony
0
120
Member Avatar for FL Botanist

Hi! I'm in the Environmental Horticulture department at the University of Florida and I'm trying to build an online, multiple-entry key to help students identify the plant families. I have permission to modify and build on a similar script that was written at Colby College, but the computer people there …

0
117
Member Avatar for sohel807

I can print whatever I want (definitely texts) by using following "Printer" class. However, it prints only in Black and White mode regardless original color of texts. Is there any way I can print color texts? [ICODE]#License: MIT import wx from wx import Printout, PrintData, PAPER_LETTER, PrintDialogData from wx import …

0
63
Member Avatar for runge_kutta

Hello, I am new to the programming game and have a question for you seasoned veterans: I have a data collection device whose API is c++ based. When I want to write a program whose first step is to initialize the system, I write "InitializeSystem(); " In a C++ IDE …

Member Avatar for runge_kutta
0
2K
Member Avatar for Archenemie

Im trying to call the two functions from the numbers class but it returns an error even tho i believe i have coded it correctly. i have played with the code but cant seem to get it working. [CODE] class main(): num1 = input("please enter a number") num2 = input("please …

Member Avatar for Archenemie
0
178
Member Avatar for bumsfeld

Just curious how you got started. For me it was science class that used Python as the main tool.

Member Avatar for vegaseat
1
126
Member Avatar for hogdogjr

I am working on a python application where most of the GUI is written in TKinter, but I need a data grid control like Excel. I know tktreectrl is supposed to do this but I am unable to get the latest version to compile. What I want to know is …

Member Avatar for richieking
0
216

The End.