15,181 Topics
| |
I'm working on learning GUI development, I'm attempting to utilize the GUI for a user to search the dictionary: my code so far is[CODE]from tkinter import * class Interface(Frame): def __init__(self, master): super(Interface, self).__init__(master) self.grid() self.create_widget() def create_widget(self): self.pwrd= Label(self, text='Address Book') self.pwrd.grid(row=0, column=2) self.searchlbl= Label(self, text='Enter Search Query:') self.searchlbl.grid(row=2, … | |
Hello, i'm new to wxpython, i need Your help. So i need to print out the text from let's say file from my computer to a screen that user can see, how should i do it? Thanks for any help! | |
I want to do x=[1,2,3,1,1,2,] y=[1,2] x-y=[3] but when I write z=[set(x)-set(y)] if gave: z=[1,1,2,3] how I can do it? | |
is it possible to use the Fkeys, i.e. F1, F2,...F12, as input in any way? | |
In one of the books I'm using to study Python I keep seeing things like: [CODE] class Application(Frame): super(Application, self).__init__(master): self.grid() self.bttn_clicks=0 self.create_widget"""which is another function in the class"""[/CODE] Why is the super necessary for the class if the class it's calling is itself? | |
Dear Folks, When I iterate within the very bottom function under the comment "#Update conserved quantities" in this module using for loop (see below), I have noticed that the block of statements below it is not iterated, [CODE] """ """ from numpy import * from math import * from scitools.std … | |
Hey everyone, I've tried extensively to find a thread like this already, so I hope it's not a repose. Basically, I have a program with a nice GUI (Tkinter) which has a frame which takes in matplotlib figures. I am able to connect the plots to the Tkinter frame this … | |
I have a very strange problem. I have a python script that uses multi-threading. It works fine, and does exactly what it should. I use several modules that interact with other files. All file handles are closed as soon as they are on longer needed. When I run this script … | |
So I've decided to make some simple animations with python and I came to the issue of getting parts to rotate and move together. I decided to put parts together on a smaller canvas (canvas for the leg placed on the main canvas) but I can't get the canvas to … | |
Hey guys, Just as the title says, I want to implement using an excel spreadsheet as an argument for a python script. I already have the layout of the spreadsheet, but I want to be able to assign the variables in my python script from specific cells of the spreadsheet. … | |
Hello All, Its been a week since I started learning Python, and its been wonderful. This is the problem I am trying to solve. There are 20 text files (In1.txt, In2.txt,....,In20.txt) in a folder. Each text file has 150000 rows. Each of the 150000 rows has a vector of float … | |
Honestly, I am not quite sure how to explain this... I have a 24 Line GUI wxPython Class that has no Events and Two Functions... These Functions are: Clear the Display and Add a Line from the Bottom. I want to use this Frame from beginning to end of the … | |
[CODE]import os import urllib from datetime import datetime import workerpool class DownloadJob(workerpool.Job): def __init__(self, fa): self.fa = fa def run(self): f = open(self.fa + '.txt','w') f.write('Example Note.......') f.close() pool = workerpool.WorkerPool(size=5) def workfile(): range1 = 51 range2 = 102 fam1 = 555 fam2 = 833 ranges = range2 -range1 fams … | |
i have a folder that contains csv excel files that have numbers in the first column labeled 'x', second column label'y', and third column labeled'z'. i was trying to take all of the numbers in the x and calculate the averages and std, take all the numbers in the y … | |
Here's My Problem: I have three Python Modules (using 2.7.2) TC_Config.py merely holds Common Variables used by both of the other two Modules. pyTC.py is supposed to be a Test and Flow Control (Master) Module that once standardized will not be changed (much). ptf.py is a module that will be … | |
Hey everyone, I'm making a data analysis suite in python, and want to construct a custom event handler which will reset the axis based on the data in the current subplot. To do so, I need the event handler to know what data is currently in the subplot. The matplotlib … | |
HELP MR. WIZARD!! I have been using PySNMP for a while, talking to devices and getting values very successfully. I now need to set a TRAP; this is where you tell the device to notify me when something happens, and then you wait for it to happen. I'm guessing that … | |
Hi, I am new in a python2.7. Please help how efficiently we parse and store the fields in dictionary for later retrieval. my log file example #Version: 1.0 #Fields: date time c-ip s-dns x-proto s-parser cs-resource s-resource sc-response-code sc-response s-candidate-ips x-preferred-location x-location cs-user-agent s-ip c-port #Software: vx-logfeed 1.3 #Start-Date: 2011-04-20 … | |
Hi everyone, I'm new here so I hope I've put this in the right place. I'm looking for a little help with a python program I've written. I'm trying to create a timeline from SQLite databases. I take information from a calls database, then an sms database, write those to … | |
I'm hoping I'm not the first to deal with this issue but here goes. running py2exe I get this error [CODE]Traceback (most recent call last): File "setup.py", line 4, in (module) setup(console=['hello.py']) File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, … | |
Never did much stuff with "Classes" while still writing in VB6. :) I have the following wxPython Class in my pyTC file [code] class InfoUUT(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: InfoUUT.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "This TPS is for the following UUT") … | |
Hey guys, I working on an assignment in which I have to write binary/hex to a file. More specifically, I have a variable that holds a memory address that needs to be written to the file big endian but every time I try to write it, python being python treats … | |
Here is simple math program to list number whose all factors are in given set of factors. I have included my timing decorator, which uses my timestring function, so I included that and imports for decorator in the decorator function, bit against the rules. Of course I could have used … | |
I'm trying to understand utilizing classes and their methods. I made a simple program to exit or print 'Will continue' given a word. however I keep getting a TypeError for self and through reading my books and searching online I'm still not quite sure why. the code is: [CODE]class OffSwitch(object): … | |
I have written some code to count the number of upper case letters in a string and the last line will not work? I am trying to print a statement that concatenates a line of text and an integer variable: [CODE]print ("The number of upper case letters are: " + … | |
I am trying to write code to count the number of upper case letters in a string using Python. I have written the following but instead of the code returning the number of Upper Case letters it returns []? An help would be gratefully recieved. [CODE]import re while True: strPassword … | |
Hi Please take a look at [CODE=python] class ShortInputException(Exception): #QUESTION: Why do I have to inherit from the "Exception" class? def __init__(self, length, atleast): Exception.__init__(self) #QUESTION: Why do I have to add this? self.length = length self.atleast = atleast try: s = raw_input('Enter something --> ') if len(s) < 3: … | |
Hello, I know the break or continue statements for the loops... But I have a if stetement that I would like to exit from and I don't know how to do [code] value = -1 if true: print 'hello world' # Some unexpected value is set so I would like … | |
[CODE]Dim Processors(4) As ProcessorType For j = 1 To 4 Step 1 Put #filenum, WritePos, Processors(j).byte0 WritePos = WritePos + 1[/CODE] I'm in the process of translating this VBA code to python, and essentially what it does is creates 4 Processor Objects but as you can see from the for … | |
hey!! this is my first time to post question in this board. i learn a lots from this place. now , i really got a problem for this programming. anybody can help me!!!! i done "Add" part but i don't konw right or wrong and for "pass" i really need … |
The End.