15,181 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
| 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, … |
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): … | |
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 … | |
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 … | |
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): … | |
How to store a set of cooordinates , let us say 300 to array | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Just curious how you got started. For me it was science class that used Python as the main tool. | |
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 … |
The End.