15,190 Topics
![]() | |
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, … | |
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. | |
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 … | |
![]() | 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 % … |
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 … | |
[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 | |
[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 … | |
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 … | |
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__ … | |
Hi all I created [URL]http://pyarticles.blogspot.com[/URL] for Python knowledge. Let's check it out please | |
How do I best get a full display screen window using wxPython? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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", … | |
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 … | |
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 … | |
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! | |
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 … | |
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 … | |
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 … | |
Why does entering the expression 011 evaluate to 9? and 0111 = 73, 01111 = 585, and so on. | |
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 … | |
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 … | |
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. … | |
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 | |
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. | |
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 … |
The End.