Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
80% Quality Score
Upvotes Received
11
Posts with Upvotes
7
Upvoting Members
6
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts

74 Posted Topics

Member Avatar for a1eio

Hey, Just a simple question really, i was looking through the documentation for python and i couldn't find anything that did basic cd drive things, like ejecting it and stuff. The one module i did find 'cd' was only compatible on IRIX systems. After failing miserably on google i was …

Member Avatar for Mahmoud_16
0
5K
Member Avatar for vegaseat

I program for a hobby, not a job (yet) so i have a severe hunger for ideas, this thread is great and i would like to contribute, Here are some ideas that might give someone in my situation something to do: This is an extract from a song by pink …

Member Avatar for vegaseat
20
18K
Member Avatar for sneekula

I personally always use the root.destroy() method, it seems to work best and I've never had any problems with it.

Member Avatar for entropicII
0
45K
Member Avatar for acrocephalus

what do you mean when you ask how to make the program show the paths to the selected folder and file. Do you want to show the file's contents, show an explorer window of the file's location or some sort of tree view of the file?

Member Avatar for ronkalycarlos
0
18K
Member Avatar for pato

[url]http://bembry.org/technology/python/index.php[/url] Has a whole quick tutorial and it has notes on all the main topics it covers, so you can read it, or use it as a reference, i found the Tkinter section wickedly useful as a starter into gui stuff, it also has some exercises.

Member Avatar for PythonHelper
0
1K
Member Avatar for caribedude

try GUI2exe, it's a gui wrapper for py2exe. [url]http://xoomer.alice.it/infinity77/main/GUI2Exe.html[/url]

Member Avatar for patratacus
0
2K
Member Avatar for Micko

Yea but Micko has a point. it does suck when you want to take a simple short and sweet program you made with python to school or an internet cafe or any other place where you are not allowed to install stuff, i mean py2exe is good but whenever i …

Member Avatar for darkside2205
0
327
Member Avatar for trihaitran

I'm not sure if I'm reading your question correctly, but if you want to open a file that's in the SAME place as your .py script that opens the file, you don't need to set any form of path name. You just type in the name of the file on …

Member Avatar for dev.vini
0
735
Member Avatar for a1eio

Hi, all you daniwebber's!!! Simple (ish) question, AI seems to be a really cool subject, the one problem for me is that i havn't a clue at all what it is and how it works (more to the point, how i could learn to implement it) So i'm just wondering, …

Member Avatar for rico001
-1
278
Member Avatar for a1eio

Hi, I was wondering how someone would go about making a scrolling ticker or marquee using Tkinter in such a way that allows you to easily add on text and remove.. kinda like a news scroller on the bottom of the tv? thanks all a1eio

Member Avatar for donnie6680
0
1K
Member Avatar for kc0arf

school rules concerning computers suck. I have never met a schoo technician who is GOOD at his/her job, They always impose ridiculous restrictions for example at my school you can't even check the time on the windows startbar?? wtf?? In my opinion it provokes students to "mess" with the system …

Member Avatar for goldeagle2005
0
325
Member Avatar for a1eio

For more information on threading read this [B]excellent[/B] 4 page tutorial: [URL="http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/"]http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/[/URL]

0
398
Member Avatar for eggowaffles

don't hijack eggowaffles thread ramakrishnakota, if you need help and it's not related to this guy start a new thread

Member Avatar for mrnutty
0
148
Member Avatar for a1eio

i've made a little animation using python and the pygame module, I'm just wondering if it's possible to turn that into a screensaver? is there a format i have to save it to? If anyone knows i would be grateful for the solution thanks, a1eio

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for inkcoder

[code=python] encode = lambda txt: ".".join([str(ord(letter)-96) for letter in txt if ord(letter) in range(97,123)]) decode = lambda txt: "".join([chr(int(char)+96) for char in txt.split(".") if int(char) in range(1, 27)]) [/code] Output >>> [code] >>> encode('this is a message!!!') # anything not lowercase a-z gets silently ignored '20.8.9.19.9.19.1.13.5.19.19.1.7.5' >>> decode('20.8.9.19.9.19.1.13.5.19.19.1.7.5') 'thisisamessage' # …

Member Avatar for a1eio
0
140
Member Avatar for The_Rick_14

Google have this thing called the Google App Engine. [quote] Google App Engine lets you run your web applications on Google's infrastructure. ... Google App Engine applications are implemented using the Python programming language. The runtime environment includes the full Python language and most of the Python standard library. [/quote] …

Member Avatar for The_Rick_14
0
183
Member Avatar for s_jmp

