15,190 Topics

Member Avatar for
Member Avatar for leppapuu

Hi! I have a program with two QSpinBoxes with integers in them. When user clicks one spinbox it should affect to the other one. And vice versa. I can't use valueChanged() signal because it causes an endless loop that won't stop until the maximum values of the boxes have been …

Member Avatar for leaffan
0
1K
Member Avatar for Kiek_L

Hi all, I'm very new to Python and I am already very proud what I've created ;) Unfortunately it doesn't work so I need your help. I've created a xml-file at C:\temp\ I want to upload the file to a ftp-server, but when I run my code I continiously receive …

Member Avatar for Kiek_L
0
128
Member Avatar for pythonNerd159

hey all. i need some help with my calculator and i was wondering if anyone knew how to make it so if you click on a button it would pop up the value of that button in the entry screen. [CODE]## -*- coding: utf-8 -*- ## SDD, Major Project, Extreme …

Member Avatar for Alq Veers
-1
290
Member Avatar for SoulMazer

Hi, so I've been programming with Python (2.x) for a while now, and I was wondering about what people thought of 3.x. From just a few quick searches, some people recommend that people get used to it quickly as it is the future, and others say to just stay with …

Member Avatar for SoulMazer
0
156
Member Avatar for pythonNerd159

Does anyone know the code to click a button widget and get the value of that button to show up on an entry screen. I'll show you my code. [CODE]class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.createEdit() self.createView() self.createHelp() self.createQuit() self.createOnOff() self.createDelete() self.createClear() self.createSeven() self.createEight() self.createNine() self.createDivide() self.createFour() self.createFive() …

Member Avatar for pythonNerd159
0
126
Member Avatar for dilbert_here00

Hello Everyone!! Is there a way to find the window handles pertaining ONLY to the current top level window & not its child windows. Using win32gui i am able to get the handles but it returns the handles of all the top level as well as its child windows. Any …

0
64
Member Avatar for emma.parsons

I am creating a program which takes in fields for events, saves them to file and then loads & displays them on separate lines. The 'date' field in my program should be in the format yyyy/mm/dd when it is entered. I have managed to implement this however my program still …

Member Avatar for snippsat
0
487
Member Avatar for larrywjr

Hi, I am new to Python. I have written a routine and am trying to compile the code for distribution. I went to [URL="http://sourceforge.net/projects/py2exe/files/"]http://sourceforge.net/projects/py2exe/files/[/URL] and downloaded the file py2exe-0.6.9.win32-py2.6.exe. I am running Python 2.6 on a Win-XP Pro OS. I assume this file is a self-extracting exe. The trouble is …

Member Avatar for jcao219
0
241
Member Avatar for Mathhax0r

Is it possible to have a function run at the beginning of every function of a class without explicitly writing it? I'm going to have a class with 20 or so methods, and though I can just copy and paste, I was wondering if there was an easier way to …

Member Avatar for jcao219
0
11K
Member Avatar for sanchow

Hello, I have a huge file with the following kind of lines: A,B,C 1,2,3 D,E 4,5 What is efficient way to split and get the following output using python? A 1 B 1 C 1 A 2 B 2 C 2 A 3 B 3 C 3 D 4 D …

Member Avatar for sanchow
0
116
Member Avatar for soUPERMan

Im getting errors with this, please advice me on what to do: [CODE]def displayHappy(): numLimit = input("Enter a positive integer: ") countHappy = 0 countUnhappy = 0 liHappy = [] for num in range(1, numLimit + 1): inNum = num while inNum != 1 and inNum != 4: inNum = …

Member Avatar for soUPERMan
0
165
Member Avatar for Mercian

Hello all, I am currently teaching myself Python 3 and came across a project at work that would be ideal for this. The department in which I work is an IT support desk with a number of us taking calls and providing support to end-users. There is a field in …

0
85
Member Avatar for sarfrazashfaq

Hi there I am translating PERL code into python and i am new on both language.I have one question if we have hash key reference in PERL like this way $a->{b} how we can traslate it into PYTHON? and if we have this code $a->{$b} , how we translate it …

Member Avatar for sarfrazashfaq
0
177
Member Avatar for eagles1

I have an excel spreadsheet that has 2 used columns. Using Python I have to read the data in those to columns. So far I have a code that lists the item in column A and B on Python GUI. Once that is done I have to write code so …

Member Avatar for baki100
0
703
Member Avatar for Tech B

I posted a snippet about using a microcontroller as a mouse, and it works great, but it moves the mouse as a stepper motion. How would I go about making it velocity driven? Like when I tilt the accelerometer further, the faster the mouse moves. I've seen it on youtube, …

Member Avatar for Tech B
0
123
Member Avatar for bumsfeld

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!

Member Avatar for Alq Veers
1
484
Member Avatar for meisterluv

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

Member Avatar for slate
0
207
Member Avatar for scru

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 …

Member Avatar for scru
0
111
Member Avatar for jgehlot09

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

Member Avatar for scru
0
110
Member Avatar for garyinspringhil

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

Member Avatar for garyinspringhil
0
129
Member Avatar for jgehlot09

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

Member Avatar for Tech B
0
107
Member Avatar for shyami

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

0
62
Member Avatar for ab_too

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]

Member Avatar for ab_too
0
714
Member Avatar for virtualsaum

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

Member Avatar for SgtMe
0
1K
Member Avatar for calccrypto
Member Avatar for Clueless86

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

Member Avatar for Stefano Mtangoo
0
319
Member Avatar for HiHe

Does anyone have a code example for using the mouse wheel with the Tkinter GUI toolkit handy?

Member Avatar for vegaseat
0
117
Member Avatar for rasizzle

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 …

Member Avatar for willygstyle
0
279
Member Avatar for soUPERMan

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 …

Member Avatar for willygstyle
0
1K
Member Avatar for Tech B

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 …

0
263

The End.