is extending an object considered acceptable usage?

2005-01-24 Thread mike
i have an Item which belongs to a Category, so Item has: - item.categoryId, the database primary key of its Category - item.category, a reference to its Category. this null unless i need a reference from item to its Category object, in which case i call setCategory(category) sometimes i want a

py.dll for version 2.2.1 (Windows)

2005-01-28 Thread mike
for Windows (XP) ? I looked at www.python.org and do not see a py.dll file in the self-installation or .tgz versions of 2.2.1 that are posted. Thanks ! Mike -- http://mail.python.org/mailman/listinfo/python-list

Microsoft Visual C++ and pyton

2005-01-30 Thread mike
Hi, I am new with python. Is it possible to have an MFC application and develop some module using python? what are the steps in doing this? can anybody give me a url or some documentation for this.. thanks.. mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Visual C++ and pyton

2005-01-31 Thread mike
Thanks Chris.. I was also advised to build the python core (pythoncore.vcproj) with my C++ program. By that way I would not have to load the python core anymore during runtime. Is this a good approach? I am currently using VC++ 7 and python 2.4. - mike Christopher De Vries wrote: On Sun, Jan 30

several interpreters and suspend script

2005-10-24 Thread Mike
Hello All, I'm working ( and a beginner ) with mixing Python scripting and C++. And I need some little help. :) I've searched on the net, but found no answer. So I ask you directly. Globally, I'd like to do 2 things. The first, when I'm in the program, I call a script, which call a function

Re: Making immutable instances

2005-11-23 Thread Mike
Ben Finney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy all, How can a (user-defined) class ensure that its instances are immutable, like an int or a tuple, without inheriting from those types? What caveats should be observed in making immutable instances? IMHO, this

Re: Making immutable instances

2005-11-24 Thread Mike
Giovanni Bajo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mike wrote: How can a (user-defined) class ensure that its instances are immutable, like an int or a tuple, without inheriting from those types? What caveats should be observed in making immutable instances? IMHO

Re: Making immutable instances

2005-11-24 Thread Mike
Antoon Pardon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Op 2005-11-24, Mike schreef [EMAIL PROTECTED]: [...snip...] ...but I think Python's voluntary DoThis, _DoThisIfYouReallyHaveTo, and __You'dBetterKnowWhatYou'reDoing__ approach is a better way to go than

Re: Making immutable instances

2005-11-24 Thread Mike
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mike Meyer wrote: Giovanni Bajo [EMAIL PROTECTED] writes: Mike Meyer wrote: Note that this property of __slots__ is an implementation detail. You can't rely on it working in the future. I don't rely on it. I just want to catch

Re: Software keyboard

2005-11-24 Thread Mike
You need to call keybd_event which is (or was in win3.x - win95 at least) in USER32.DLL. Simulate return keypress: keybd_event(VK_RETURN,0,0,0); keybd_event(VK_RETURN,0,KEYEVENTF_KEYUP,0); Google turned this up: http://www.howtodothings.com/viewarticle.aspx?article=395 Note: This is

This Program Realy Works

2005-01-06 Thread MIke
Christensen 5446 Santa Barbara Sparks, NV 89436 #2 Randall Hines 22 Stature Dr. Newark DE 19713 #3 Mike Sharrer 921 West State St. Coopersburg PA 18036 #4 Travis Montgomery 2211 Elmers Lane Norfolk NE 68701 #5 James Adair the third 22 Over Rd. Feasterville PA 19053 #6 Michael Lescault 123 Rhode Island Ave

Re: Remote Function Call

2006-01-12 Thread Mike
Sounds like what I need. Thanks Irmen. I heard google uses python with multiple machines... how do they do it? Mike -- http://mail.python.org/mailman/listinfo/python-list

Remote Function Call

2006-01-13 Thread Mike
Hi, I have two machines. A python program on machine 1 needs to make a python call to a method in machine 2. What is the most efficient / fast / programmer friendly way to do it? - XML-RPC? - Http Call? Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Remote Function Call

2006-01-13 Thread Mike
Thanks Everyone for your input. Mike -- http://mail.python.org/mailman/listinfo/python-list

XML vs. cPickle

2006-01-13 Thread Mike
, Mike -- http://mail.python.org/mailman/listinfo/python-list

Marshal Obj is String or Binary?