when you create a socket, you need to bind it with a port, address so other sockets have something to connect to. [code=python] sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind((address, port)) [/code]

Member Avatar for a1eio
0
66
Member Avatar for Azurea

Hmm.. Well strangely enough it works on my machine (XP) From idle and from cmd. Not sure what the problem is, but if you need to get the address of a messege sender then just do that in the thread (if it's sockets it will be safe)

Member Avatar for Azurea
0
109
Member Avatar for tondeuse34

python has a keyword function [icode]in[/icode] that would be useful in your example. [code=python] if password in pass_list1: # do something [/code]

Member Avatar for tondeuse34
0
125
Member Avatar for swaroopk85
Member Avatar for a1eio
0
46
Member Avatar for Azurea

there must be something else going on. When you make a copy of a list [icode]list2 = list1[:][/icode] it fills list2 with list1's values, but when you change either list1 or list2, the change isn't mirrored so list1 would stay the same if list2 was changed. Are you sure your …

Member Avatar for Azurea
0
92
Member Avatar for rodG

You should definitely use tkinters .after() function, it enters a local event loop which means it doesn't block your program. [code=python] def blink(self): if not self.stop: # check self.stop is false before proceeding print 'looping',self.stop self.label.configure(bg=choice(COLORS)) self.label.update_idletasks() self.after(100, self.blink) # after 100 ms, call function self.blink [/code] choice is a …

Member Avatar for rodG
0
4K
Member Avatar for lllllIllIlllI

Well you could just use a Thread object to do the counting for you and then in your main program everytime the user enters a key, you just call a function of the Thread object counting that returns it's current value. The example below might help. [code=python] # counterTest.py, a1eio …

Member Avatar for a1eio
0
8K
Member Avatar for FreezeBlink

[code=python] n = float(2) m = float(3) print n/m [/code] Or [code] n = 2.0 m = 3.0 print n/m [/code] Hope that helps.

Member Avatar for vegaseat
0
104
Member Avatar for shigehiro

well as far as i can see, whatever resides within [icode]self[filename][/icode] is clearly not a valid filepath. There was a sort of hint to what it might contain in the second error. [quote] [IOError] of [Errno 36] File name too long: 'ProjCat,RefNum,ProjTitle,MemberName,ProjDeadline,ProjGrade\nI,0001,"Medical Research in XXX Field,2007","Gary,Susan",20.05.07,80\nR,0023,Grid Computing in today era,"Henry …

Member Avatar for a1eio
0
260
Member Avatar for vegaseat

[code=python] def function(*args): print type(args) print args function('arg1', 'arg2', 'arg3') [/code] output [code] <type 'tuple'> ('arg1', 'arg2', 'arg3') [/code] If you need a list: [icode]args = list(args)[/icode]

Member Avatar for a1eio
0
212
Member Avatar for majestic0110

hmm.. what module is this 'call' function from? because it's not a builtin / keyword function

Member Avatar for Ene Uran
0
128
Member Avatar for nsandestin

[code=python] >>> string = "A simple example string." >>> if 'example' in string: print 'the word '%s' is in: "%s"' % ('example', string) the word 'example' is in: "A simple example string." >>> [/code]

Member Avatar for nsandestin
0
121
Member Avatar for blaze423

Well if your running your tkinter gui by calling: root.mainloop() or something similiar then you should change that to: [code=python] while 1: root.update() #repeat code here [/code] You do everything as normal but then when you get to the displaying part, you enter a loop which updates the gui and …

Member Avatar for a1eio
0
233
Member Avatar for heshan

[code=python] >>> exec("print 2") 2 >>> exec("print 2+2") 4 >>> exec("vars = (var1, var2, var3, var4) = 'a', (1,'2',3.0), 44, 0.7\nfor v in vars:\n print v, '=', type(v)") a = <type 'str'> (1, '2', 3.0) = <type 'tuple'> 44 = <type 'int'> 0.7 = <type 'float'> [/code]

Member Avatar for Ene Uran
0
109
Member Avatar for crackers

[code=python] playerScores = {"player1":0, "player2":0} ... ... if player1 won: playerScores["player1"] += 1 elif player2 won: playerScores["player2"] += 1 for player in playerScores.keys(): if playerScores[player] >= 5: print player, "won" restart game [/code] First line creates a dictionary, pseudo if statements show how you can add 1 onto each players …

Member Avatar for a1eio
0
108
Member Avatar for a1eio

Hi all! Just wondering if it was possible to be able to create a Tkinter window that can handle files being 'dropped' on it. What i want is to be able to drag a file from an explorer window to a widget on my program (probably an Entry widget) and …

Member Avatar for bumsfeld
0
108
Member Avatar for Azurea

Personally i would use threading (thats the short answer) As far as how to go about it, you've got a big project on your hands.

Member Avatar for Azurea
0
186
Member Avatar for fongoos

it's never too late to learn python :) awesome language, you'll pick it up quick and it beats VB (in my opinion)

Member Avatar for linux
0
823
Member Avatar for IU34

did you define gold? gold = gold + 5 if 'gold' is not defined before that statement then it doesn't know what to add 5 onto.

Member Avatar for IU34
0
109
Member Avatar for mcenley

not sure what you mean exactly, but why are you creating a temporary instance of Kangaroo in the put in pouch function? I thought you meant you wanted roo's pouch added into kanga's pouch? if thats the case then your code is fine, except you need to define pouch in …

Member Avatar for a1eio
0
184
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
182
Member Avatar for Laurence26

not sure what you mean by adding fonts, but when you create a font object, you can specify a pygame font, or a path to a custom font of your choice. [code=python] font1 = pygame.font.Font("C:\customfont.ttf", 12) [/code]

Member Avatar for a1eio
0
100
Member Avatar for linkrulesx10

Hi, download numpy here: [url]http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103[/url] download matplotlib here: [url]http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474[/url] install both and you should be set to go, drawing a simple graph and displaying it is as simple as: [code=python] >>> from pylab import * >>> plot([1,2,3,4]) [<matplotlib.lines.Line2D instance at 0x01A34BC0>] >>> show() [/code] Obviously you can do a lot …

Member Avatar for woooee
0
161
Member Avatar for rysin

lol pygame is fun, give it a go.. hardly industry standard top notch gaming, but you can make some very interesting games :)

