15,190 Topics

Member Avatar for
Member Avatar for aot

Does anyone out there happen to know much about Pydev? It's my preferred IDE (it's the only free IDE that received good reviews when I looked it up), but I'm getting frustrated trying to download some new modules and use them in it. I downloaded and installed the module tkSnack, …

Member Avatar for arsham
0
80
Member Avatar for StrikerX

Hi, I was wondering, how to use python in Visual Studio.NET or Sharp Develop ?? free software i hope :) Writting GUI is great when it's just drag & drop . Thanks in advance.

Member Avatar for Ene Uran
0
125
Member Avatar for Zorbie

Okay, I'll be honest right up front, I'm in a first year Python class and this is a question I'm supposed to write a program for. Here's the question: "Write a program that continually reads in numbers from the user and adds them together until the sum reaches 100." Here's …

Member Avatar for jrcagle
0
268
Member Avatar for Mouche

I know printing primes isn't anything new, but (like always) I'd love to hear some feedback on how I can make my code more efficient and other constructive criticism. [php] def print_primes(r=10): primes = [ ] for i in range(2,r+1): prime = 1 for divisor in range(2,i): if i % …

Member Avatar for arsham
0
137
Member Avatar for fredzik

Hi, The last time I posted I think I asked too many questions and the main reason that I posted got lost somewhere amongst other side issues. The main reason I posted last time is the following: # The following code is not a game, it is configured just to …

Member Avatar for fredzik
0
122
Member Avatar for Matt Tacular

[code]str1 = 'c:\documents and settings\user\desktop' str2 = 'starcraft.exe' print str1[/code] I would like to know how it would be possible to add str2 to the end of str1 with a "\" inbetween the two strings. so that I end up with "c:\documents and settings\user\desktop\starcraft.exe". Thanks

Member Avatar for ghostdog74
0
181
Member Avatar for Matt Tacular

[code]############################################################################ # # # This program seeks out every copy of "starcraft.exe" in the computer # # and deletes them. # # Created by Matt in Python 2.5 May 2007. # # # ############################################################################ import os def file_find(folder): """search for a filename fname starting in folder""" for root, dirs, files …

Member Avatar for jrcagle
0
107
Member Avatar for time4biking

I am writing a program to ssh into another computer on our network. However with the commands ssh, scp etc... terminal requests the password and os.system() seems to open a new terminal window each time it is called. This makes it difficult to enter the password. I have been looking …

Member Avatar for BearofNH
0
125
Member Avatar for Blujacker

Hi, this is my code: [code] # -*- coding: cp1250 -*- import wx class Okno: def __init__(self,parent=None,id=wx.ID_ANY,title="Graf"): self.okno=wx.MDIChildFrame(parent,title="Graf",id=-1) self.okno.Maximize() self.okno.SetAutoLayout(True) self.okno.SetBackgroundColour("#FCFCFE") self.sizer = wx.FlexGridSizer(2,2,0,0) self.canvas = wx.ScrolledWindow(self.okno, id=wx.ID_ANY) self.canvas.EnableScrolling(True, True) self.canvas.SetScrollbars(20, 20, 1000/20, 1000/20) self.sizer.Add(self.canvas, 1, wx.EXPAND) self.sizer.AddGrowableRow(0, 1) self.sizer.AddGrowableCol(0, 1) self.okno.SetSizer(self.sizer) self.canvas.Bind(wx.EVT_PAINT, self.OnPaint) def OnPaint(self, event): pass if __name__ …

Member Avatar for Blujacker
0
193
Member Avatar for pyarticles

Hi all I created [URL]http://pyarticles.blogspot.com[/URL] for Python knowledge. Let's check it out please

Member Avatar for vegaseat
0
60
Member Avatar for bumsfeld
Member Avatar for vegaseat
0
2K
Member Avatar for wandie

I was wondering if you could help me out. I have a list box that has seltext and every time i want to select another item in the list it adds on. for example i select "/hello" then it appears as "/hello" but then i select something else it will …

Member Avatar for LouLouLou
0
164
Member Avatar for StrikerX

hi guyz, i'm a Python user (not so long) , anyway i've read some stuff about lua . i've written function like this [code]def pair(dic = {} ): return dic.keys(), dic.values()[/code] a dictionary is a parameter to the pair function . to use it like this : [code]dic = {1 …

Member Avatar for StrikerX
0
150
Member Avatar for trihaitran

Hi, I'm writing a dictionary program with Turbogears that involves using Chinese text. There is an HTML form that has a dropdown menu, a text field and a button. The input from the form (in this case a Chinese character) is passed to one of my methods. The thing is …

0
58
Member Avatar for 7even

I have a problem with tree control and i don't know how to solve it, maybe someone can help me. What i'm trying to do is display widgets in a staticbox plus a help text when i select different items in a tree. For example when i select item1 in …

