User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 426,106 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,711 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 136
Search took 0.01 seconds.
Posts Made By: a1eio
Forum: Python Jun 12th, 2008
Replies: 6
Views: 259
Posted By a1eio
Re: Basic Cryptography Program Help

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...
Forum: Python Jun 6th, 2008
Replies: 5
Views: 390
Posted By a1eio
Re: Running Python Code in a Webpage

Google have this thing called the Google App Engine.



Link: http://code.google.com/appengine/docs/whatisgoogleappengine.html
Forum: Python Jun 2nd, 2008
Replies: 1
Views: 221
Posted By a1eio
Re: bind method in socket

when you create a socket, you need to bind it with a port, address so other sockets have something to connect to.


sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind((address, port))
Forum: Python Jun 2nd, 2008
Replies: 2
Views: 393
Posted By a1eio
Re: Py2exe help

try GUI2exe, it's a gui wrapper for py2exe.
http://xoomer.alice.it/infinity77/main/GUI2Exe.html
Forum: Python May 30th, 2008
Replies: 5
Views: 260
Posted By a1eio
Re: Threading Error

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...
Forum: Python May 17th, 2008
Replies: 4
Views: 320
Posted By a1eio
Re: Lists & Passwords

python has a keyword function in that would be useful in your example.


if password in pass_list1:
# do something
Forum: Python May 16th, 2008
Replies: 1
Views: 194
Posted By a1eio
Re: Unknown protocol error

can you post the traceback? and what module's are you using?
Forum: Python May 15th, 2008
Replies: 4
Views: 281
Posted By a1eio
Re: List Problem

there must be something else going on. When you make a copy of a list list2 = list1[:] it fills list2 with list1's values, but when you change either list1 or list2, the change isn't mirrored so...
Forum: Python May 8th, 2008
Replies: 6
Views: 419
Posted By a1eio
Re: how do you skip inputs if nothing is entered?

Thanks.
Yea not a problem i'll put it there now.

And I will look up the python code guidlines thing (i have heard of it before to be honest) i'm just lazy hehe.
Forum: Python May 8th, 2008
Replies: 6
Views: 498
Posted By a1eio
Re: Tkinter: button not responding immediately

# This is meant to draw Start and Stop buttons and a label
# The Start button should start a loop in which the label
# is configured to change colour and text.
# At each pass through the loop the...
Forum: Python May 7th, 2008
Replies: 10
Views: 867
Posted By a1eio
Forum: Python May 7th, 2008
Replies: 10
Views: 867
Posted By a1eio
Re: How to parse in tricky .csv file content?

You don't need to get a fileobject though. As solsteel pointed out, the csv module doesn't need a fileobject, it just needs something to iterate through, so if you split the self[filename] string by...
Forum: Python May 7th, 2008
Replies: 10
Views: 867
Posted By a1eio
Re: How to parse in tricky .csv file content?

well as far as i can see, whatever resides within self[filename] is clearly not a valid filepath.

There was a sort of hint to what it might contain in the second...
Forum: Python May 7th, 2008
Replies: 4
Views: 882
Posted By a1eio
Re: A List of Class Objects

def function(*args):
print type(args)
print args

function('arg1', 'arg2', 'arg3')

output

<type 'tuple'>
('arg1', 'arg2', 'arg3')
Forum: Python May 7th, 2008
Replies: 6
Views: 498
Posted By a1eio
Re: Tkinter: button not responding immediately

You should definitely use tkinters .after() function, it enters a local event loop which means it doesn't block your program.


def blink(self):
if not self.stop: # check self.stop is...
Forum: Python May 7th, 2008
Replies: 2
Views: 335
Posted By a1eio
Re: Controlling variable types?

n = float(2)
m = float(3)
print n/m

Or

n = 2.0
m = 3.0
print n/m
Forum: Python May 7th, 2008
Replies: 6
Views: 419
Posted By a1eio
Re: how do you skip inputs if nothing is entered?

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...
Forum: Python Apr 25th, 2008
Replies: 3
Views: 386
Posted By a1eio
Re: Call another program

hmm.. what module is this 'call' function from?

because it's not a builtin / keyword function
Forum: Python Apr 24th, 2008
Replies: 6
Views: 251
Posted By a1eio
Re: Like function in 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."
>>>
Forum: Python Apr 24th, 2008
Replies: 3
Views: 373
Posted By a1eio
Re: Multiple tasks in Tkinter

http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/

An excellent relatively short tutorial about threads, it's brief (4 pages) but i found it very useful.

As much as...
Forum: Python Apr 23rd, 2008
Replies: 3
Views: 215
Posted By a1eio
Re: Executing a string

