15,408 Topics

Member Avatar for
Member Avatar for Defcon106

I was looking into a python program for the PSP. Is it worth downloading? Will it help me to learn the program when I dont have a PC handy? Also does anyone know if you can install Python to a portable harddrive and run it from any computer? Thanks in …

Member Avatar for Defcon106
0
76
Member Avatar for gormmark

hia guys i was just wondering if anyone can tell me if its possable to get unicode from a raw_input command. Im trying to put together a small piece of code to help me change decompyled russian text back to readable text, the piece of code im using at the …

0
54
Member Avatar for watermark

I am very new to both Python and programming. I am in need of some help with this small project that I am working on. I have several text files in a directory. I want to compile them into one master file. There is a common variable, x and y …

Member Avatar for linux
1
178
Member Avatar for fredomondi

than for the reply,bt i am using a Nokia N70 platform and not a PC.the python version am using is 1.2. the code i had earlier written but didn,t work is below import appuifw,audio text=appuifw.query(u"type a word:","text") audio.say(text) thanks

Member Avatar for ZZucker
0
29
Member Avatar for mcenley

Hi friends, My problem definition is as follows: Creating a class name called "Kangaroo". 1] An __init__ method that initializes an attribute named pouch_contents to an empty list. 2]A method named by creating put_in_pouch that takes an object of any type and adds it to pouch_contents. The following is the …

Member Avatar for a1eio
0
184
Member Avatar for linux

When you create an interface in Glade, how do you export it as code to Python? Or to you need to import gtk.glade and call all of your widgets that way?

Member Avatar for 1337455 10534
0
60
Member Avatar for fredomondi

hi.could you please help me to write a code in python that can convert written texts into speech. i am using nokia N70 to develop the program . thanks

Member Avatar for vegaseat
0
128
Member Avatar for haukee

Hi there everybody, I really have my difficulties with loops ;) I want to creat a cube with 10 x10 x1 (1 is like thickness, but as I have to create a mesh subsequently I can't do it with geometric properties) Plz help :)

Member Avatar for vegaseat
0
136
Member Avatar for nish88

have you ever heard of pycage.???? i want to have its windows version. if it exist????;) can you please give me the links where i can download it and get some tutorials about it.:P thank you very much

Member Avatar for vegaseat
0
113
Member Avatar for Metahuman

I have to output a collection of strings and integer values such that there is one string followed by an integer in one line. the problem i am having is to arrange it properly on the display Example: I am trying to print: or rather what i am able to …

Member Avatar for BearofNH
1
195
Member Avatar for nish88

hi everyone i'm trying to make an animation and at the end i am getting a rectangle by using lots of small rectangle. it is not so attractive. what i want is that while the animation is being performed,[B] some of the small rectangles that i am using are deleted …

Member Avatar for nish88
0
86
Member Avatar for linux

I'm trying to install a Python module, called PySndObj. I extracted the sources. It uses [icode]scons[/icode], so I tried to install it with it: [code]alex@alex-laptop:~/Desktop/SndObj$ scons pythonmodule=true ALSA=true scons: Reading SConscript files ... Building the Sound Object Library Checking for Realtime IO support... OS is Linux... Checking for C header …

Member Avatar for cigotete
0
197
Member Avatar for strictlycustom

I'm trying to call up the pay, overtime, and totalpay that I get out of the second function. How do I do that? I think that's my problem. I get the following errors when I run the program: [code]How many hours did you work? 50 What is your rate of …

Member Avatar for strictlycustom
0
3K
Member Avatar for kharan

Hello: Please help me to solve this: >>> def printA(): ... try: print a ... except NameError: print 'variable undefined' ... >>> printA() variable undefined >>> a = "foo" >>> printA() foo >>> I tried to do the same think by importing a file "test.py" which has the function 'printA()' …

Member Avatar for vegaseat
0
105
Member Avatar for tsic

hello, In my project, which is about communication between server and client, we want to test the Request of the client. All requests and answers are from the beginning saved in a file.txt When the server is executed, we want to import these data to a table to facilitate the …

0
58
Member Avatar for a1eio

Hi, I'm wondering how your supposed to find out a widget's width in tkinter.. Little example code to explain (doesnt do anything at all) [code=python] class CustomWidget(Tkinter.Frame): def __init__(self, master, **kw): apply(Tkinter.Frame.__init__, (self, master), kw) self.masterWidth = # ???? Totally stuck, tried obvious things like master.width class MainWindow(Tkinter.Toplevel): def __init__(self, …

Member Avatar for a1eio
0
183
Member Avatar for Laurence26

I was wondering if you could add new fonts to pygame and how you should do it. Does any one know how to do it?

Member Avatar for a1eio
0
100
Member Avatar for linux

Hey, I'm beginning to write a MIDI-sequencer/sampler kind of application (ie: LMMS, FL Studio, RoseGarden) that relied solely on ALSA. Not JACK. However, if I distribute the application, I wouldn't want a huge application due to uncompressed WAV samples in the piano roll (this would be a pseudo-synth). So does …

0
67
Member Avatar for msaenz

Greetings, I have this date string that is given to me from somelses code 20080326 and I want to convert it to be MMddYYYY and I get this error: Caught Exception: ValueError:time data did not match format: data=20080326 fmt=%m%d%Y File "/home/gateway/scripts/python/py-allston.egg/main_template.py", line 91, in decorated_main File "db.py", line 24, in …

Member Avatar for msaenz
0
74
Member Avatar for terron

I'm trying to make something that once it is disconnected will automatically try to reconnect. I'll add some more features in later so it doesn't hammer the server but right now I just want to keep it simple and get that part working. The problem is that when I use …

0
70
Member Avatar for sam210

Okay, so I am creating a password storage system. I have everything but a few last functions. I need to be able to search for different sites and view all sites in a choicebox. for editting. I've tried a few different things but I just can't get it. the first …

Member Avatar for sam210
0
166
Member Avatar for linkrulesx10

I am undergoing a school project, which is a projectile calculator and graphing. Now I do not want any code or tips or anything as I think I am going well however one issue I am unable to resolve is how to generate a graph. I have spent an hour …

Member Avatar for woooee
0
161
Member Avatar for tsic

Bonjour, Dans la communication serveur client que je traite je veux faire de telle sorte que lorsque le client envoye une commande le serveur lui envoie la réponse appropriée. Les commandes et les réponses appropriées seront stockées dans un fichier .txt. Au démarage du serveur, il doit stocker les données …

Member Avatar for bumsfeld
0
186
Member Avatar for Nessie

Yep, Nessie as in the monster...;) Name: Geoff Nickname: Nessie, Munter Height: 171cm Weight: 80kg Hair: Not much left...but what's there is brown... Eyes: Blue Location: Wellington, NZ Age: 33 Hobbies: Playing with my two daughters, gaming, guitar, fiddlin' about wif computers, learning Linux, C, Python, Ruby Relationship Status: married …

Member Avatar for zandiago
0
107
Member Avatar for $nipa

i was wondering what language would any 1 recomend for some one interested in learning programming. I am out of school i am 17 and i want to learn how to program i dont know what i want to start with i heard that its good to start with C# …

Member Avatar for ronicasingh
1
354
Member Avatar for mcenley

Hi friends, I have written a function which inverts a dictionary. The code is as follows: [code=python] def histogram(s): d={} for c in s: #print c, d.get(c,0) d[c]=d.get(c,0)+1 return d def invert_dict(d): inv={} for key in d: val=d[key] if val not in inv: inv[val]=[key] else : inv[val].append(key) return inv hist=histogram('parrot') …

Member Avatar for mcenley
0
185
Member Avatar for charper

On the risk of sounding extremely stupid, Does anyone know how to print a string representation of an exception. i.e. just the type of error? I have code that catches all errors and would like to then print the type of error as a string. My code is: [CODE=perl]def catchException(): …

Member Avatar for charper
0
72
Member Avatar for gwarguy

Howdy, hoping I can get alittle help today. First off I have a real bad habit of learning one thing, and getting very fascinated by it and going off on a tangent using what i learned in as many ways as I can think of. Im a very new person …

Member Avatar for linux
0
157
Member Avatar for StepIre

Hi Guys, Im having trouble with my prog.. basically i have a file with lots of details in it. I want to find every time the file says for example "blah" Than i want to find the next occurence of "notblah" and i want to use the information between these …

Member Avatar for ZZucker
0
84
Member Avatar for mcenley

Hi friends, I am trying to write a histogram function in Python. This is what I have managed so far: [code=Python] def histogram(s): d={} for c in s: if c not in d: d[c]=1 else: d[c]+=1 return d h=histogram('brontosaurus') print h [/code] However, I want to use the get() function …

Member Avatar for mcenley
0
158
Member Avatar for gwarguy

Howdy, Im a beginner to programing and Ive chosen python as my first language to learn. I have recently completed my first "non-tutorial" code. I wrote a book modeled after the old "Choose Your Own Adventure" books. When ran it asks for your name, and puts you into the story, …

Member Avatar for sinkingships7
0
96
Member Avatar for xRuP7uR3x

Greetings once more. I have been working on a script to convert a user provided number in basetwo and convert it to baseten. What I've got so far: [code=python] myinput = raw_input("Enter a binary real number: ") (myint, myfrac) = myinput.split(".") x = int(myint[0]) y = 0 t = len(myint) …

Member Avatar for woooee
0
122
Member Avatar for random7

