[Tutor] listen in on other program's tcp connections

2008-12-15 Thread xbmuncher
On windows XP, I'm running a program that sends TCP connections on port 5039. I'v ran wireshark to determine this. I want to create a simple program that listens for these connections and intercepts and then turns the data transferred into a string. From there I'd obviously like my program to act a

Re: [Tutor] MP3Info class usage

2008-12-15 Thread Todd Zullinger
Gareth at Serif wrote: > Okay, I've moved over to eyeD3.py... fif nothing else, the > documentation for it's usage is far superior. > > However, I can't get anything to run. The help gives examples of > some simple tasks, but as soon as I 'import eyeD3', not even calling > any functions within it

Re: [Tutor] problems finding position in list and changing it for GO game

2008-12-15 Thread W W
On Mon, Dec 15, 2008 at 10:01 PM, Lee Meredith wrote: > > the MOUSEBUTTONDOWN gives the black0 XandYpositions with the*.append* > how do I reference the address in the list by using XandYpositions > Then replace them or take it out off the list > > This code puts out an error when you hit the let

[Tutor] problems finding position in list and changing it for GO game

2008-12-15 Thread Lee Meredith
Hi I am looking for some help if you have or worked with pygame or not I'm sure if you have not you could still help me I am working on a *GO game* no AI a analog behavior only I have the stones going to the board and switching colors between black and white but I want to take *stones/pieces* off

Re: [Tutor] what does the "@" operator mean?

2008-12-15 Thread Steve Willoughby
Marc Tompkins wrote: On Mon, Dec 15, 2008 at 5:03 PM, Alan Gauld wrote: I've been using Python for oover 10 years and still find decorators hard to get my head around! :-) I've only been using Python for a couple of years now, but my experience so far is the same as yours: decorators make my h

Re: [Tutor] what does the "@" operator mean?

2008-12-15 Thread Marc Tompkins
On Mon, Dec 15, 2008 at 5:03 PM, Alan Gauld wrote: > > "Marc Tompkins" wrote > >> If you're just starting out in Python, decorators can be hard to get >> your head around... > > I've been using Python for oover 10 years and still find decorators > hard to get my head around! :-) > > I confess I'm

Re: [Tutor] what does the "@" operator mean?

2008-12-15 Thread Mary Lou Knack
Thanks Chris & Marc I certainly don't need to know about decorators at this stage of my development. Maybe I'll be able to avoid them entirely Mary Lou - Original Message - From: "Chris Calloway" To: Sent: Monday, December 15, 2008 2:22 PM Subject: Re: [Tutor] what does the "

Re: [Tutor] numarray issues

2008-12-15 Thread bob gailer
Please always reply-all so a copy goes to the list. Mr Gerard Kelly wrote: is there a quick way to convert a one element array into a scalar value so that I can use x[0] for all operations?  x = x[0] - Original Message - From: bob gailer Date: Tuesday, December 16, 2008 1

Re: [Tutor] numarray issues

2008-12-15 Thread bob gailer
Mr Gerard Kelly wrote: Hello, I am a python beginner, and I have a question about scalars vs arrays. I am making a (very simple) code, and part of it is: from numarray import * from math import * def source(x,y): f=sin(x) return f a=4. m=10 dx=a/(m+1.) x=zeros([m,1], Float) print x[0]

Re: [Tutor] what does the "@" operator mean?

2008-12-15 Thread Alan Gauld
"Marc Tompkins" wrote If you're just starting out in Python, decorators can be hard to get your head around... I've been using Python for oover 10 years and still find decorators hard to get my head around! :-) I confess I'm not a fan, they go against the Python spirit of explicit is best i

Re: [Tutor] Creating IDLE Shortcut

2008-12-15 Thread Alan Gauld
"Bradford Fisher" wrote I've attempted creating a shortcut and linking it to pythonw.exe The one the installer created on my PC is a shortcut to: C:\Python24\Tools\scripts\idle.pyw with a start-in directory of C:\Python24\Tools\scripts HTH, Alan G.

Re: [Tutor] what does the "@" operator mean?

2008-12-15 Thread Chris Calloway
On 12/15/2008 3:42 PM, Marc Tompkins wrote: > If you're just starting out in Python, decorators can be hard to get > your head around... This would be a huge help: http://www.ddj.com/web-development/184406073 -- Sincerely, Chris Calloway http://www.secoora.org office: 332 Chapman Hall phone:

[Tutor] numarray issues

2008-12-15 Thread Mr Gerard Kelly
Hello, I am a python beginner, and I have a question about scalars vs arrays. I am making a (very simple) code, and part of it is: from numarray import * from math import * def source(x,y): f=sin(x) return f a=4. m=10 dx=a/(m+1.) x=zeros([m,1], Float) print x[0] print func(x[0]) When

Re: [Tutor] Reading module to import from a string

2008-12-15 Thread Chris Calloway
On 12/15/2008 5:38 PM, Shrutarshi Basu wrote: Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? http://docs.python.org/library/imp.html -- Sincerely, Chris Calloway http://www.secoo

Re: [Tutor] Reading module to import from a string

2008-12-15 Thread Chris Calloway
On 12/15/2008 5:38 PM, Shrutarshi Basu wrote: Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? http://stackoverflow.com/questions/67631/how-to-import-module-from-file-name -- Sincer

[Tutor] Reading module to import from a string

2008-12-15 Thread Shrutarshi Basu
Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? Thanks, Basu -- The ByteBaker : http://www.bytebaker.com ___ Tutor maillist - Tutor@python

Re: [Tutor] need to clean a string