>>> 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...
Forum: Python Apr 22nd, 2008
Replies: 1
Views: 179
Posted By a1eio
Re: Declaring a winner

playerScores = {"player1":0, "player2":0}
...
...
if player1 won:
playerScores["player1"] += 1
elif player2 won:
playerScores["player2"] += 1

for player in playerScores.keys():
if...
Forum: Python Apr 22nd, 2008
Replies: 3
Views: 373
Posted By a1eio
Re: Multiple tasks in Tkinter

Well if your running your tkinter gui by calling: root.mainloop() or something similiar then you should change that to:

while 1:
root.update()
#repeat code here


You do everything as normal...
Forum: Python Apr 17th, 2008
Replies: 2
Views: 253
Posted By a1eio
Dropping files onto Tk windows

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...
Forum: Python Apr 15th, 2008
Replies: 3
Views: 311
Posted By a1eio
Re: "Online" Game Planning Help

http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/

A guide to threading i found very useful
Forum: Python Apr 15th, 2008
Replies: 3
Views: 311
Posted By a1eio
Re: "Online" Game Planning Help

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.
Forum: Python Apr 15th, 2008
Replies: 7
Views: 405
Posted By a1eio
Re: Easy Question (For You)

don't hijack eggowaffles thread ramakrishnakota, if you need help and it's not related to this guy start a new thread
Forum: Python Apr 6th, 2008
Replies: 8
Views: 479
Posted By a1eio
Re: text adventure game "local variable refferenced before assignment"

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.
Forum: Python Apr 4th, 2008
Replies: 70
Views: 3,769
Posted By a1eio
Re: Is it too late to learn Python

competition?
easier for a giant like MS to keep python in 'check' than allow another powerful open source language like python which could result in a drop in sales if software becomes easier to...
Forum: Python Apr 4th, 2008
Replies: 70
Views: 3,769
Posted By a1eio
Re: Is it too late to learn Python

from - http://www.jython.org/Project/userfaq.html
Forum: Python Apr 3rd, 2008
Replies: 70
Views: 3,769
Posted By a1eio
Re: Is it too late to learn Python

java is just like python, it's just that java's virtual machine is a hell of a lot more widely spread, known and used than pythons interpretter.

why do you think Jython is so good at what it does.
Forum: Python Apr 2nd, 2008
Replies: 7
Views: 536
Posted By a1eio
Re: [Program Query]Classes and Methods

hahahaha!!!! i was typing away and hit enter without even pasting the link in :)
terribly sorry

http://docs.python.org/ref/customization.html
Forum: Python Apr 2nd, 2008
Replies: 7
Views: 536
Posted By a1eio
Re: [Program Query]Classes and Methods

i'm not sure, i havn't used the double underscore methods much (if at all) but as far as i am aware, the __str__ method links with the 'print' keyword, so if print object is called then that objects...
Forum: Python Apr 2nd, 2008
Replies: 7
Views: 536
Posted By a1eio
Re: [Program Query]Classes and Methods

well, if you want to be able to 'print' the kangaroo instance in your case your trying to print 'kanga' then just make the '__str__' method return a string and that string will get...
Forum: Python Apr 2nd, 2008
Replies: 7
Views: 536
Posted By a1eio
Re: [Program Query]Classes and Methods

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...
Forum: Python Mar 30th, 2008
Replies: 2
Views: 355
Posted By a1eio
Re: How to find out a widget's width in Tkinter

oh my goodness that is all i needed to know!!

thankyou v.much:)
Forum: Python Mar 30th, 2008
Replies: 70
Views: 3,769
Posted By a1eio
Re: Is it too late to learn Python

hehe, nicely put vega, i totally forgot about that beautiful aspect of python
Forum: Python Mar 30th, 2008
Replies: 2
Views: 355
Posted By a1eio
How to find out a widget's width in Tkinter

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)


class CustomWidget(Tkinter.Frame):
def __init__(self,...
Forum: Python Mar 30th, 2008
Replies: 70
Views: 3,769
Posted By a1eio
Re: Is it too late to learn Python

python has defiantly spioled me!

i hate the look of other languages even tho i'd love to learn them.. whenever i try.. i end up going back to python just cause it's so much clearer and quicker to...
Forum: Python Mar 30th, 2008
Replies: 4
Views: 409
Posted By a1eio
Re: Scrolling Ticker...

thanks.

Yea i'm using the text version for now, for simplicity and so i can get the rest of the program running, but i'll probably try to work out a canvas method later. i'll post it if it works,...
Showing results 1 to 40 of 136

 
All times are GMT -4. The time now is 3:55 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC