15,175 Topics

Member Avatar for
Member Avatar for ihatehippies

I encountered this error "SyntaxError: can't assign to function call" while experimenting with the pickle method. What I was trying to do was store something simple like the string "x = 5" and have python eval() the string later to bring the variable x back into existence in a later …

Member Avatar for ihatehippies
0
231
Member Avatar for planetPlosion

I have a sentence generator that I set up with a "make" button to print the generated sentence, but I want it to print to the resultBox area, and instead it prints to the terminal window. I'm assuming it has something to do with the return sentence portion of it. …

Member Avatar for planetPlosion
0
86
Member Avatar for luke77

Hi guys, I'm working my way through the Project Euler problems to help teach myself programming, so I'm looking to write a function that will return all possible permutations of a n digit number so that I can test for a condition on each permutation. So, for example, if the …

Member Avatar for luke77
0
116
Member Avatar for graphpaper

Request for help from Python beginner: I don't want you to do the work for me, just some help to know where my mistakes are and how to correct them. I am trying to code a program to convert any decimal number into binary. In the case of an infinitely …

Member Avatar for graphpaper
0
117
Member Avatar for Devlan

Here I go with yet another of my don't-get-the-syntax-problems. For some reason I tend to get a lot more from putting a question here than reading through a few dozen pages of documentation, which I have once again done. Say I have a dictionary as a basic data structure in …

Member Avatar for jlm699
0
94
Member Avatar for Stefano Mtangoo

I was playing with wxpython Demo and wanted to go on playing with Rich Text. I found this: [CODE=python] self.MakeMenuBar() self.MakeToolBar() [/CODE] when I tried to make my own editor and call those two methods I get error. Can some one help me to explain out those two methods and …

Member Avatar for Stefano Mtangoo
0
86
Member Avatar for lllllIllIlllI

Hi I have been mucking around with VPython for a bit now and i can use it for basic 3D Python but i have not yet worked out how to do things that arent the usual, add square, add arrow, add sphere. So i was wondering if it was even …

Member Avatar for ZZucker
0
524
Member Avatar for jcafaro10

Does anyone have a good beginner resource guide to regular expressions in Python? I'm used to them in java. For example, in java I have some regular expressions that look like this: [CODE] PUNC_MATCH = "[\\d\\p{Punct}]+" PUNC_PREFIX = "^" + PUNC_MATCH PUNC_SUFFIX = PUNC_MATCH + "$" [/CODE] Basically its supposed …

Member Avatar for ZZucker
0
121
Member Avatar for dinilkarun

Hi All, I have developed an application in Python and the UI is developed in BOA constructor. I have placed a gauge(Progress Bar) on the frame to let user know much of processing is done. With my observation, I have noticed that the application takes about 50 seconds to complete …

Member Avatar for dinilkarun
0
143
Member Avatar for Devlan

The comments are running willy-nilly, but at least in the pre-view mode it helps to click "Toggle Plain Text". [ICODE]if wish == 1: #Menu option word = input("Enter word: ") description = input("Enter description: ") print print tuplelist.append((word,description)) #tuplelist is originally defined as simply [] main_dictuples(tuplelist) #Returns the function for …

Member Avatar for Devlan
0
139
Member Avatar for MaxManus

Hello, I am trying to make a program that takes input on the command-line and returns the result to textfile. The problem is that I get the error TypeError: can only concatenate tuple (not "str") to tuple WARNING: Failure executing file: <write_cml_function.py> [CODE]from scitools.all import * # imports numpy and …

Member Avatar for MaxManus
0
141
Member Avatar for leegeorg07

hi again after watching the film 'war games' i decided i would try to create logic games, i want to start out simply with something like noughts and crosses. but i have no idea how to start so any advice would be appreciated. thanks in advance leegeorg07

Member Avatar for shadwickman
0
100
Member Avatar for danfi766

[B]******************************[/B] [B]Sorry guys this works I tested with bad values[/B] [B]******************************[/B] Hello I'm having trouble with this function i have a list with dicts and I'm trying to make a search in the list. The problem is that my function doesn't return the list even though i know the values …

Member Avatar for Gribouillis
0
111
Member Avatar for Chemist

Hi guys, I'm trying to write my first little program... I tell python the number of minutes i want it to shutdown/hibernate my computer and it will add that to the current time and perform the necessary action. However I'm really struggling to add the number of minutes to the …

Member Avatar for Gribouillis
0
137
Member Avatar for massivefermion
Member Avatar for Gribouillis
0
156
Member Avatar for jcafaro10

I'm new to python and I'm having trouble trying to sort a list correctly. I have a map of strings->Word objects. A word object contains a list of all the places in a file where the word occurs. So in the Word class I have this method: [CODE] def _cmp_(self,other): …

Member Avatar for Gribouillis
0
101
Member Avatar for rajaram_l20

I am using Python ver 2.5 and Iron Python 1.1.2. When I tried to run a script which imports xlwt and creates a workbook, huge memory is being used and it is never released unless the application running the script is closed. This memory problems happen only when using site-packages. …

Member Avatar for Gribouillis
0
82
Member Avatar for dinesh5

hi there, is there any editor or compiler that explain us what the lines of codes we have written means and is there any editor or compiler that we can use with html & php.mail [EMAIL="deinsh5@hotmail.com"]me[/EMAIL]

Member Avatar for jlm699
0
55
Member Avatar for jworld2

Okay, so I'm trying to make a kind of clock program, where every second it displays the next image in the sequence. I does just that. It displays the next image. But it doesn't replace the previous image, it just puts the next image on top. How would I get …

Member Avatar for jworld2
0
71
Member Avatar for crazzym

Hello, I know this is something extremely easy to do but i don't master the python syntax at the moment. I've read the documentation and I've been searching on the 'net for information but nothing that I've found seems to be what I'm looking for. Probably the reason is the …

Member Avatar for crazzym
0
161
Member Avatar for Amisha_Sharma

Hi all, I want to know thtat what is the advantage of learning PYTHON.Where this language is used? Is this languge have any scope in future? Thanks

Member Avatar for Stefano Mtangoo
0
77
Member Avatar for harrykokil

hi guys.. im having problems with my traffic lights. i want to execute the procesing of the traffic lights infinitely (i.e red to green to red continuously). im providing my code hoping to get a positive response soon. thanks.. [code=python] import Tkinter as tk import time import sys import datetime …

Member Avatar for sneekula
0
180
Member Avatar for vmars

In the Starting Python [ [url]http://www.daniweb.com/forums/thread20774.html[/url] ] Post, I configured as specified, but when I take that 1st code example [ print "Hello Monty Python!" ] and save it as a file [ HelloMP1.py ], and open it in the Edit Window, and run it from there, I get the …

Member Avatar for sneekula
0
111
Member Avatar for dinilkarun

Hi, I have two modules: Mod1 and Mod2. I want to call the function ‘ ProgressBar’ which is present in Mod1 inside a class ‘clsMain’. In the function ‘ProgressBar’, I set the increment to the progress bar. The function looks something like this: def ProgressBar(self,intIncrement): self.gauge1.SetValue(intIncrement) It takes integer as …

Member Avatar for dinilkarun
0
248
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

The End.