15,190 Topics

Member Avatar for
Member Avatar for Niner710

I have a simple question with Python numpy. I have a numpy array as follows. [CODE]a = [ [1000 2 3] [4 5000 6] [7 8 9000] ] [/CODE] I want to be able to print 3 slices of the array to a txt file so that the elements in …

Member Avatar for vegaseat
0
552
Member Avatar for jkrueger

Hi, I'm a Linux user, and have general knowledge of windows. OK, have cygwin terminals working and have colorama and termcolor modules working. Colorrama allows use of termcolor on windows. So, when doing quick scripts that have some color in them programed on Linux I can quickly cxfreeze them on …

Member Avatar for jkrueger
0
369
Member Avatar for hughesadam_87

Hey guys, Couldn't find the answer to this question in any old threads, probably because I don't know the terminology involved well enough. I have a program which takes in data and writes it into a numpy array at the beginning of a pipeline. I use a class called Masterarray …

Member Avatar for hughesadam_87
0
94
Member Avatar for shama_kandy

What would be the loss if Python was fully interpreted instead of having a hybrid (compilation + interpretation) model of implementation ?

Member Avatar for shama_kandy
0
59
Member Avatar for RewindPlay

hello, I just signed up to ask...How would I store the information from my code(see below) into a object? I'll be naming the object employees. The code I have now executes this:(please tell me if there are any mistakes on the code I have so far) 1.Ask the user to …

Member Avatar for woooee
0
134
Member Avatar for jarograv

I have this psuedocode: [QUOTE]FUNCTION initialize FOR row = 1 to num_items get random number for the list ENDFOR ENDFUNCTION initialize FUNCTION show FOR row = 1 to num_items show output: list(row) ENDFOR ENDFUNCTION show FUNCTION sort FOR pass = 1 to num_items posn = 1 sorted = True WHILE …

Member Avatar for TrustyTony
0
271
Member Avatar for MUFC4life

Hi i'm trying to make a basic snake game. However i cannot seem to be able to display any food. I have tried numerous different ways but i just can't get anything to show :@. I simply want a red rectangle that will display in random places everytime the snake …

Member Avatar for Tech B
0
162
Member Avatar for almoj4ever

hi there ,,, im new to this forums and i really need somehelp in paython as i've got this homework and i need somehelp with it !! ,,, and im so stuck in it ! 1.Write a function to find average of a series of numbers entered by the user. …

Member Avatar for predator78
0
164
Member Avatar for ROTC89

Hi I am new to python. I am trying to get my fraction program to work but I keep getting this error message: Any advice would be helpful! [ICODE] File "main.py", line 5, in ? from fraction import* File "/home/students/bf133052/CS4223/fraction.py", line 10 def__init__(self,numerator,denominator=1): ^ SyntaxError: invalid syntax [/ICODE] here is …

Member Avatar for ROTC89
0
3K
Member Avatar for ihatehippies

how do I catch changes to a mutable object ie: [CODE=python] class test(object): def __init__(self): self.x = [] def __getattr__(self, atr): print 'retrieving atr %s' % atr return self.__dict__[atr] def __setattr__(self, atr, val): print 'setting atr %s to value % s' % (atr, val) self.__dict__[atr] = val [/CODE] >>> instance …

Member Avatar for ihatehippies
0
227
Member Avatar for TrustyTony

Response to hijacker of thread: [url]http://www.daniweb.com/software-development/python/threads/59745[/url]

Member Avatar for TrustyTony
1
325
Member Avatar for e-papa

Hi there, I've been trying to create a memory test game, but been trying to figure out a way to get the output to display for a limited amount of time, any suggestions geeks in the house.

Member Avatar for e-papa
0
276
Member Avatar for Archenemie

I have just started looking at simple cryptography in order to learn python better. Encryptions and decryptions should be speedy and accurate so im hoping it will improve my programming skills. I recently wrote this quick script for a shift cypher but i wasnt sure how to be able to …

Member Avatar for Archenemie
0
224
Member Avatar for fisat

can anyone please send me the code for marking an object in two successive frames???? please its very urgent....

Member Avatar for object21
0
55
Member Avatar for Venku Tur'Mukan

Hey, everybody, I'm a newbie at Python (2.7.1), and new to DaniWeb as well. and the apparent simplicity of Python got me interested in programming (seriously, the only thing before this was HTML). Anyway... I was taking a test and thought that after I was finished I could make an …

