15,175 Topics
| |
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 # … | |
Hey guys, I was wondering if someone might be able to help a newbie out. I'm trying to write a program that randomly flashes either a .gif file on screen or nothing. Now, I've gotten that working but the trick is I want there to be a short gap between … | |
hi guys.. is it appropriate to use tkinter for traffic simulation where there is a lot of movement (rotation) of cars taking into consideration its speed? thanks.. | |
hi everyone i wanna create a class in tkinter but im finding it very difficult to begin it as im new to python. i want a class traffic light that will operate continuously (that is red to green to red.... ). thanks.. | |
Hello everyone ! I am a still a beginner in Python (and have no knowledge in other languages), and today I got a reaction from my script that I find unexpected. Here's the code: I want to use the buildOneCard function to create a card (a couple of values), by … | |
Hey boys I'm using python 2.5.2 when i try to import Tkinter it tells that it doesn't know it and suggests me to install the -tk pakage if your answers include installing pakages please tell how to find and install them thanks a lot Bye | |
Subprocess issues with platform independence Postby ajamin on Wed Oct 08, 2008 10:46 am I am writing a python script that will act as a wrapper for another program. The python script will provide the inputs for this program and will verify that the output is correct. The application runs … |
The End.