15,181 Topics
| |
hi guys am stuck with my project.. i want to make the car stop when the lights are red and then move when its green. im providing you my code hoping you can help me.. thanks.. [code=python] import Tkinter as tk import time import sys import datetime as dt from … | |
Hello, I'm new to python and I'm trying to learn how to read/write programs written in python using eclipse. I'm used to java so a lot of things are familiar but a lot of things aren't and I'm having trouble finding a good place to go to learn what different … | |
hi, I am using reportlab to generate pdf but having a problem in making list in tabular format. final list should be in this format: list =[ ['companies', 'industries'], ['1', '11'], ['2','22], ['3', '33'] ] data =[] data.append('companies') for item in some_list: data.insert(0, item) -> Assuming item gives me values … | |
Hello All, Greetings! I have question concerning OOP with Python. I want to know when Python class or being specific, how py class ends in package like wxpython. What I mean is I have one class let say of frame and another class of a dialog box all in same … | |
Well, I have recently created a "translation" program. It basically asks what languages you would like to translate between, then goes to the appropriate page on a translation website. I have integrated an option to keep using a language, rather than having to start at the main menu again. Except, … | |
Hi all, How to Enable/Disable port of a system by triggering the URL through Python program. Please help if possible. | |
Hello! I've run into a slight problem with my script. As I iterate through a list of strings, I need to print each string, but they all need to print on the same line, so I used this: [code=python] for item in myList: print item, [/code] The comma puts each … | |
Hi, Is it possible to change a folder permission using python. Brgds, kNish | |
Hello all :) I have a grid program that lets me define a grid and do some basic stuff with it. The next step I need to implement is that I need to add a floodFill like method ([url]http://en.wikipedia.org/wiki/Flood_fill[/url]). What I wanna achieve with this is the functionality that I … | |
Hello, Im having a little list problem with big lists. Say for example, I have this [CODE]Numbers = [["aaa", "bbb", "ccc"] , ["ddd", "eee", "fff"]][/CODE] How do I search and return from this list? eg searching for "fff" and returning "ddd"? I can only return specific position in the list, … | |
I was wondering how you define a funtion which a phrase and two words are inputted and the output is the part of the prhase between the two words. Do you convert the string to a list?? I would apprecitate any help. | |
In a file there is a list: [QUOTE][['', '', '', '', '', '', '', '', '', 'Name'], ['', '', '', '', '', '', '', '', '', 1]][/QUOTE] How can I use it in a python script? Thanks | |
I am reading thru DiveIntoPython docs and it gives some examples Example 3.23. Formatting Numbers >>> print "Today's stock price: %f" % 50.4625 50.462500 The 1st % designates Formatting, what does the 2nd % do? Thanks! | |
I need to know how to do the this assignment. moveTo(shape, newCenter) shape is a graphics object that supports the getCenter method and the newCenter is a Point. Moves shape so that newCenter is its center. Use your function to write a program that draws a circle and then allows … | |
Hello DaniWeb, I am new and I have a problem thats driving me nuts, i'm sure its very simple to an experienced CS but I'm attempting to execute a couple conditional statements. basically, i am trying to write a program that determines the amount of shipping costs to inform the … | |
I was wondering if anyone out there had a good suggestion on an Installer program. I have a few friends that are interested in how I'm doing in my programming self-education, so I'd like to send them examples of what I've done. Now I've managed to use py2exe to create … | |
A real simple one, just a question of understanding the python syntax I suppose. I won't waste your time by throwing the whole program at you, I think my question can be boiled down to this: [ICODE] a = ["cat"] b = ["bark"] wordinsa = input("Word: ") a.append(wordinsa) wordinsb = … | |
Hi, I am having the problem in nested list. Here is the code : [code=python]data1= [['Contacts',company.contacts.count() ], ['Notes', company.notes.count()], ['Met by', ], ['Industry', industry], ['Financial Investors', '31']] for item in metlist: data1[2].insert(1,item) [/code] Basically I am trying to insert the value for Met by in [ 'Met by', metlist->value] I … | |
Okay, continuing on with my little System access project I've been working on. Now I've gotten three different Python files in this Project. I'm using a main menu .py to offer option for the user to select from. Each option then opens one of the other two .py files and … | |
Folks, hi, I thought you might like to know that there's a way to develop complex web 2.0 applications without having to program a single line of javascript. Pyjamas, a port of Google's Web Toolkit (GWT) will translate a python application into AJAX for you. For convenience, there is also … | |
OK, I have decided to download wxPython and Python2.6 . But I am confused which kind from here: [url]http://sourceforge.net/project/showfiles.php?group_id=10718&package_id=10559&release_id=629662[/url] I am running winXp Pro, and MAC OS X 10.5 . I don't know which win to choose, [U]32 or 64[/U], and [U]ansi or unicode[/U]? Also, osx [U]ansi or unicode[/U]? And … | |
hey guys... sorry for bugging you all but i have 1 last question and i promise that will be it. its probably simple but i just want to know how to go about raising a custom exception the result it expects is: [code] Traceback (most recent call last): ... Exception: … | |
hello everyone, im having a little bit of trouble with my python and i was wondering if someone could please give me a hand with it :) basically, what i am trying to achieve is exactly what is going on in this thread [url]http://ubuntuforums.org/archive/index.php/t-803060.html[/url] except in my example, the dict … | |
Howdy folks, me again. :) I'm attempting to append to a previously pickled file using cPickle.dump(). But I keep getting the error: Traceback (most recent call last): File "C:\Python25\Python\UserAccess.py", line 24, in <module> p.dump(tempadd, temp) TypeError: argument must have 'write' attribute I've opened the file using the 'a+' attribute, which … | |
Okay, I'm doing some experimenting on file I/O using a user/password access program I'm writing. My problem right now is while the program will append the new user and password, it does so whether or not that user name exists already. I'm not worried about duplicate passwords, but I don't … | |
Hello, I have a weird problem... When I use the clipboard, code runs without error. Attempt to paste directly after run in any application does not work. Pasting in the python shell works fine. After pasting in the python shell, pasting in any other application works fine !!! Need help … | |
I have the following code: [code=python] import re string = 'c:\test.doc' if re.match(r":\\[0-9a-z]", string): ##r":\\[0-9a-z]" should match ':\t' print 'true' else: print 'false' [/code] the problem I am having is that this is always evaluating to false. | |
I have an ipod touch, but no pc. I'm in a situation where I can't use a pc. Could some kind patron please add me on msn or google or yahoo, so I can chat with them 1 on 1 on meebo. I can code the hello world program, but … | |
I got Python installed on my AT&T Tilt and have been able to send *.py programs from my PC over to the phone. However, when I try to write a Python program using Word Mobile or the Note program I can't figure out how to save the program with a … | |
I keep getting an error message when I run this code and I don't know how to correct it. Here's the code and below it is the error message: [code] import sys import Image import ImageFilter im = Image.open("7.bmp").convert("L") source = im.split() R, G, B = 0, 1, 2 # … |
The End.