15,175 Topics
| |
Many new computers come with Windows7(64bit) OS. You will be tempted to install something like Python 3.1.1 64bit version. However, many packages like PyQT and PyGame don't offer 64bit versions yet and will not work! | |
I'm having troubles understanding global variables in python. I am trying to keep track of when a function gets called and once it does I want it to be unavailable to the user. However for some reason its not working :\ [CODE] psycStat = False def main(): form = cgi.FieldStorage() … | |
Does anybody know of any libraries or scripts or even code snippets that can generate HTML code from a diff or comparison of the contents of two files? I know of the HtmlDiff class in difflib, but the format it outputs is not the one I want (it puts both … | |
I am new to python . The QList widget contain the list of files in a directory ...I want to select the name of the file and store it in a variablle.....How can i do that?... | |
[CODE]x = self.spinbox37.value() * 40 y = self.spinbox38.value() * 40 printer = str(self.comboBox4.currentText()) print_cmd = 'echo "IN;PU" x "," y | lpr -P %s %s' self.LCDNumber18.display(x) self.LCDNumber19.display(y) #print_cmd = 'echo "IN;PU2100,11300;" | lpr -P %s %s' os.system(print_cmd % (printer, ""))[/CODE] In the above line I'm trying to use the x … | |
I m trying to sending the data over TCP/IP by segmenting it into different sizes ....with 10KB and 100KB the data is tranferring perfectly but when I segment it to 500KB ..it transfer sometime perfectly and sometime it failed by giving error socket.error: [Errno 104] Connection reset by peer | |
Hi there, I am using elementtree to read xml, if xml file contains "-" i am getting error. Is it possible to read without any error? Plz give me code to read xml, if u have. Thanks -Shyami | |
Hi, I have jest started learning Python. I would like to get some help on writing a script that would delete a data of lines only key from array which looks like this : [CODE]['192.168.255.1 00:01:02','[COLOR="Red"]172.14.0.1 00:0f:01','172.14.0.1 01:ff:dd:34'[/COLOR] ,192.168.255.3 00:dd:01:ff[/CODE] [B] I want delet red data only [/B] | |
[CODE]# File: Manager.py from Tkinter import * class Manager: def choose(self,master): tasksf=Frame(master) tasksf.grid(row=1,column=0,padx=3,pady=3) Label(tasksf, text="Task ID:").grid(row=0,column=0,padx=3,pady=3) Label(tasksf, text="Description:").grid(row=1,column=0,padx=3,pady=3) Label(tasksf, text="Start Date:").grid(row=2,column=0,padx=3,pady=3) Label(tasksf, text="Deadline:").grid(row=3,column=0,padx=3,pady=3) self.tid=Entry(tasksf) self.tdesc=Entry(tasksf,width=25) self.tstart=Entry(tasksf) self.tdead=Entry(tasksf) self.tid.grid(row=0,column=1,padx=15,pady=5,sticky=W) self.tdesc.grid(row=1,column=1,padx=15,pady=5,sticky=W) self.tstart.grid(row=2,column=1,padx=15,pady=5,sticky=W) self.tdead.grid(row=3,column=1,padx=15,pady=5,sticky=W) def asdfg(self,master): print "dsgsfd ",v def __init__(self,master): master.title("Manager") menuf=Frame(master) v = IntVar() Radiobutton(menuf, text="Tasks", variable=v,indicatoron=0, value=11,command=self.choose(master)).grid(row=0,column=0,padx=5,pady=5,ipadx=5,ipady=5) Radiobutton(menuf, text="Meeting", variable=v,indicatoron=0, … | |
I was wondering is there a good IDE for python /wxpython/pygame? I was wanting something that would do all 3 very good, for when I do finally jump to a GUI... I was messing around a little with pygame, and I noticed it dose not like the python IDLE... | |
Does anyone have a code example for using the mouse wheel with the Tkinter GUI toolkit handy? | |
I have a series of rules that I want to be able to execute without having to manually edit the code. I'd like to give my rule conditions at the beginning and have the program run it. This way, I can test every single rule combination in a for loop … | |
| How do you make a function repeat itself using a while statement. Here's the function: [CODE] # the function accepts any positive integer parameter and returns the sum of # the squares of its digits. def zap(intNum): total = 0 while intNum != 0: last = intNum % 10 total … |
I used [URL="http://www.parallax.com/Store/Education/KitsandBoards/tabid/182/CategoryID/67/List/0/SortField/0/Level/a/ProductID/313/Default.aspx"]Parallax's Basic Stamp Homework Board[/URL] and an [URL="http://www.radioshack.com/product/index.jsp?productId=2909788"]accelerometer[/URL] to use as a mouse. It works better than I thought it would. [URL="http://sourceforge.net/projects/pyserial/"]PySerial[/URL] is used to grab the debugged values from the stamp. The circuit is compiled of two push buttons, 2 LEDs to tell when a button is … | |
I am new to programming in Python and I am just wondering if I could have some help. I am trying to write a program which creates diary entries for events and I am currently trying to convert the raw_input from the user into a date (yyyy/mm/dd) and time (24hr … | |
Hello. First of all i'm compete newbie in the python. And second i was wondering for some time what does the value 'i" do in python or is it a value at all? I'm sorry if i'm pre-posting a question that have been answered already. This is the example : … | |
can anyone tell me what i did wrong with the decryption part of this code? ive been looking at it for some time now (while working on other related stuff), and i cant seem to find the problem with it. its getting really retarded, on my part [B]and this is … | |
hey guys i was wondering if anyone knew of any tutorials on how to get Python to read and open a XML text file? any help would be much appreciated as i cant seem to find anythign!!! kitty | |
Hi, I have installed Python2.6 and wxPython. I wish to use wxPython together with Matplotlib to generate times series graphs. I am unable to install Matplotlib it always throws the following error "Python 2.6 required, but not found in registry". Please help me | |
Hi Is there a way to hide the python source code from being copied or hacked? I am planning to write and distribute some python code to my team, but I would prefer not to reveal the code. Is it possible in Linux? In windows I wud probably create an … | |
Is there a way to grab values from a basic stamp with python? I just bought a Accelerometer and want to read the values with python. | |
Hi, I try to convert a tuple into binary number but I keep getting the error like"ord() expected string of length 1 but tuple found" Can anyone help me in this? | |
Oh do I need some serious help! lol. I'm working on a phone book in python. For some reason when I select the option, enter....say....the last name, even though it's on the file that my program is reading it tells me that it's not there. Can somebody please look at … | |
I was wondering if anyone helps me in the following case..? There're two prgs A.py and B.py A.py has two classes class x class y and class y has some print statements. I want to import 'class x' to B.py and using the following statement in B.py from A.py import … | |
hi ... im trying to write a function that tells you if the time you called is a correct military time .... heres what i have so far [CODE]def valid_mil_time(mtime): if mtime <= 2359 : print ("true") else: print ("false")[/CODE] but if i was to call it, it looks like … | |
I have been attempting to write a program that takes an input from a button class and a graphics class that creates a gui for a game called three button monte. So far I've been able to get it to sort of work. The point is to have the "game" … | |
Hi all, This is not a post about simply recvering user input with raw_input() and then using eval(), nor for input() use . I remember having used this once, but can't get a hold of the old code so I turn to you for fresh ideas. I am planning to … | |
hey guys, girls, others. i have a pop down widget and one of the options in the pop down screen is "Exit" which means quit. I want to know the code for clicking that "Exit" option and then it Quiting the whole program. here is my code for the pop … | |
I was wondering if anyone knows some siimple code to start me off on making a cascade window?? my current code from my reference book is to confusing for me [CODE] from Tkinter import * class TestMenu: def __init__(self, master): self.master = master self.menubar = Menu(self.master) self.casmenu = Menu(self.menubar) self.casmenu.choices … |
The End.