Member Avatar for 1337455 10534
0
162
Member Avatar for a1eio

Hi, I'm a bit stuck on getting 1 function that's not inside any class or function, accessible or callable to everyother part of the program, from within classes and the Main function.. i've tried to make it global but i'm not sure on how to make it work and it …

Member Avatar for BearofNH
0
124
Member Avatar for sigkill9

Hi, i might be missing something, but from what i understand your program, gets an int from the user, validates it, then it enters a for loop and checks each number (p) of the loops range, to see if its prime and if the user's number minus p, is prime. …

Member Avatar for sigkill9
0
206
Member Avatar for nish88

Hi, there's a few methods, someone asked a similiar question a while back on this forum: [url]http://www.daniweb.com/forums/thread47882.html[/url] This is a snippet showing how to do it with wxPython (a GUI library like Tkinter but more advanced) [url]http://www.daniweb.com/code/snippet435.html[/url] and you could also do it using Tkinter and just display each still …

Member Avatar for nish88
0
88
Member Avatar for a1eio

Hi, I'm trying to create 6 buttons in a for loop using tkinter, each button's command points at the same function, but passes a variable (the loop counter.. in this case i) now for some reason.. when i run it, and click on each button, the function is supposed to …

Member Avatar for a1eio
0
143
Member Avatar for a1eio

Hi all, Just wondering if there is a way to see if a window has been destroyed or not. eg: [code] root = Tk() bla ... bla ... if root has been destroyed: do something... [/code] thanks in advance a1eio

Member Avatar for a1eio
0
303
Member Avatar for a1eio

Hello, I was wondering whether it was possible to embed something made with pygame, like some sort of animated display or bouncing ball whatever, into a Tkinter made window, with tkinter buttons/frames etc... Anybody heard of this or know of if it can be done? Thanks a1eio

Member Avatar for a1eio
0
808
Member Avatar for Matt Tacular

yea, ditch the printing and append it to a list and it'll be almost instant. :)

Member Avatar for vegaseat
0
288
Member Avatar for a1eio

Hi, I'm trying to pin an image to a button, using the 'image' option. I've looked about on the net and it seems the best way to do it is to create the image in a PhotoImage object. I've done this and then stuck it onto the button but for …

Member Avatar for a1eio
0
156
Member Avatar for a1eio

Hi, I want to create a little Frame class that has two labels built in, the code snippet below is the class. [CODE=python] class DescriptionFrame(Frame): def __init__(self, master, title="", text=""): Frame.__init__(master) self.title = title self.text = text self.titleLabel = Label(self, text=self.title, font=("Times", 12, "underline"), fg="darkred") self.titleLabel.grid(row=0, column=0, sticky=W) self.mainLabel = …

Member Avatar for a1eio
0
940
Member Avatar for Extremist

The End.