2008-12-15 Thread Andreas Kostyrka
Am Mon, 15 Dec 2008 12:43:46 -0800 schrieb johnf : > On Monday 15 December 2008 11:31:12 am Andreas Kostyrka wrote: > > Am Mon, 15 Dec 2008 10:18:28 -0800 > > > > schrieb johnf : > > > Hi, > > > I have a string that I need to extract just the sql > > > statement. The following is the string > > >

Re: [Tutor] need to clean a string

2008-12-15 Thread johnf
On Monday 15 December 2008 11:31:12 am Andreas Kostyrka wrote: > Am Mon, 15 Dec 2008 10:18:28 -0800 > > schrieb johnf : > > Hi, > > I have a string that I need to extract just the sql > > statement. The following is the string > > \000\000\000\000\000\000\000\000.\000\000\000\\000\00

Re: [Tutor] what does the "@" operator mean?

2008-12-15 Thread Marc Tompkins
On Mon, Dec 15, 2008 at 12:33 PM, Mary Lou Knack wrote: > I'm looking at some code from Enthought's ETS examples and ran across the > following statement: > > @mayavi2.standalone > > I have no idea what the "@" operator means, if anything. I tried searching > for it in the documentation (locally

[Tutor] what does the "@" operator mean?

2008-12-15 Thread Mary Lou Knack
I'm looking at some code from Enthought's ETS examples and ran across the following statement: @mayavi2.standalone I have no idea what the "@" operator means, if anything. I tried searching for it in the documentation (locally and online), but no luck. Or rather, the local (windows) help sai

Re: [Tutor] need to clean a string

2008-12-15 Thread Andreas Kostyrka
Am Mon, 15 Dec 2008 10:18:28 -0800 schrieb johnf : > Hi, > I have a string that I need to extract just the sql > statement. The following is the string > \000\000\000\000\000\000\000\000.\000\000\000\\000\000\000 > \000$\000\000\000\000\000(\000\000\000\000X\000\000\000\000\

[Tutor] need to clean a string

2008-12-15 Thread johnf
Hi, I have a string that I need to extract just the sql statement. The following is the string \000\000\000\000\000\000\000\000.\000\000\000\\000\000\000 \000$\000\000\000\000\000(\000\000\000\000X\000\000\000\000\000, \000\000\000\000P\000\000\000\000\000Q\000\00

[Tutor] Creating IDLE Shortcut

2008-12-15 Thread Bradford Fisher
Hello, Does anyone know the proper method for re-creating the Windows XP shortcut for IDLE? I (not thinking clearly) deleted the original and now am not sure how to go about fixing the problem. I've attempted creating a shortcut and linking it to pythonw.exe with the target idle.pyw, but when

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread Benjamin Kaplan
On Mon, Dec 15, 2008 at 8:13 AM, wrote: > On Mon, 15 Dec 2008 at 23:01, James Mills wrote: > >> On Mon, Dec 15, 2008 at 10:51 PM, Lamonte Harris >> wrote: >> >>> Every time I start cmd on windows it requires me to "set >>> path=%path%;C:\python26" why? I'm getting annoyed... >>> >> >> "cmd" has

Re: [Tutor] Ask a class for it's methods

2008-12-15 Thread Kent Johnson
On Fri, Dec 12, 2008 at 6:06 PM, Shrutarshi Basu wrote: > Is there a way to ask an object for a list of it's > methods (with argument requirements if possible)? Take a look at the inspect module. If it does not directly give you what you need, look at the source - it looks at function attributes

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread Alan Gauld
"bob gailer" wrote Try this: Start->Settings->Control Panel->System->Advanced->Environment Variables Highlight PATH under System Variables & Click Edit. Add ;C:\python26 And notice that Bob said ADD - DO NOT REPLACE the existing setting or you will likely break stuff and its not easy to fi

Re: [Tutor] Python Lib Files

2008-12-15 Thread Alan Gauld
"Kent Johnson" wrote I discovered yesterday that the Python package has a number of built in example scripts in the /lib directory. Those are not sample scripts, they are the standard library. There is extensive documentation, for example However there are some sample scripts in the Tool

Re: [Tutor] Python Lib Files

2008-12-15 Thread Kent Johnson
On Sun, Dec 14, 2008 at 9:49 AM, wrote: > Hello everyone, > > I discovered yesterday that the Python package has a number of built in > example scripts in the /lib directory. Perhaps this is common knowledge but > I did not know about it. I can't seem to find any kind of guide to the > files, tho

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread rdmurray
On Mon, 15 Dec 2008 at 23:01, James Mills wrote: On Mon, Dec 15, 2008 at 10:51 PM, Lamonte Harris wrote: Every time I start cmd on windows it requires me to "set path=%path%;C:\python26" why? I'm getting annoyed... "cmd" has _nothing_ to do with Python. (Top posting corrected.) But the an

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread James Mills
"cmd" has _nothing_ to do with Python. --JamesMills -- -- "Problems are solved by method" On Mon, Dec 15, 2008 at 10:51 PM, Lamonte Harris wrote: > Every time I start cmd on windows it requires me to "set > path=%path%;C:\python26" why? I'm getting annoyed... > > -- > http://mail.python.org/m

Re: [Tutor] MP3Info class usage

2008-12-15 Thread Gareth at Serif
Okay, I've moved over to eyeD3.py... fif nothing else, the documentation for it's usage is far superior. However, I can't get anything to run. The help gives examples of some simple tasks, but as soon as I 'import eyeD3', not even calling any functions within it, I start getting errors such as:

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread bob gailer
Lamonte Harris wrote: Every time I start cmd on windows it requires me to "set path=%path%;C:\python26" why? I'm getting annoyed... I have never started cmd and have it require anything. I guess what you are really asking is "how to permanenly set an environment variable". In this case so y

[Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread Lamonte Harris
Every time I start cmd on windows it requires me to "set path=%path%;C:\python26" why? I'm getting annoyed... ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor