15,175 Topics
| |
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 … | |
Here's what I'd like to do as an exercise to improve my Python and to play with the idea of genetic programming in basic form. From within a script, I'd like to spawn a number (1000?) of additional scripts with randomly generated but grammatically sane Python related to a very … | |
write a piece of code that ask the user to set a password - queries the user for his/her user name - queries the user for his/her password twice, making sure the user enters the same password twice - Allow Only 3 attempts to get a correct password the rules … | |
hi , i want to sort my two merged iterable with heapq. everything is good but in result which starts with Turkish character locate end of all result. exm: Ö,Ş,İ ... locate end of result how can i solve this problem? | |
my excel files have more than a 1000 numbers under the columns that are labeled x, y, z for each excel file. i was trying to print the x, y, and z values for all of the excel files in to a single excel file(Trying_excel.xls)that would have all of the … | |
im trying to calculate the average and std for x, y, and z column for about 50 excel files that i saved in a folder. each excel files has x values in the first column, y in the second, and z in the third column. im using this script, but … | |
I'm new to python ,please tell me the way to write a program using python , to convert any decimal number into octal number(base 8) (using python 2.7) |
The End.