Member Avatar for vegaseat
0
44K
Member Avatar for UnitedForLife

Hey, I am new to python and was wondering how to import modules? I want to import the datetime module. Do i have to download it from a website? Thanks

Member Avatar for vegaseat
0
103
Member Avatar for novice20

Hi all, I need to set some variables via Pysnmp which take 'unsigned int' only. Is python int by default a 32 bit- signed int? How do I convert it into 16 and 8 bit- unsigned ints? I need to read two registers consequently( which are of 8 bits each) …

Member Avatar for vegaseat
0
9K
Member Avatar for Darion

Well i just bought "python for the absolute begginer" and title says it all. The task at the end of the chapter wants me to print "Game over" and then write something like '\n\nPress the enter key to exit.' which i causes the program with double click however this is …

Member Avatar for Darion
0
367
Member Avatar for confusedman

Hello i am new to python and i am getting increasingly worried. I have a deadline on tuesday and i have to make a game in python. I have tried and tried but i am useless at python. Therefore i have decided to finish off a piece of code that …

Member Avatar for TrustyTony
0
311
Member Avatar for swinchen

I am working on a project that requires me to clean data from a series of RS-232 instruments. These instruments can have a different version number, and output format (both of which can change the expected ouput). On top of that there are flags that determine if certain fields are …

0
139
Member Avatar for pjconrad

I have an issue with my python code and in some cases, users are getting the "IndexError: list index out of range" message. However, I'm not getting the error and it's not happening with every case so it's a bit confusing. I did search the site and found this article …

Member Avatar for TrustyTony
0
1K
Member Avatar for Venku Tur'Mukan

print "Hello, World!" ;) Hi, everyone, Venku (a.k.a Python Newb) here. I just kind of randomly opened up Python today (I do that a lot), and I decided I would finally ask this: What does the "is" statement do in Python 2.7.1 (if the ver# matters)? I checked out the …

Member Avatar for Venku Tur'Mukan
0
798
Member Avatar for macca1111

HI, I have written a small program that uses a while loop to calculate how many years it takes for an investment to double given an interest rate: However, I think there is something minor wrong with the calculation for years, since when testing I put in 100% it should …

Member Avatar for NoddyNUIG
0
4K
Member Avatar for jarograv

[CODE]#created by Jaron Graveley #April 26th, 2011 #This program completes reservations for Jon Von Poechman’s airline in an easy to use program #variable list: #i=counter used to limit the number of seats present on the diagram #n= counter to display the row number on the diagram #num_booked=counts the number of …

Member Avatar for jarograv
0
247
Member Avatar for dare599z

Hello, I'm re-creating the game Riveter using wxPython. I have all the basic fundamental groundwork done, and now I'm just trying to polish certain aspects. I am, however, having problems removing buttons from the screen. I have a panel, with a vertical sizer inside of it. Inside of that vertical …

Member Avatar for dare599z
0
2K
Member Avatar for DYP

i've a problem to split a joining multipe type of file here's my code for joining two diff type file, pict file (jpg) and audio file(mp3) an ouput is pict file contains audio file in it. a problem is how do i check this file is joining file or not? …

Member Avatar for DYP
0
179
Member Avatar for Speleo

Hey all, I'm relatively new to python, just started learning it about a week ago. I've been working on making some small scripts to make learning easier for me. This is a cypher script I've been working on that is based off of the order of letters used on a …

Member Avatar for predator78
0
270
Member Avatar for Krstevski

Hello friends, I searching for "Combination generator" and I found something but not this what I need me... I want to write a script who will generate all possible combination by given string and range of length. e.g. string = "daniweb" length_range (3, 5) The results should be: _____________ ddd …

Member Avatar for Tech B
0
113
Member Avatar for katscandybar

I honestly have no idea what part of the code i messed up on. It says line 94 but there is nothing wrong with that line, i tried all i could do to fix it...maybe someone can help a bit? [ICODE]# Tic-Tac_toe # Plays the game of tic-tac-toe against a …

Member Avatar for woooee
0
154
Member Avatar for kannibalkiwi

okay, i'm stuck on an assignment! (first post btw, so tell me if i'm doing anything wrong please :) ) okay, my assignment is as follows : Write some efficient and commented python code to do the following: Accept an input value between 33 and 126 and convert it to …

Member Avatar for woooee
0
161

The End.