I have a question about reading array from file. I wrote some array at file like below. file name: xy0.dat [2, 4, 6] [4, 8, 12] ... ... Now, I want to read this array(not string) at my original file. I want to define x0[0] = [2,4,6] and x0[1] = …

Member Avatar for vegaseat
0
2K
Member Avatar for aot

I'd like to be able to make a slider widget without the knob that users can click and drag -- that is, I want the user to simply click somewhere on an empty slider and *then* have the knob appear where clicked. Is this possible with either Tkinter or wxPython? …

Member Avatar for Ene Uran
0
266
Member Avatar for 1337455 10534

I need to convert .docx files to .doc (on Linux and Windows). I'm planning to use the zip mod to access all of the internal XML documents. Then I'll the /word/document.xml and I need to parse it so that it will read all of the text in the tags, place …

Member Avatar for 1337455 10534
0
140
Member Avatar for lucym

Hello, I want to add the 'did you mean' feature (like on Google) on my shareware site, where a lot of users have mistypes, and they get 0 results... so they exit the site very fast. Do you have any idea how I could implement such a thing? Does it …

Member Avatar for BearofNH
0
111
Member Avatar for rmurphy1061

I am having a problem reading a date format in a file I am trying to count the difference between two dates. the format I have is 010108. I tried to break up the date mmddyy but have run into other errors. [CODE=python]import datetime as dt # US format month/day/year …

Member Avatar for vegaseat
0
131
Member Avatar for knish

Hi, The following works. import maya.cmds as cmds def importImage( fileName, fileType): cmds.file( fileName, i=True ); return 1 cmds.fileBrowserDialog( m=0, fc='python("importImage")', ft='image', an='Import_Image', om='Import' ) However in the following situation it does not work. The error is ================================================== ==== Cannot find procedure "importImage". Start of trace: (command window: line 1). …

0
66
Member Avatar for Mike W

I'm currently writing a set of small scripts for a web page. I've retrieved the GET variables using cgi.parse_qs and the query string, but can't figure out how to access the POST variables. I know you can use FieldStorage to access both GET and POST variables, but would like to …

0
56
Member Avatar for papaJ

Hi, I'm writing in python for s60 (nokia cell.) and working with Canvas and Image, while i'm moving through the image using: [CODE]canvas.blit(image, source=((sourceLocX, self.sourceLocY), (sourceLocX+ canvas.size[0], sourceLocY+self.canvas.size[1])))[/CODE] i can't seems to zoom in/out, I looked into Image and Canvas documentation and still don't understand how to do that... anyone …

Member Avatar for papaJ
0
99
Member Avatar for petersrin

I am very new to programming in general, and of course, it follows: to Python. Yet, I am in desperate need of a particular database program, and I am attempting to write it via objects, since I need to learn the ways of OOP anyway. I am currently trying to …

Member Avatar for petersrin
0
148
Member Avatar for StepIre

Hi All, I am writing a little program that i should be able to get working i think! basically i have this file full of content and i want to search it for a list of words. And add to a score variable each time i find a word [CODE] …

Member Avatar for woooee
0
91
Member Avatar for izzybitsie

my Python program retrieves an html doc containing a link that looks like: [href="" onclick="return somefunc('someid')"] where somefunc is embedded in the html doc downloaded How can my program "click" in such link and get the new html doc.? Tx

Member Avatar for jrcagle
0
44
Member Avatar for alivip

when I wont to inser (anyting I print) to the textbox it will not inser it just print then hanging [CODE]# a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to paste, and ctrl+/ to select all # count words …

Member Avatar for jrcagle
0
699
Member Avatar for fongoos

I am very new to both programming and Pyhton and while trying to do some practice using A byte of python an Error pops up on the IDLE shell. I am using windows XP. PLease see below. [code=python]number = 30 guess == int(raw_input("enter an integer:")) if guess == number: print …

Member Avatar for 1337455 10534
0
499
Member Avatar for rysin
Member Avatar for rysin

During my quest to learn pygame I came across a tutorial that was really helping me through. However I came across a piece of code that has confused me. Being that this tutorial has a very vague explanation on each of the snippets, I need someone to explain this to …

Member Avatar for Ene Uran
0
144
Member Avatar for aot

I was wondering if it's possible to show videos via a python GUI -- preferably quicktime videos, but any format would be a start. If it's not possible to play them from within the GUI, is it possible to at least have the person press a button that will automatically …

Member Avatar for linux
0
106
Member Avatar for Uncle_John

hey, is it possible to make a python program that could interact with internet, for example a program that could make a search on google. If it is possible then how could i do that?

Member Avatar for wwwalker
0
171
Member Avatar for rysin

If I have something like this [CODE] a = input("Number: ") b = 2 + a [/CODE] How do I make the answer of b the name of a file? Thanks!

Member Avatar for 1337455 10534
0
134

The End.