15,175 Topics

Member Avatar for
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
122
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
420
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
Member Avatar for apolo_x

Hi! I want to get information from a sports web site (ex:[url]https://www.bwin.com/pt/futebol)[/url], and I already tried htmllib and some other stuff.... the problem is that I can get the page's source code but not the same information that I can see in my browser. Particularly, I'm interested in the teams …

Member Avatar for Stefano Mtangoo
0
218
Member Avatar for tillaart36

Hello, I'm writing my code into the 'vizard python editor' and sometimes it feels a bit bugged or something, now I get an error message that my class has no attribute. I feel it has to do something with editing in vizard because in other editors I don't think i …

Member Avatar for jlm699
0
36K
Member Avatar for adam291086

I have a third party sending me some infomaion. They say to use php $_post to recieve the information as follows [CODE]<?php //include the database handling class include("mysqlclass.php"); //Assign POSTED variables $destination = $_POST['gwNumber']; $originator = $_POST['originator']; $message = $_POST['message']; $smsTime = $_POST['smsTime']; $timeZone = $_POST['timeZone']; $network = $_POST['network']; $id …

0
87
Member Avatar for Carlo Gambino

Hello, I have been using the python challenge to teach myself python as my first programming/scripting language outside of HTML. As I go along, I find that while I'm understanding the concepts rather well, I am not being as efficient as I could be. While the code I whip up …

Member Avatar for Stefano Mtangoo
0
134
Member Avatar for demeryjo

In my programming class, we need to write a program where the user is prompted for a value. Once that value is provided, the program is supposed to multiply its digits. For example: if the user typed 1234, it would multiply 1*2*3*4 and give the answer. I'm not sure how …

Member Avatar for Stefano Mtangoo
0
105
Member Avatar for besktrap

does anyone know how to shutdown a computer on windows XP (using python of course ;) given the IP address and the computer name (probably don't need it, though)? I don't want to use os commands like os.system("shutdown -i"). Thanks in advanced!

Member Avatar for mn_kthompson
0
107

The End.