15,185 Topics
| |
hello, I'm rather new to python, and I'm trying to make a simple macro program, i have the mouse setup but duplicating the keyboard actions is a giving me a bit of trouble. the website I'm using isn't for python but i found it for a reference: [url]http://www.codeproject.com/KB/system/keyboard.aspx[/url] I found … | |
Let's say I want to create two classes Owner and Pet [CODE]class Owner(object): def __init__(first_name, last_name, address, phone): self.first_name = first_name self.last_name = last_name self.address = address self.phone = phone class Pet(object): def __init__(name, owner) self.name = name self.owner = Owner.__init__(first_name, last_name, address, phone)[/CODE] Did I pass the class Owner … | |
Here is my issue: I have a program, that downloads roms off the internet. Everything works fine, but I would like to show an indefinite progress bar while it is downloading. I have that with the following code: [code] # -*- coding: utf-8 -*- # Form implementation generated from reading … | |
Hi, I have the following files and can match but, am having trouble with getting the output to write correctly to a data matrix format that I need and would appreciate any help with getting the code right. File 1 has a list of numbers and Files 2, 3 and … | |
Hi every one, I am using some tools for reverse engineering for Python code. I want to Reversing Sequence diagram for my Python code but I can't get Sequence diagrams, only get class diagram. Can you help me? I am using Visual paradigm 8 and Enterprise Architect. If you used … | |
This is a section of a program I made that keeps track of some money I'm saving. :cool: When I enter how much I want to add it saves what I enter to a file and updates the current amount I have saved, also in the file. When I enter … | |
Hello everyone, I am making my thesis in the university using Python as programming language and Django as framework, I have doubts about choose data from de models class, for example I have the class Tribunal, and I am able to generate an Excel with all the objects of that … | |
I have been thinking about order operations and generalized * in Python recently. I want to share some of my thinking here, even the topic is quite theoretical, considering the beauty and orthogonality of the language. [B]Point one[/B] You can do comparison with tuples of numbers in Python [CODE]>>> (0,0)<(1,1)<(2,2) … | |
I am trying to sort a file by a quick sort comparison. The problem lies in parsing the string and comparing fields. I use the following to break up a line: records = [line.split(spl) for line in file(filename)] and the following to sort: records.sort( lambda a,b: cmp(a[fieldNo],b[fieldNo]) ) This works … | |
I'm testing to get my python script to still run if the smtp server it uses went down. I have a local mail server im testing this with. The issue is when testing it, i get a large spew of text. It checks all its libraries and such, untill its … | |
I am beginning to write a tkinter program that will generate a DnD 3.5 Character Sheet. I haven't gotten very far. I'm using Python 3, and for some reason the sticky option of the .grid() method isn't working. When I run the code below, I get an error that says: … | |
Hello, pls can somebody have a look at my script and tell me why I can't get a value from d1? (print d1). Thank you for help. here is a script: [CODE]def subtract(): d1=file1(filename) dd2=file2(filename) res = dict() print d1 ## for key in d1: ## if key not in … | |
I suggest it's just a simlpe tiny thing that has to be done to solve this but I simply can't figure it out! I hope anyone can help me. Here's what I koppied from a learnbook for python. >>> secret = 1337 >>> guess = 0 >>> l = 0 … | |
Say I have a file structure that looks like this [CODE]root folder/ main.py -folder a -script.py -folder b -img.png[/CODE] How could I load the img.png file from script.py? Should I just have a function in main.py that gets the path of the root folder, and then tac the 'folder a' … | |
Hi all , I'm new here and new in Python for symbian ; I hope I'm asking in the right forum and the right section. What python provides to switch off mobile functions that consumes battery , How turn off BlueTooth , Wifi , GPRS , Vibration and Ringing ?? … | |
Do you know that there is clean way of doing what C-language ternary operator ? does in Python's recent versions. It is if with special twist. The syntax is: [CODE]'The value if true' if <condition> else 'Value when false'[/CODE] Values can be any type. You can put this structure to … | |
Hallo ... I am very new to Python programming & I have this Question ... I am asked to write a program to calculate the No. of words & the length of each (letters) in this sentence : (An Oligonucleotide is a short segment of RNA or DNA, typically with … | |
I have just started learning python, I am a Java programmer. I think python is more simple than java. What I wanted to ask is, where is python used? And if python does not follow the complete OOP concepts, then can it be used to design large / major applications? … | |
hi everyone, I have a tiny problem with a simple implementation: - i have a main window with a table in my central widget - i want to add stuff in the table gradually, and I allow only the 1st cell (index 0) of each row to be selectable. - … | |
I want to improve my programming skill and decided to build python wrappers over other library's. I've done this with the face recognition and think it would be real world code for me to work on. I want to code as a career and I want to code stuff programmers … | |
Hi, i'm new to Python and i'm currently following the "How to Think like a Computer Scientist" tutorials. I'm at Chapter 4: Conditionals and doing the last exercise where i need to create six colored houses on a black background. I've successfully created the house at the bottom left, but … | |
Alright i need help computing random dates and i have to use lists. this is what the program should do program must print out the following output: 1. The complete list of birthdays that you generated. 2. The birthday that was generated twice (printed separately from the list). 3. The … | |
Hi. I have a wxRichtextCtrl (although plain text is fine if I can find a way to do this), and I would like to return the last word typed while the user carries on. You know that way MS Word and OpenOffice etc, highlight a wrongly spelled word as soon … | |
Hi, The below code extracts the branch number and the test environment to deploy that particular branches build on from a txt file (branch_dest.txt). Then it parses HTML pages to reach a webpage which contains some checkboxes. I want to check the "Select/Deselect All" checkbox and then click the "Deploy" … | |
So, I'm not sure if this is possible, but I'm in a situation where I need to do such or something similar. I'm designing a multi-level game, where the game goes on to level 2 once the player comes into contact with the door at the end of level 1. … | |
I'm revisiting an old IR tracking project, and want to use it in a blender game. I would like to know if anyone could help optimize the parsing algorithm or tell me an easier way to track multiple points with code. "im" is an instance of an image I captured … | |
Ok if anyone knows how to do python programming please help, this is my last assignment and i cant figure out how i should start this here are the directions... You are to write a Python program that randomly generates birthdays – considering only the month and day. For example, … | |
I have created a program, and wanted some critique on it. There is a website that I go to in order to download roms, and I do not like clicking a ton of links and waiting 15 seconds to download it, so I created a program to fetch it for … | |
Okay, I am writing a script that might be impossible to fully explain in words. Therefore, I am going to come up with an example that shows the same problem, so please do not tell me to simply combine the scripts or anything, as I am unable to. Anyways, I … | |
| Hey All, I have 'Py-mailer' here.... here's how it is so far: [code='python'] import smtplib import wx window=wx.App() class pymailer(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"Py-mailer",size=(900,700)) self.panel=wx.Panel(self,-1) menubar=wx.MenuBar() filem=wx.Menu() filem.Append(201,"Quit") self.Bind(wx.EVT_MENU,self.Quit,id=201) viewm=wx.Menu() viewm.Append(202,"About") self.Bind(wx.EVT_MENU,self.About,id=202) menubar.Append(filem,"File") menubar.Append(viewm,"Help") self.SetMenuBar(menubar) wx.StaticText(self.panel, -1, "Login ID:", pos=(10,10)) wx.StaticText(self.panel, -1, "Password:", pos=(10,40)) self.username=wx.TextCtrl(self.panel,101,"Login ID",pos=(100,10)) self.password=wx.TextCtrl(self.panel,102,"Password",style=(wx.TE_PASSWORD),pos=(100,40)) wx.StaticText(self.panel, -1, "@gmail.com", pos=(220,10)) … |
The End.