15,190 Topics
![]() | |
![]() | |
I know python has math functions like 5+6 and 5*6 and 5/6 etc...but I have something like this: x=575124357 and need to add them all together: 5+7+5+1+2+4+3+5+8=40 | |
This function is supposed to take an integer that contains an rgb value, extract the value of each channel, and then return that calculated luminance of the pixel. As it stands, the performance of this function is not fast enough. Looking at it, I can't think of anything else that … | |
I have a randomly generated list of which contains letters, symbols, and numbers and need to separate it into 2 lists -one of numbers and one of the remaining chars. Then I need to separate the numbers into 2 lists-one of composite numbers (4,6,8,9) and one a list of prime … | |
I am hoping to create a pixel based rpg game with the story depth of the elder scrolls series, with graphics similar to PixelMan 3 by pymike, (pygame.org/project/712/). If anyone is interested in helping, let me know! I am a basic level python programmer, so am using this project as … | |
Hi.....I have a long string of letters and symbols and I need to increment their ascii value by 1. How can I do that? Here's an example of the string: s="p@ugdyhtapbcedoamguh?a#vdaxdv$zdoxw?pu$exrbzt evk#n$xjlgpmece??$$@@yyiw##rmn$nmrblruv ?azxdsoh#$@nndkkt?k@ihatywtbazgbq#ykshx" so like # becomes $, etc | |
Hi, i want to run a python script from another python sript as a new process. i have tried with spawn functions of os module but it didnt work. i guess these functions work on only Linux. how to create a new process on windows platform.. | |
Could someone please point me to a good example of user forms and how to get data out of them for Python 2.3? | |
I am trying to use binascii to convert this: [code=python] town1 = """ ++++++++++++++++++++++++++++++++++++ +-------------------------------------------------------------+ +----------H-----------H----------H---------H--------------+ +----------&---------------&---------------------------------+ +------------------------------------------------------------>+ +----------------@-------------------------------------------+ ++++++++++++++++++++++++++++++++++++ """ [/code] into the type of graphics used in PyMike's PixelMan 3, found at pygame.org. I looked at the document on python.org telling about binascii and a little bit about … | |
I would like to use pickle() to save the stats, progress, and location of a player in my text adventure. I know that pickle() write an object to a text file, and that file can be later recalled to load the information. My curiosity is, would I be able to … | |
Hi For one of my programs i want to be able to graph the performance of things in a graph. The thing is that this graph constantly made a little bit longer with every second that passes. So i was wondering what paintDC to use. And how to use it. … | |
Hi All, I am new to programming world, i wanted to make a script which will create folder when counting of files breaks. for Example- 1) I have 1000 no of jpg files in a single folder.(but ) 2) but these files has a number break in between. (like it … | |
Python 2.3.7 has the following functions as number converters: float(num), int(num), long(num). But what happened to double(num)? If my number is a=3.33333 and do round(_,2), the output I get is 3.3300000000000001. I was expecting to see 3.33. What’s happening to here? Thank you. liliya | |
This is probably a newbie question but I've figured out how to connect and query a microsoft access database via ado, but I can't figure out how to export the tables......need to export them to dbf???? Any help would be greatly appreciated. | |
hi guys i have a small problem. the cars in my program collide against each other. it works when i don't have any class car. but now there's some confusion with the speed of the car. ive worked for hours on this but no solution found. i hope u guys … | |
And please don't tell me it's not possible. | |
can somebody give example python script that execute debian package when button is clicked. here is the example picture (i`ve created the glade files with Glade Interface Designer): Thanks for any attention.A little help would be usefull, since this program is to help those who tottally offline. [ATTACH]9031[/ATTACH] | |
Hi, I am trying to create a simple roguelike-like, a game with graphics similar to roguelikes, with a few extra twists. I am trying to create a dungeon using a list, here is the code... [code=python] background = ['#', '#', '#', '#', '#', '#', '#', '#', '#' /n/ '#', '.', … | |
Hello all. I'm working with pygame and are trying to implement some type of server. | |
I have been working with bass.dll from [url]www.un4seen.com[/url] as audio library and I can say that it is great. But I have reached a place where I hitted the wall and it will take time for me to move. Can anyone suggest for me a dll library for playing audio … | |
Hi, I'm new, so please bear with me. I'm working on a memory card game in wxpython, using gui bitmap buttons. I need to change the bitmap from the "face down" bitmap to another bitmap when the button is pressed. (and to wait for a second button to be pressed, … | |
how do you manipulate text files.. [CODE=Python] import urllib2 dload = urllib2.Request('http://tvnz.co.nz/content/tv2_listings_data/portable_listings_skin') text_file = urllib2.urlopen(dload) text_file_read = text_file.read() print text_file_read f = open ('site.txt', 'w' f.write(text_file_read) f.close()[/CODE] This returns the page and saves it as text file, but how would i do the following things.. -delete lines of texts, for … | |
Hello, I am programming in Python for quite some time now but I am struck in a simple problem. I want to change icon of folders programatically. Any idea how to do this? | |
I am new to Python programming, I want to create a command line application that which can be used for backing up the data on a server and restoring it back when needed. Please help me starting this.. Thanks | |
Hey i was wondering if there was any way to convert a 24 bit Bitmap into a 256 colour bitmap using PIL or something simillar. I found something like: [code=python] image = image.convert("P",color = Image.ADAPTIVE) [/code] But i couldn't work out how to make that work. So yeah any way … | |
How can I install pygame against the 64 bit version of python for windows? I tried the regular win32 package but imports don't work. | |
Hello. I have a question and I need it's naswer. I am new begginer with Phyton, and I would like to know how I get from table that located in DB (Oracle), a specific value into my Phyon varaiable. Say I need to get from table in DB named "W_Keys" … | |
So I was going through the Projects for the Beginner thread. I settled on this: "For $2 you get to throw four dice. If the sum of the faces is less than 9, you win $12, otherwise you lose your investment. Should you play this game?" Simple enough: [code=python] def … | |
I’m building a tagger that searches through a corpus of IM data and tags any instances of words that occur on a wordlist. I've run into a problem and was hoping to find help. I'd like to try and understand exactly why it's not working, so I've laid out everything … | |
![]() | hi again i have been assigned a project to create a web crawler in python but i have no idea where to start so all help will be welcome. ![]() |
The End.