Member Avatar for vegaseat
0
220
Member Avatar for lineman60

so when i run this in python interpiter it works [CODE] >>> import os >>> b= os.path.getsize("/path/isa_005.mp3") >>> b 2071611L >>> [/CODE] but when i run it in a script [CODE] b= os.path.getsize("/path/isa_005.mp3") FILE.writelines(b) [/CODE] i get an error. any one know how i can get it to print the …

Member Avatar for mawe
1
547
Member Avatar for Gumster

Well im having a little problem with some tuples or more so about defining which tuple [CODE=python] #Start of my tuples Rock = ("Scissors","Fire","Snake","Human","Wolf","Sponge","Tree") Fire = ("Scissors","Paper","Snake","Human","Tree","Wolf","Sponge") Scissors = ("Air","Tree","Paper","Snake","Human","Wolf","Sponge") Snake = ("Human","Wolf", "Sponge", "Tree","Paper","Air","Water") Human = ("Tree","Wolf","Sponge","Paper","Air","Water","Dragon") Tree = ("Wolf","Dragon","Sponge","Paper","Air","Water","Devil") Wolf = ("Sponge","Paper","Air","Water","Dragon","Lightning","Devil") Sponge = ("Paper","Air","Water","Devil","Dragon","Gun","Lightning") Paper = ("Air","Rock", …

Member Avatar for jrcagle
0
102
Member Avatar for trihaitran

Hi I'm trying to start learning how to use Turbogears but I can't figure out how to install sqlite on my computer. I'm running Mac OS 10.4 and there are no precompiled binaries on the sqlite [URL="http://www.sqlite.org/download.html"]download[/URL] page for the Mac. They do list a cross-platform binaries that is stated …

0
73
Member Avatar for Lapinbriac

My problem may be very simple. I want to use a Tkinter window to show informations to the user, so that he could enter his answers to the Python Shell. The problem is that when the Tkinter Window appears, the Python Shell will no longer receive any command before I …

Member Avatar for aot
0
187
Member Avatar for Lapinbriac

Hello, I would like to save the drawings I have made on a Canvas with the Tkinter Module. Is it possible to make a .jpg or .gif or .bmp from a Tkinter window ? Thank you!

Member Avatar for vegaseat
0
160
Member Avatar for fredzik

G'day, Back again, this time with three problems. The code below contains a white entry box that I'm trying to get rid of. The main reason I'm trying to get rid of it is that the game I'm working on has a scrollable GUI, and with 50 or so frames …

Member Avatar for fredzik
0
2K
Member Avatar for vital101

Hey everyone, I've recently needed to use python to retrieve a cookie from someone visiting my web site. This is all needing to be done server-side, so I will (i think) need to use the Cookie module. I've looked online everywhere, and I'm having a hard time figuring out exactley …

Member Avatar for vegaseat
0
87
Member Avatar for aot

So I would really like to use Python to play some sound files -- it doesn't particularly matter what format, as they're just going to be basic "ping" type noises. However, it seems like whatever advice I find doesn't work out for my situation -- most modules seem to be …

Member Avatar for aot
0
96
Member Avatar for jwjazz

Why does entering the expression 011 evaluate to 9? and 0111 = 73, 01111 = 585, and so on.

Member Avatar for sneekula
0
109
Member Avatar for jwjazz

This function is part of a program to convert numbers between different bases. [code=language] num = 32 b1 = 10 b2 = 2 x = 1 def increasex(num,b2,x): if num%(b2**x) < num: x = x+1 increasex(num, b2, x) else: print x return x print increasex(num,b2,x) [/code] The parameters are the …

Member Avatar for jrcagle
0
136
Member Avatar for leonardo01

Over the past two weeks I have let a lot of negative thoughts creep into my mind and has resulted in the feeling of being lost. I'm working on my visualization again and trying to get back on track. Any suggestions, tips, tricks etc on how to remain in line …

Member Avatar for elizabeth_7w
0
96
Member Avatar for qwerty__123

Hey, I'm having trouble with an exercise from a book, here it is; " Write a program that reads the values for a random list of card from a file,(cards.txt) where each line in the file represents a single card with the rank and then suit seperated by a space. …

Member Avatar for bumsfeld
0
102
Member Avatar for thian_seng

Hi all, Can I know if there's any other way to load and call functions inside a dll, besides using ctypes module? Thanks...... Best Regards Vincent

Member Avatar for bumsfeld
0
89
Member Avatar for nam5a

I was wondering if there is something in python similar to the begin expression in Scheme, and if not how would you write something in python to simulate it.

Member Avatar for nam5a
0
113
Member Avatar for chris99

I've successfully made an engine for a point and click game, but I want to know how to put subtitles so you know what the characters are saying. All I know is how to parent text to a background, do I just need to make an invisible layer with a …

Member Avatar for chris99
0
144

The End.