15,406 Topics

Member Avatar for
Member Avatar for Tcll

I'm currently working in another thread to find a better conversion method here's my script: [code] #!BPY """ Name: 'Brawl (.mdl0)...' Blender: 248 Group: 'Import' Tooltip: 'Import a Brawl model file (.mdl0)' """ __author__= ['Tcll'] __url__ = ("") __version__= '0.015' __bpydoc__= '''\ mdl0 Importer ''' # ***** BEGIN GPL LICENSE …

Member Avatar for Tcll
0
2K
Member Avatar for monica23

Good day everyone, i need to display image from the database but the code returns error page when i tried to print image from the database using [CODE] print fout [/CODE] below is the entire codes [CODE] #! /data/python import MySQLdb import sys print ("Content-type: image/jpeg"); print # End of …

0
47
Member Avatar for MazzGonzo

Hi, Basically I want to put my responses for each of the outputs of my loop (answers yes or no to different contrast numbers) into an empty list ... so I would have a list for each contrast corresponding to how many yes or no's there were? [CODE]from observerClass import …

Member Avatar for TrustyTony
0
118
Member Avatar for eceisl

I need to write a recursive Python function that takes a numeric list as its argument, finds and returns the minimum of its elements. I am not allowed to use min() function of Python. I'll be very grateful if someone can help me.

Member Avatar for TrustyTony
0
109
Member Avatar for gorbulas

