15,190 Topics

Member Avatar for
Member Avatar for Stefano Mtangoo

Hello All Greetings I want to use Lame enc windows DLL procedures. I'm not very dipped in DLL things but it is that I want to use it in my Encoder. Any way can I use it in python?? Also Any suggestion on CD ripping library and Vobis/Ogg/Flac/wma encoder library …

Member Avatar for Stefano Mtangoo
0
200
Member Avatar for ihatehippies

Im trying to write a script that can return directions to an address from google. I've looked over urllib for a while and I cannot figure out how to send the information to the server and then retrieve the directions.. any ideas?

Member Avatar for ccandillo
0
265
Member Avatar for Prahaai

Good day. I wanted to share with you the code for an application I've created. It can read the number of pages in all the PDF files from one directory. The question I have is this : does it need more optimisation ? Can I make it work faster ? …

Member Avatar for Prahaai
0
4K
Member Avatar for OB_

Hi there, new programmer/python user here. What I'm trying to do, is simulate the rules of a tabletop RPG (not nerdy in the slightest). This is using a 10-sided die. In the game when you roll a 10 the dice "explodes" and you roll it again and add the next …

Member Avatar for Gribouillis
0
77
Member Avatar for dseto200

What's the command that allows you to do that. The chapter that i'm reading lists slicing, but I don't see how that helps if you don't have a fixed value of the word. [Code=Python] # Program that gets a message from user and computer prints it out backward. message = …

Member Avatar for dseto200
0
223
Member Avatar for rastaberry