2006-01-13 Thread Mike
to store this data safely in my database as CLEAR TEXT, not BLOB. It seems to me that it should work just fine since it is string anyways. So, why does O'reilly's Python Cookbook is insisting in saving it as a binary file and BLOB type? Am I missing out something? Thanks, Mike -- http

Re: XML vs. cPickle

2006-01-13 Thread Mike
doing it now. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: python object model diagram

2005-09-09 Thread Mike
I think he's looking for diagrams of the batteries-included modules and classes. My guess is that he thinks there's a set of framework classes that is a lot deeper and class-ier than it is, similar to what you'd find in C++, C#, Java, etc. So, OP - who won the guessing game :) m gene tani

Re: Perl's documentation come of age

2005-09-22 Thread Mike
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jim Hugunin's keynote speech at this year's PyCon was accompanied by a projection if his interactive interpreter session, and I know I wasn't alone in finding this a convincing example of Microsoft's (well, Jim's,

Re: Telephony project

2005-09-27 Thread Mike
I was able to do something like this in Python a while back. You'll need one of: (a) A telephone line dialer/monitor DTMF I/O board that works through the serial port, and a phone audio tap that mixes the soundcard I/O to the phone (b) A TAPI-compliant modem that does everything you need (c) A

Re: Perl's documentation come of age

2005-09-27 Thread Mike
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mike wrote: Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jim Hugunin's keynote speech at this year's PyCon was accompanied by a projection if his interactive interpreter session, and I know I

Re: Perl's documentation come of age

2005-09-27 Thread Mike
Mike [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looks like I'm having a bad week w/these URLs, because now I'm not able to access http://lists.ironpython.com/listinfo.cgi/users-ironpython.com . I was hoping to get at the archives to see if I can glean more info before I

Replacing utf-8 characters

2005-10-05 Thread Mike
Hi, I am using Python to scrape web pages and I do not have problem unless I run into a site that is utf-8. It seems is changed to amp; when the site is utf-8. If I try to replace it with .replace('amp;','') it for some reason does not replace it. For example:

Re: Replacing utf-8 characters

2005-10-05 Thread Mike
the the contents link it shows it the same as when it was assigned. Richard Brodie wrote: Mike [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] However when I pull it into python the URL ends up looking like this (notice the amp; instead of just in the URL) Any ideas? Some code

Re: Replacing utf-8 characters

2005-10-05 Thread Mike
Steve Holden wrote: You must be doing *something* wrong: link = /news/newsArticle.aspx?type=businessNewsamp;amp;storyID=2005-10-05T151245Z_01_HO548006_RTRUKOC_0_UK-AIRLINES-BA.xml link = link.replace('amp;amp;','') link

Re: Replacing utf-8 characters

2005-10-05 Thread Mike
In playing with this I found link.replace does work but when I use link.replace('amp;','') it replaces it with amp; instead of just . link.replace is working for me since if I changed the second option from to something else I see the change. So it seems link.replace() function reads

os.access with wildcards

2005-10-07 Thread mike
i'd like to use os.access(path,mode) where path may contain linux style wildcards. i've failed so far. my workaround is the bash command. os.system('[ -e %s ]' % fn ) any suggestions? -- http://mail.python.org/mailman/listinfo/python-list

Re: os.access with wildcards

2005-10-07 Thread mike
thanks Leif. poor question on my part. I had been using glob.glob(path)==[] and was looking for something more readable, hence os.system('[ -e %s ]' % path ) but that doesn't seem like a good idiom for crossplatform. I thought there may either be a way to escape the wildcards, or an

Re: os.access with wildcards

2005-10-07 Thread mike
thanks Leif. poor question on my part. I had been using glob.glob(path)==[] and was looking for something more readable, hence os.system('[ -e %s ]' % path ) but that doesn't seem like a good idiom for crossplatform. I thought there may either be a way to escape the wildcards, or an

Re: os.access with wildcards

2005-10-07 Thread mike
Test for the existence of one or more matches of the wildcard expression. For example: Are there any files that begin with 2005? This doesn't work (wish it did): os.access('2005*',os.F_OK) However, these work arounds do the job: glob.glob('2005*')==[] as does this bash command:

Re: os.access with wildcards

2005-10-07 Thread mike
Test for the existence of one or more matches of the wildcard expression. For example: Are there any files that begin with 2005? This doesn't work (wish it did): os.access('2005*',os.F_OK) However, these work arounds do the job: glob.glob('2005*')==[] as does this bash command:

Re: os.access with wildcards

2005-10-07 Thread mike
dude, you are the sap that wrote it's not clear. get a life. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.access with wildcards

2005-10-07 Thread mike
No need to apologize for continuing to waste your time, self.plonk. Get a life, though, and you'll be happier. As to your question, well, not before you apologize for thread crapping. As for your possible solutions, if you consider any of yours to be readable, then i have no interest in coding

Re: os.access with wildcards

2005-10-07 Thread mike
Thanks Mike. Would there be an idiom using is? somethng like glob.glob('2005*) is not Empty I have not figured out what to put on the right hand side of is I guess, for readability, nothing has come up that seems _great_. One last effort would be to hide the code behind a method, and use

Re: os.access with wildcards

2005-10-07 Thread mike
Hi Dan, It works, it's elegant, and it uses python strengths. I guess I have to settle the question of who my audience is. That is who do I want to make it readable for. All the solutions so far require some python specific knowledge, and there are some which are horendous even at that.

Re: os.access with wildcards

2005-10-08 Thread mike
ugly. i guess this thread shows that you are clueless regarding your thread crapping. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.access with wildcards

2005-10-16 Thread mike
os.path.exists() --

Re: What is different with Python ?

2005-06-13 Thread Mike
there should be no room for magic in a computer for a professional programmer. well put. sounds like the makings of a good signature... -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-13 Thread Mike
Wait a sec. \x00 may represent a byte when unmarshaled, but as long as marshal likes it as \x00, I think my db is capable of storing \ x 0 0 characters. What is the problem? Is it that \? I could escape that... actually I think my django framework already does that for me. Thanks, Mike -- http

Re: Marshal Obj is String or Binary?

2006-01-13 Thread Mike
Wait a sec. \x00 may represent a byte when unmarshaled, but as long as marshal likes it as \x00, I think my db is capable of storing \ x 0 0 characters. What is the problem? Is it that \? I could escape that... actually I think my django framework already does that for me. Thanks, Mike -- http

Re: Marshal Obj is String or Binary?

2006-01-13 Thread Mike
Thanks everyone. It seems broken storing complex structures as escaped strings, but I think I'll take my changes. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-14 Thread Mike
: - Save my structure as binary data, and reference the file from my db - Find a clean method of saving bytes into my db Thanks again, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-15 Thread Mike
then it might do the job. But trying to optimise code that hasn't even been written yet is a sure way to trouble. Thanks. Will do. Regards, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-15 Thread Mike
then it might do the job. But trying to optimise code that hasn't even been written yet is a sure way to trouble. Thanks. Will do. Regards, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-15 Thread Mike
rain :) Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Marshal Obj is String or Binary?

2006-01-15 Thread Mike
in clear text. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

NEED MONEY FOR FAMILY MATTERS

2005-02-28 Thread mike
HI I WAS A MARINE MECHANIC working boat engines for 20 years and now I have started making money for the rest of my life after i got into my own business but I wish I had started many years ago, check it out for yourself you'll be HAPPY you did. This site changed my life and my families and it

Re: Writing to stdout and a log file

2005-04-19 Thread Mike
Thanks. I should've mentioned I want StdoutLog to subclass the 'file' type because I need all the file attributes available. I could add all the standard file methods and attributes to StdoutLog without subclassing 'file' but I'd rather avoid this if I can. --

Writing to stdout and a log file

2005-04-19 Thread Mike
? It looks like the superclass's write() method is getting called instead of the StdoutLog instance's write() method. The python documentation says 'print' should write to sys.stdout.write() but that doesn't seem to be happening. Any idea what's going one? Or ideas on how to debug this? Thanks, Mike

Re: Writing to stdout and a log file

2005-04-20 Thread Mike
flushing stdout has no effect. I've got an implementation that does not subclass file. It's not as nice but it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing to stdout and a log file

2005-04-20 Thread Mike
Perfect. This is what Ill use. Thanks! Mike -- http://mail.python.org/mailman/listinfo/python-list

Using re module better

2008-03-05 Thread Mike
) ... (compare to Perl:) if($foo =~ /(\w+)\s*(\w+)/) { $field1 = $1; $field2 = $2; ... } Problem is, my python is invalid above. What's the pythonic way to do this? Thanks in advance O Python Charmers Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I reconnect a disconnected socket?

2008-03-28 Thread Mike
On Mar 28, 10:01 am, Jason Kristoff deevine-removethis- [EMAIL PROTECTED] wrote: I'm trying to make something that once it is disconnected will automatically try to reconnect. I'll add some more features in later so it doesn't hammer the server but right now I just want to keep it simple and

feedparser

2008-05-13 Thread Mike
Hello, I'm trying to use the feedparser module (http://www.feedparser.org/). Is it possible to use this without running the setup program? I don't see why not, seems like I'm missing something obvious. My directory structure is: myprogram.py /feedparser /feedparser.py I know I

Re: feedparser

2008-05-13 Thread Mike
On Tue, May 13, 2008 at 11:16 PM, [EMAIL PROTECTED] wrote: On May 13, 6:06 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 13 May 2008 07:30:44 -0300, Mike [EMAIL PROTECTED] escribió: I'm trying to use the feedparser module (http://www.feedparser.org/). Is it possible

HTML Generation

2009-04-03 Thread Mike
Hello all, I'm writing a web app and wanted to do some html generation (I really do not like to maintain or write html). I'm thinking of writing a dsl based on the following: def html(): return def a(): return def body(): return (html, ...(head, (style, id, {font-color:black}))

Python threads and memory usage

2008-05-29 Thread Mike
Hi, I'm writing client-server application in Python. It's monitoring system, where server listen and waits for TCP connections, and every connection takes own thread. Every thread puts data from clients to Queue and exits. Then there is one DB loader thread, which loads all data from Queue to

Re: Python threads and memory usage

2008-05-30 Thread Mike
On May 30, 9:16 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike [EMAIL PROTECTED] declaimed the following in comp.lang.python: I observed, that every thread reserved some memory, and after exit thread doesn't freed it. When i leaved my server

Re: Python threads and memory usage

2008-05-30 Thread Mike
On May 30, 9:42 am, Mike [EMAIL PROTECTED] wrote: On May 30, 9:16 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike [EMAIL PROTECTED] declaimed the following in comp.lang.python: I observed, that every thread reserved some memory, and after

Re: TWITTER API and urllib2

2008-06-10 Thread Mike
On Tue, Jun 10, 2008 at 10:42 PM, Mike [EMAIL PROTECTED] wrote: Hello, I've spent the last couple of nights hacking away at a Python wrapper for the Twitter API that I can use for various things. I'm having trouble with one of the methods: user_timeline. ( http://groups.google.com/group

TWITTER API and urllib2

2008-06-10 Thread Mike
Hello, I've spent the last couple of nights hacking away at a Python wrapper for the Twitter API that I can use for various things. I'm having trouble with one of the methods: user_timeline. ( http://groups.google.com/group/twitter-development-talk/web/api-documentation#HelpMethods ). This is

Re: TWITTER API and urllib2

2008-06-10 Thread Mike
On Tue, Jun 10, 2008 at 11:03 PM, Mike [EMAIL PROTECTED] wrote: On Tue, Jun 10, 2008 at 10:42 PM, Mike [EMAIL PROTECTED] wrote: Hello, I've spent the last couple of nights hacking away at a Python wrapper for the Twitter API that I can use for various things. I'm having trouble with one

Re: Dynamic HTML from Python Script

2008-06-10 Thread Mike
Web.py also springs to mind, I'd say it's worth looking at. Well, in that case you could simply append the new output to a static file every 10 seconds, or whenever there is new output. That way, you just need to refresh the static file in your browser to see updates... Given what I

Re: Dynamic HTML from Python Script

2008-06-10 Thread Mike
On Wed, Jun 11, 2008 at 2:16 PM, asdf [EMAIL PROTECTED] wrote: On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote: asdf wrote: Well, there's a few ways you could approach it. You could create a cgi program from your script - this is probably the solution you're looking for. Output

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 10:57 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Some (if not most) templating systems use their own mini-language to handle presentation logic. IMHO this is the funniest (worst) part of all this 'templating' buss :) It reminds me the good old slogan: Have you

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 1:41 pm, George Sakkis [EMAIL PROTECTED] wrote: Because _typically_ a web template consists of mostly HTML, with relatively little presentational logic and (ideally) no business logic. Now, if all one wants to do is a quick and dirty way to, say, view a log file in the browser, a

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 1:49 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Then what is so *good* about it, why embedding HTML into Python is not good? Who said embedding HTML in Python was bad ? Did you _carefully_ read John's question ?-) I should have say why embedding HTML into Python is not

Re: How do web templates separate content and logic?

2008-07-03 Thread Mike
On Jul 2, 11:09 am, George Sakkis [EMAIL PROTECTED] wrote: On Jun 30, 3:16 pm, Mike [EMAIL PROTECTED] wrote: On Jun 30, 1:41 pm, George Sakkis [EMAIL PROTECTED] wrote: Because _typically_ a web template consists of mostly HTML, with relatively little presentational logic and (ideally

Re: first, second, etc line of text file

2007-07-26 Thread Mike
On Jul 26, 8:46 am, Daniel Nogradi [EMAIL PROTECTED] wrote: A very simple question: I currently use a cumbersome-looking way of getting the first, second, etc. line of a text file: for i, line in enumerate( open( textfile ) ): if i == 0: print 'First line is: ' + line

Re: help on object programing

2007-08-17 Thread mike
On Aug 17, 11:07 am, yadin [EMAIL PROTECTED] wrote: class big(self): x = 32 list = [] def inside (self): class small(self): # a new class defined inside the first y = 348 list.append(y) # send the value to first list list.append(x)

Strange varargs issue

2008-01-04 Thread Mike
this possibly be? The caller print statement obviously shows a is singular. Thanks in advance for any and all insight... Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange varargs issue

2008-01-04 Thread Mike
You know, every once in a while, self really bites me. (I program in Java too much) Thanks for everyone who replied quickly. Mike wrote: [ a bunch of crap because I forgot self, nevermind sorry ] -- http://mail.python.org/mailman/listinfo/python-list

How to refer to the current module?

2008-01-07 Thread Mike
the appropriate bindings? Thanks in advance for all advice! Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How to refer to the current module?

2008-01-07 Thread Mike
Sweet! Thanks! Mike On Jan 7, 8:30 am, Guilherme Polo [EMAIL PROTECTED] wrote: globals() =) -- http://mail.python.org/mailman/listinfo/python-list

Re: mysqldb SELECT COUNT reurns 1

2008-01-09 Thread mike
On Dec 27 2007, 5:25 pm, Ian Clark [EMAIL PROTECTED] wrote: On 2007-12-27, SMALLp [EMAIL PROTECTED] wrote: connectionString = {host:localhost, user:root, passwd:pofuck, db:fileshare} dataTable = files conn = mysql.connect(host=connectionString[host], user=connectionString[user],

Re: Help with Windows build of Yapgvb Python extension

2008-01-11 Thread Mike
setup.py bdist_wininst ...for executable installers. If you can provide a valid setup.py, I can probably create the exe/ msi. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Using eggs

2008-01-11 Thread Mike
and setup-tools, I was referred to the Distutils user group. I would cross-post there for double the fun! http://mail.python.org/mailman/listinfo/distutils-sig Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: ISO books of official Python docs

2008-01-11 Thread Mike
it at some point? It would be nice to have a complete library reference with a good index at times. Thank you, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Graphics Module

2008-01-11 Thread Mike
/graphs.html Some of these may have dependencies, such as numpy or scipy. Be sure to read the docs for full details either way. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie wants to get visual

2008-01-11 Thread Mike
be wonderful. wxPython can most likely do what you like and they have a very helpful user's group. But if you're leaning more towards using Python on the web, you'll probably want to take a look at the usual suspects: Django, Turbogears, Pylons or Plone/Zope. Mike -- http://mail.python.org/mailman

Re: Great Python books for the beginner

2008-01-12 Thread Mike
) You see, we build to that. -- Jack Handey | Ben Finney I would recommend Lutz's other book, the wonderful Python tome Programming Python 3rd Ed. as well. It's good for getting into the deepest part of Python's jungle. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython-wx.CheckListBox: changing item bacgkground color

2008-01-14 Thread Mike
website: www.wxpython.org Mike -- http://mail.python.org/mailman/listinfo/python-list

takes no arguments (1 given)

2007-12-03 Thread Mike
In the following Display inherits from the Tkinter class Canvas: import sys from Tkinter import * class Display(Canvas) : ... def fill_canvas() : slop=self.slop set_sr(int(self.cget('width'))+slop, int(self.cget('height'))+slop) self.refresh() ...

Re: takes no arguments (1 given)

2007-12-03 Thread Mike
Oops. I just forgot self. -- http://mail.python.org/mailman/listinfo/python-list

Re: adding methods at runtime and lambda

2007-05-04 Thread Mike
On May 3, 11:25 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 03 May 2007 16:52:55 -0300, Mike [EMAIL PROTECTED] escribió: I was messing around with adding methods to a class instance at runtime and saw the usual code one finds online for this. All the examples I saw say

Re: adding methods at runtime and lambda

2007-05-04 Thread Mike
On May 4, 2:05 pm, Peter Otten [EMAIL PROTECTED] wrote: Mike wrote: staticmethod makes the function available to the whole class according to the docs. What if I only want it to be available on a particular instance? Say I'm adding abilities to a character in a game and I want to give

Re: adding methods at runtime and lambda

2007-05-07 Thread Mike
On May 4, 5:46 pm, Peter Otten [EMAIL PROTECTED] wrote: Mike wrote: I just realized in working with this more that the issues I was having with instancemethod and other things seems to be tied solely to What you describe below is a function that happens to be an attribute of an instance

Re: Basic Class/Instance Question

2007-05-23 Thread Mike
Thanks Alan, I am still perplexed why the default value of this object is shared. hemm...d Back to programming, :) Sia On May 23, 7:19 am, Alan Franzoni [EMAIL PROTECTED] wrote: Il 23 May 2007 04:07:19 -0700, Siah ha scritto: Ready to go insane here. Class A, taking on a default value for

Key Listeners

2007-05-29 Thread Mike
Are there key listeners for Python? Either built in or third party? -- http://mail.python.org/mailman/listinfo/python-list

how to print out each single char from a string in HEX format?

2007-06-04 Thread mike
guys, I've researched python pretty much but still have no idea how to print out each single character from a string in HEX format? Hope someone can give me some hints. Thanks a lot. e.g.###here is a string a='01234' ###how to print out it out in this way

Re: how to print out each single char from a string in HEX format?

2007-06-04 Thread mike
Great! It works. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Could someone show me a sample how to flush the socket sending buffer? Thanks a lot.

2007-06-08 Thread mike
([EMAIL PROTECTED]) .. but still, the server can only receive the first line, and keep waiting for the second line. So, in my mind the second line is still in the sending buffer, and not reach the server side. Any hints would be appreciated. Mike -- http://mail.python.org/mailman

Re: MI5 Persecution: Goldfish and Piranha 29/9/95 (5104)

2007-06-09 Thread Mike
. | | = | | In article [EMAIL PROTECTED], | Mike Corley [EMAIL PROTECTED] wrote: | | John J Smith ([EMAIL PROTECTED]) wrote: | | : b) we do know who you are. Or are you someone else we don't know about? | : You are currently known as That bloody persistant net nutter, who's

How can I capture all exceptions especially when os.system() fail? Thanks

2007-06-13 Thread mike
changed the code to run a non-exist command wrong_command_test(commented the open and sleep lines), then the script printed: sh: wrong_command_test: command not found well Done Any opinions would be appreciated. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I capture all exceptions especially when os.system() fail? Thanks

2007-06-14 Thread mike
On Jun 14, 2:55 am, Michael Hoffman [EMAIL PROTECTED] wrote: Gabriel Genellina wrote: En Wed, 13 Jun 2007 21:47:16 -0300, mike [EMAIL PROTECTED] escribió: Following piece of code can capture IOError when the file doesn't exist, also, other unknown exceptions can be captured when I press

no module named win32api using PyWin32-208

2006-06-27 Thread Mike
, Mike -- http://mail.python.org/mailman/listinfo/python-list

qt ver. 3, linux, windows, and modal forms

2007-03-24 Thread Mike
are essential). Thanks for your help, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: qt ver. 3, linux, windows, and modal forms

2007-03-24 Thread Mike
Answers interspersed. David Boddie wrote: On Saturday 24 March 2007 23:08, Mike wrote: I'm having a problem with modal forms on windows. I've written a very short test program, with a main window and a form called from the main window. The form is set to modal with form.setModal(1) before

function with list argument defaulting to [] - what's going on here???

2007-04-14 Thread Mike
in advance. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: function with list argument defaulting to [] - what's going on here???

2007-04-14 Thread Mike
Thanks, Troy. I never cease to be amazed at what can be discovered by reading the manual! self bangs head on wall Mike Troy Melhase wrote: On 4/14/07, Mike [EMAIL PROTECTED] wrote: While trying to write a recursive function involving lists, I came across some (to me) odd behavior which I

  1   2   3   4   5   6   7   8   9   10   >