Hello Having trouble reading in some 8-bit data (not text) from serial port using pyserial module. Am storing the data in a string buffer as it comes in, that's working fine. Problem is that I'm printing the buffer out to the terminal screen, after a wee bit of data (30~200 …

Member Avatar for Gribouillis
0
346
Member Avatar for Lemony Lime

So, I have a two part question for you... I'm going to be writing several lines of code to a .txt file, but I won't know what each line is, or how many there will be. There could easily be hundreds of lines. I need to add a prefix to …

Member Avatar for gorbulas
0
226
Member Avatar for arindam31

Hi Guys , this questioned has been asked before , but the answers haven helped me . I want to seperate lines when i am appending the text control. But "\n" is simply not working . I am using Python 2.7 , on Windows 7. Please help. I want to …

Member Avatar for arindam31
0
34K
Member Avatar for vegaseat

Python does not have a type like struct in C or record in Pascal, but it can be easily implemented with a class. This little code snippet shows you how to do it.

Member Avatar for Gribouillis
0
4K
Member Avatar for rollingapes

I have to create a simulation to repeatedly play the Monty Hall game. I've created a class. This is what I have so far. I have created the buttons, activated them, deactivated the stay and quit buttons. I have a button class that is used to activate and deactivate buttons …

Member Avatar for rollingapes
0
185
Member Avatar for vegaseat

I couldn't find a meaningful code sample for the wxPython slider (wx.Slider), so I concocted this one and added a few explanations. It explores two different sliders, one is horizontal, the other vertical. The slider events are then fed to a function that retrieves the position values and displays them …

Member Avatar for skyrimmer
0
773
Member Avatar for gnik2009

I need to read a file that contains this: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 …

Member Avatar for gnik2009
0
239
Member Avatar for carmstr4

So after a lot of work I got functions to compare one word with another one. Now my problem is formatting the output. I have one function that locates letters int he wrong position, one that finds matching letters and one to compare the results in order to format the …

Member Avatar for TrustyTony
0
187
Member Avatar for python123456

I am working on a program that uses a recursive function to print the digits of a number in English (i.e. 456 would display "Four Five Six".) Right now I am beyond confused and I don't have much code to show for the hour and a half of work I've …

Member Avatar for TrustyTony
0
2K
Member Avatar for psvpython

Hi, I have created a checkbutton within a dialog box. But, I am not able to capture the value of the checkbutton. The value always seems to be 0 whether checked or not. [CODE] class MyDialog: def __init__(self,parent): self.Frame1= Tix.Frame(parent) self.Frame1.pack(side=Tix.LEFT, fill=Tix.BOTH) self.enabled = Tix.IntVar() self.checkbutton = Tix.Checkbutton(self.Frame1,text = "Enable …

Member Avatar for psvpython
0
138
Member Avatar for pointers10

I am trying to let the user search an external file for 2 things after they tell me one of the things.. There are 3 different products and prices in the txt file in the form of: apple 1.99 orange 9.99 coconut 1.59 however, this only shows the price of …

Member Avatar for woooee
0
86
Member Avatar for sofia85

Hi, I have a file containing one column with values: 3.258 1.345 5.769 1.00 etc... I want to sort this data. I tried to use sort() directly on my raw data but I get error message saying 'str' object has no attribute 'sort'. I now it's basic, but I'm a …

Member Avatar for sofia85
0
133
Member Avatar for junoh1991

# I wanted to change the question. I have a list something like this: list1= ['NNW 30', 'SE 15', 'SSW 60', 'NNE 70', 'N 10'] For this list, if the element in the list starts with N, i want '+' to be inserted before the integer. If the element in …

Member Avatar for valorien
0
4K
Member Avatar for Lemony Lime

I'm pretty new to programming, so this may be really obvious, but I'm having trouble with it. I'm trying to learn python, so I thought I'd make a simple program in python to help me write similar lines of java code faster, (I'm going to easily have hundreds of lines …

Member Avatar for Lemony Lime
0
544
Member Avatar for caseyt88

Hello, I am taking a computer programming class this semester and working on a project. I am trying to read a text file into a 2D list. The text file contains ten rows and ten columns of numbers, either a 0,1,or 2. When i try to read the file it …

Member Avatar for caseyt88
0
421
Member Avatar for telmo96

Hello friends, I'm developing a small application with PyQt4. [img]http://i41.tinypic.com/2vl1f2t.png[/img] I want to add two spacer between Print and the other icons, just like they did on Notepad, do anyone know how to do it? [img]http://i39.tinypic.com/r87cro.png[/img]

0
65
Member Avatar for asong

This should be written in Python. The program will determine all of the magic squares when given an n, display permutations that match the magic squares to the screen AND write it to a file. It will only test when n == 3!!! But code it for n of ANY …

Member Avatar for asong
0
2K
Member Avatar for next_tech

Hi Guys, My final project has come and it is to make a GUI for a program that we previously wrote. So I have to use tkinter as my package for python to get this written. Now I can't find anything on tkinter and python 3.2 or any GUI "designers" …

Member Avatar for TrustyTony
0
715
Member Avatar for peterson624

I have to ask the user for a filename (that exists in the programs father file) and open that .gif file in order to play with the colors of the image... I am really new as programming and need help! I will be asking for more answers soon as well!! …

Member Avatar for peterson624
0
215
Member Avatar for sofia85

Hi, I have this data set consisting of some values for which I want to get the distribution for through random sampling. How would could I do that in Python. I'm new to Python and don't know where to start. Is there a python package that could do this, i.e. …

Member Avatar for Gribouillis
0
105
Member Avatar for kalookakoo

I'd really like to know the simplest way to implement music while people play the game I created, and for sounds to play during certain events. (such as dying)

Member Avatar for TrustyTony
0
196
Member Avatar for pelin

The question is ask the user for 20 numbers one at a time, saves the numbers in list, and then printsa 2 column table with each number in the list entered in the first column and its square root in the second column. Each column should be 6 characters wide …

Member Avatar for pelin
0
125
Member Avatar for suzan alamassy

[COLOR="Red"]please i want help : i want rotate picture in (90) , (180) , (270) or any degress using this function ::[/COLOR] def rotating ( picture ,pict ) : # we have to pick to picture and then put them as parameter in th function : pic=makePicture(picture) canvas=makePicture( pict ) …

0
120
Member Avatar for Suzan Al-amassy

[COLOR="Red"]when i try to scail picture down (( i did not have any problem )) using :[/COLOR] def generalscailing (picture ,pict , n ) : # we have to pick to picture and then put them as parameter in th function : pic=makePicture( picture ) canvas=makePicture( pict ) SourceX=0 width …

Member Avatar for TrustyTony
0
156
Member Avatar for psvpython

Hi, Is there anyway I can get the scrollbar to display the last line of text always i.e the bar of the scrollbar should be dragged down by default ? I use Tkinter and Python 2.4 Thanks

0
54
Member Avatar for darkwarrior86

hi i am new member here.. i want to open random url from list in python ..please help me to do that

Member Avatar for TrustyTony
0
59
Member Avatar for mattgwilson

Hi, I'm opening up text files created by another program which leaves an EOL character (which is a square box) to separate lines. I'm reading through these files and extracting data from them, I know where my data starts because I know the name of the parameter eg. "FOOD TYPE", …

Member Avatar for TrustyTony
0
352
Member Avatar for AdampskiB

Hello, The objective of my task is to allow the user to enter a series of colours (maximum and minimum of 4, and have to be within 5 set colours). I'm supposed to write code that continuously prompts the user if what they've entered doesn't meet the criteria. And also …

Member Avatar for woooee
0
156
Member Avatar for mahela007

Hello everyone I'm using python 3.1 and am trying to use the pyserial library. However, when I try something like ser.write('hello'), I get a type error. [CODE]>>> import serial >>> ser = serial.Serial('COM13') >>> ser.write('a') Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> ser.write('a') File "C:\Program Files\Python31\lib\site-packages\serial\serialwin32.py", …

Member Avatar for mahela007
0
743
Member Avatar for Taiki

Hello, I have been following discussions and codes for a while on Daniweb, and I'm really interested in this amazing community. I just joined though. I'm facing a problem in my Tk inter task. I have a code and I need to make a TKinter interface that does the job …

Member Avatar for Taiki
0
2K
Member Avatar for vlady

hello I have a problem concerning of changing mark. I don´t understand why it doesn´t work...thought the old_mark is type LIST. It works for one student and not for more (for loop) Pls can you help me? Thanks Vlady [CODE]def change_mark(changed_mark): for student in changed_mark: old_mark=changed_mark[student] position=old_mark.index[old_mark] old_mark[position] = raw_input('new_mark') …

Member Avatar for valorien
0
177
Member Avatar for Kitson

Hi again, I have a program which opens a file, searches for a string ("Performance Summary"), misses 3 lines then copies the following lines until there are no more. [CODE]# Extracts data from a files and saves it in a summary file with open("file1.txt") as file: for line in file: …

Member Avatar for TrustyTony
0
174
Member Avatar for mattgwilson

Hi guys, I'm making a program which reads all files in a folder with test data, these files are known as logfiles. With each read logfile, I then need to extract only the lines which have the keyword in them... for example 'PASSED'. Here lies the problem, when you open …

Member Avatar for mattgwilson
0
158
Member Avatar for carmstr4

So for my intro to programming class our final project is designing a simple game in Python. i picked Lingo but I'm running into a huge problem. Lingo is played by the computer picking a random 5 letter word (from a .txt file) then the user guessing 5 times until …

Member Avatar for carmstr4
0
2K
Member Avatar for jantrancero

I want to build a script that does the following: The script should do make an arry from the directory where the script is with os.listdir(). Then the script has to test if the value in the array already excists in the outcome file, if not the name in the …

Member Avatar for jantrancero
0
248
Member Avatar for ayocam

Hello, I have been working on learning Python and I have been writing a game(CLUI not GUI) that has gone through a few phases. It started out as a 3-4-5 variant assuming 3 rows with 3 objects in the first row, 4 in the second, and 5 in the third …

0
105
Member Avatar for Kitson

Hi guys, First post so please don't be too harsh :D. I'm trying to open a .txt file, search for a specific line starting with (" Performance Summary"), copying the first and third numbers in the columns of the 4th line below it and every line below that until there …

Member Avatar for valorien
0
209
Member Avatar for sjgood

I need help with two things.... 1. I would like to lower the speed of the snake. 2. I want to make the screen, snake, and food bigger. I really need to change the speed. The 2nd thing is just something extra. But, I've tried a bunch of little things …

0
102
Member Avatar for pelin

Hi. i am trying to create deck of cards for uno game. i need to create draw and undraw functions for each card class. i dont know how to do this.. Thanks !

Member Avatar for pelin
0
6K
Member Avatar for bigredaltoid

[B]Edit2: I realized the title of the thread was misleading after the post was made..it's more like There's 6 lines per student..I need to make a list for each student. So it's 6X..where X is the number of students.[/B] Hi all.. I have a text file that looks like so: …

Member Avatar for bigredaltoid
0
159
Member Avatar for vaucro

I've created a game , somewhat like space invaders, and it looks pretty cool , very proud of what ive done. But I'm stuck on finding a way of unit testing the collision of 2 sprites and the collision between the borders and a sprite. If anyone could point me …

Member Avatar for vaucro
0
231
Member Avatar for Stefano Mtangoo

Hi, I need to concatanate lines based on regex. Lines to be concatanated are scattered. All lines begin with number$number$number$number$sentences. There is nothing to mark the end of sentence, only the beginning. Here is an example. I want to rewrite this one [CODE]2 $5$233$ check big cat if it have …

Member Avatar for Stefano Mtangoo
0
215
Member Avatar for mkbear

Hey so Im a beginner, and I need some help. My professor gave us this code: [CODE] def average(list): total = 0.0 for number in list: total += number return total / len(list) [/CODE] Then, he asked us to rewrite that program so that it uses a while loop instead. …

Member Avatar for askandstudy
0
205
Member Avatar for SureEM25

Hello currently I have started a project for my school. The project is a program that can factor a trinomial. So far I have it set up to take the users inputs. then it multiplies two of the inputs to get a new number. My problem is that i need …

Member Avatar for wallars
1
183
Member Avatar for mkbear

Hey so Im a beginner, and I need some help. My professor gave us this code: def average(list): total = 0.0 for number in list: total += number return total / len(list) Then, he asked us to rewrite that program so that it uses a while loop instead. So far …

Member Avatar for inuasha
0
223
Member Avatar for arindam31

Hi Everyone, I am trying to call a function after every T secs . When i use time.wait() , the app hangs, i do not have control over the app. For now , this programs will do the process once , and then after T secs . But i do …

Member Avatar for arindam31
0
283

The End.