Greetings, I would like to make a programm that would generate a long string of numbers or characters in the way that the user firts states how long the so called word should be (let's say 10 000) and will also state the rules for creating the word: i.e. 1 …

Member Avatar for rastaberry
0
86
Member Avatar for goldsm

I am writing a program using Python and the PYOpenGL3 library. I am trying to use PY2Exe to create an executable version of my program. However PY2Exe does not support PYOpenGL3. Is there an alternative to PY2Exe I can use? Basically I need a way to create an executable version …

Member Avatar for vegaseat
0
90
Member Avatar for Bouzy210

I am trying to write a script where it traverses the current folder and all subfolders and files and prints to screen the name of the files, filesize, and date last modified. e.g. test0.xml | 26 bytes | 11/21/08 23:35:28 (I can get it to do this) Folder/test1.xml | 26 …

Member Avatar for Bouzy210
0
115
Member Avatar for ping24

Hi Guys, I want to write a parser in python. But I am not able to understand that what could be the starting point(some urls and references) so that I can write simple parsers. I just want to have some basic ideas on py parsing methods and techniques. Well I …

Member Avatar for Gribouillis
0
75
Member Avatar for ccandillo

OK, this may be a dumb question but I'll ask anyway. I am starting to see the benefits of using classes. Most notably code reuse, inheritance and overloading. Shoud I still be writing fuctions in my scripts or do classes make them obsolete? Is there a rule of thumb that …

Member Avatar for Stefano Mtangoo
0
139
Member Avatar for tomtetlaw

I'm making a text game and im making a save() and load() function i'v got the save function to work but i dont know how to change varyables in the program depending on the varyables in the text files. heres the code for the functions: [code=python] def save(): openfile = …

Member Avatar for tomtetlaw
0
101
Member Avatar for payne_99

Hello! I'm trying to execute a simple script in the command line, and for some reason, it's not working. Shouldn't it be as simple as this? [code]python myscript.py[/code] And yet when I try that, I get "Syntax Error: invalid syntax" I've googled around, read through the docs--I have a feeling …

Member Avatar for lllllIllIlllI
0
125
Member Avatar for MaracKoMarac

Hy all. I'm beginner in Python ( started to learn it before a week and a half), but since I already know MSWLogo, python is easy. So, I created a fighting-text game called: PythonFight. Features: -10 fights -4 normal kicks and 1 special -rage -bonuses after round. Please download and …

Member Avatar for numonic
0
53
Member Avatar for mrkuchbhi

hi! i have a program which makes use of threads(threading module) it runs fine when i run it using python(2.6).. however when i create an exe of the file(using py2exe) and then run it, the following error occurs.. [code]Unhandled exception in thread started by error in sys.excepthook: original exception was: …

0
75
Member Avatar for overmind

hi everyone, can you please help me out. what i want is to have a server that listens to a single port for clients to connect using tcp. this is located in a thread. if one client connects, it would relocate this connection to another thread so that the first …

0
63
Member Avatar for ihatehippies

Does anyone know how to convert an instance to unicode? I understand how to convert a string into unicode format u=unicode(s, 'ASCII', ignore), however this assumes that s is already a string and converting s by the str(s) method will kick back an error if s contains unicode unfriendly. The …

Member Avatar for ihatehippies
0
119
Member Avatar for thanatosys

Ok I will post all of the code at the bottom, first thing however is the loop below starts at 0, then increments to 1, but never increments any further. [code=python] for counter1 in range(fieldlength): if self.__fields[counter1] == field: for counter2 in range(rowlength): #print self.__rows[counter2][counter1] if self.__rows[counter2][counter1] == value: return1 …

Member Avatar for thanatosys
0
160
Member Avatar for Stefano Mtangoo

As simple as question is; What GUI toolkit do you use and why? Why didn't you used the rest? Here are GUIs I know of: [LIST=1] [*]TkInter [*]PyQT [*]PyGTK [*]Wxpython [/LIST] You can Add If you have one that isn't Listed

0
72
Member Avatar for adam291086

I am trying to create an authentication script. I am trying to use the PASSWORD function within Mysql but it wont work. Any ideas [CODE] #!/usr/bin/python # e begoli, python connector for mysql # import MySQL module import MySQLdb import cgi print "Content-type: text/html\n" # connection db = MySQLdb.connect(host = …

Member Avatar for adam291086
0
121
Member Avatar for wangzi

So here's my question. I'm new to python and am near lost. I've been through a few tutorials and still don't feel confident. Sure I can do whatever the tutorials say, but it's a different story when I do the whole thing myself. Here's what I would like to do …

Member Avatar for wangzi
0
95
Member Avatar for leegeorg07

hi again i have two questions: firstly do you know if win32 and other add-ons for python are released for python 2.6? secondly my whole computer is messed up and i want to create a program that will search through a selected folder or folders and will move any items …

0
47
Member Avatar for Stefano Mtangoo

I have code but when I want to gather my widgets under same wx.StaticBox I fail. I wonder what is wrong! Please someone to corrrect me! [CODE=python] #Add static box to hold related widgets--- it otherwise does nothing holder1 = wx.StaticBox(mpanel, -1, label="Transactions", pos = (10, 10), size = (300,300)) …

Member Avatar for Stefano Mtangoo
0
138
Member Avatar for Devlan

I'm trying to get to grips with using files, particurlarly saving a set of inputs from the user into a file and then load it all back up again. I have a program which, through a little object oriented interactivity, allows the user to pair up names and numbers in …

Member Avatar for vegaseat
0
122
Member Avatar for Feenix45

Its about the pay system of a shop. The user enters a product ID,the interpreter gets the details from the file and appends it to a list and continues till the products are over. If the user can't enter the ID he can add the product name directly which will …

Member Avatar for Feenix45
0
157
Member Avatar for ccube921

I only made an on and addition button with actual functions[ICODE] #!/usr/bin/python # gridsizer.py import wx app = wx.App() class GridSizer(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(300, 250)) def On(self, event): x=input("") def add(self,event): return x y=input("") print x + y menubar = wx.MenuBar() file = …

Member Avatar for ccube921
0
117
Member Avatar for DATA777

I am learning to create a database with python. I am using this line of code to populate my table T.insert(2, 'Jones', 'Jack', 15, False, 0.0) And the table is created as follow: T = SDBTable('id=ui', 'last', 'first', 'age=i', 'married=b', 'salary=f') I have a class SDBTable and in it there …

Member Avatar for jlm699
0
107
Member Avatar for jcafaro10

Hello, I'm using Java and Python together with Jython and I'm having trouble with some python syntax. I have a custom listener that I want to add to an object. Usually I'd do it like this: class ballCollisionListener(animation.CollisionListener): def collisionDetected(self,event): if event.getSource()==boundary: if ball.getX()<=0 or ball.getX()+ball.getWidth()>=boundary.getWidth(): ball.setXSpeed(-ball.getXSpeed()) elif ball.getY()<=0 or …

Member Avatar for jlm699
0
111
Member Avatar for chebude

I was trying to write the output of a loop on a file. The problem is the writing repeats for each loop. [ICODE]prev_line = "" while line: Total = 0 fields = line.split() N = len(fields) name = fields[0] #sum each 5 fields over the raw: for step in range …

Member Avatar for chebude
0
85
Member Avatar for Fionageo

Hello I am quite new programming in Jython, I am working with DB. I a send SQL Statements, but I want to handle the zero rows in Resulset. rs = dataSource.performQuery(sqlstatement) rs.moveFirst() I dont know which condition has to be set when the Resulset doesnt has any row. When I …

Member Avatar for bvdet
0
149
Member Avatar for Devlan

I've gotten a little bit furter in understanding the general workings of python, and currently I'm fidgeting with classes and objects. I was thinking of the possibilities of having a program with a whole bunch of user defined classes that the user can use (hey, almost a repetitive aliteration there...) …

Member Avatar for Devlan
0
98

The End.