15,181 Topics

Member Avatar for
Member Avatar for mruane

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 …

Member Avatar for mruane
0
294
Member Avatar for lllllIllIlllI

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. …

Member Avatar for lllllIllIlllI
0
79
Member Avatar for Jigs_ff

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 …

Member Avatar for jlm699
0
125
Member Avatar for l_w

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

Member Avatar for l_w
0
139
Member Avatar for foker500

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.

Member Avatar for jice
0
156
Member Avatar for harrykokil

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 …

Member Avatar for Stefano Mtangoo
0
95
Member Avatar for scru
Member Avatar for strobon

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]

Member Avatar for woooee
0
108
Member Avatar for mruane

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/ '#', '.', …

Member Avatar for mruane
0
68
Member Avatar for besktrap

Hello all. I'm working with pygame and are trying to implement some type of server.

Member Avatar for besktrap
0
104
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Ene Uran
0
526
Member Avatar for aegis042404

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, …

Member Avatar for aegis042404
0
257
Member Avatar for revenge2

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 …

Member Avatar for Ene Uran
0
153
Member Avatar for hasanatkazmi

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?

Member Avatar for Ene Uran
0
68
Member Avatar for starzstar

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

Member Avatar for lllllIllIlllI
0
51
Member Avatar for lllllIllIlllI

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 …

Member Avatar for lllllIllIlllI
0
138
Member Avatar for scru

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.

Member Avatar for Stefano Mtangoo
0
191
Member Avatar for tom_avs

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" …

Member Avatar for Ene Uran
0
87
Member Avatar for whiteflags

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 …

Member Avatar for Murtan
0
77
Member Avatar for The Idiot

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 …

Member Avatar for The Idiot
0
90
Member Avatar for leegeorg07

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.

Member Avatar for leegeorg07
0
121
Member Avatar for madurai07

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 …

Member Avatar for madurai07
0
133
Member Avatar for gabec94

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 = [' ', ' ', ' …

Member Avatar for lllllIllIlllI
0
136
Member Avatar for shadows09

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. …

Member Avatar for leegeorg07
0
183
Member Avatar for MrMark

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 …

0
40
Member Avatar for revenge2

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 …

Member Avatar for Ene Uran
0
123
Member Avatar for adam291086

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 …

Member Avatar for adam291086
0
108
Member Avatar for mitso6989

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() …

Member Avatar for perica.zivkovic
0
422
Member Avatar for wheatontrue

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 …

0
49
Member Avatar for scru

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 …

Member Avatar for scru
0
208

The End.