15,181 Topics
| |
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. |
Hi, I want to read a line in the file and check the content in the line, for example if the line starts with the text "sample test ..." i want to check wether the line starts with sample, but my code always return no result even thou the file … | |
Hi, I am trying to write a connect four program in python, which I am not very experienced at. This is what I have so far: [Code] row7 = [' ', ' ', ' ', ' ', ' ', ' ', ' '] row6 = [' ', ' ', ' … | |
I have no idea how to get started -Prompt user for an integer -If the number is even, divide it in half - If the number is odd, multiply it by 3 then add 1 - If the number reaches 1, stop; otherwise go to step 1 -Use while loop. … | |
G'day I'm currently using socketserver to build a simple XMLSocket (an XML based protocol used for communication between flash and the outside world) server. I've got flash establishing a connection, sending a request and my python server responding. However at this point socketserver terminates the connection. Which is bad, since … | |
Having trouble understanding using wxPython....:?: [CODE=Python] import wx class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,wx.ID_ANY, title='Hello wolrd') self.buthello = wx.Button(self, wx.ID_ANY, label ='helo') self.buthello.Bind(wx.EVT_LEFT_DOWN, self.helloevent) self.Show() def helloevent(self, event): msg = 'hello' msgbox = wx.MessageDialog (self, message = msg, style = wx.OK) if msgbox.ShowModal() == wx.ID_OK: msgbox.Destroy() app = wx.App(redirect = False … | |
I am trying to print out some database resutls as follows [CODE] cursor.execute("SELECT * FROM User") numrows_user = int(cursor.rowcount) i_user = int(0) Results_user = cursor.fetchall() while i_user < numrows_user: print Results_user[i_user]["ID"] [/code] Put i am getting nothing i know i_user is working and i know there is information in the … | |
Looking for some help catching flash as3 POST command with python. Anyone done this? below is my AS3 Code:(I have on pretty good authority that this part is right) [code] function savedata(event:MouseEvent):void { trace ("i've been clicked"); var myData:URLRequest = new URLRequest("user_info.py") myData.method = URLRequestMethod.POST var variables:URLVariables = new URLVariables() … | |
Dear all, I downloaded a google API interface from [url]http://blackcodeseo.com/google-search-api-for-python/[/url] pretty nice. I was sad to hear that google wasn't giving out access keys anymore for their API, but this one seems to work well despite that - I don' t really know all the details, I just plugged-n-played. The … | |
I noticed a weird thing happening when i use this function. If the page i open is in latin-1 encoding, the bytes returned by this function would have some weird junk characters inserted in various places. However, if i use urlretrieve to fetch the page to disk, there is no … |
The End.