15,181 Topics

Member Avatar for
Member Avatar for harrykokil

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 …

Member Avatar for Luckymeera
0
65
Member Avatar for jcafaro10

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 …

Member Avatar for lllllIllIlllI
0
97
Member Avatar for laspal

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 …

Member Avatar for woooee
0
104
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
99
Member Avatar for SoulMazer

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

Member Avatar for SoulMazer
0
155
Member Avatar for pravdexter

Hi all, How to Enable/Disable port of a system by triggering the URL through Python program. Please help if possible.

Member Avatar for pravdexter
0
104
Member Avatar for shadwickman

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 …

Member Avatar for shadwickman
0
137
Member Avatar for knish
Member Avatar for jlm699
0
144
Member Avatar for tillaart36

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 …

Member Avatar for tillaart36
0
890
Member Avatar for Dart82

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

Member Avatar for Gribouillis
0
134
Member Avatar for Dart82

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.

Member Avatar for Dart82
0
108
Member Avatar for god0fgod

In a file there is a list: [QUOTE][['', '', '', '', '', '', '', '', '', 'Name'], ['', '', '', '', '', '', '', '', '', 1]][/QUOTE] How can I use it in a python script? Thanks

Member Avatar for Gribouillis
0
345
Member Avatar for vmars

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!

Member Avatar for bvdet
0
110
Member Avatar for peter1121

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 …

Member Avatar for Ene Uran
0
203
Member Avatar for SitiSlicker

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 …

Member Avatar for sneekula
0
2K
Member Avatar for Andymoore88

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 …

Member Avatar for Andymoore88
0
99
Member Avatar for Devlan

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

Member Avatar for Devlan
0
164
Member Avatar for laspal

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 …

Member Avatar for vegaseat
0
269
Member Avatar for Andymoore88

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 …

Member Avatar for Andymoore88
0
199
Member Avatar for lkcl

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 …

0
59
Member Avatar for vmars

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 …

Member Avatar for Stefano Mtangoo
0
163
Member Avatar for dr_hamburger

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

Member Avatar for Stefano Mtangoo
0
114
Member Avatar for dr_hamburger

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 …

Member Avatar for lllllIllIlllI
0
138
Member Avatar for Andymoore88

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 …

Member Avatar for Andymoore88
0
787
Member Avatar for Andymoore88

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 …

Member Avatar for Andymoore88
0
154
Member Avatar for ldk

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 …

Member Avatar for Ene Uran
0
93
Member Avatar for unkwntech

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.

Member Avatar for bvdet
0
130
Member Avatar for spinner357

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 …

Member Avatar for EAnder
0
101
Member Avatar for FireNWater

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 …

Member Avatar for EAnder
0
85
Member Avatar for defience

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

Member Avatar for woooee
0
1K

The End.