Re: Python component model

2006-10-12 Thread Steve Holden
; You *might* find CTRL/U and CTRL/D helpful ... regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail

Re: python 2.5 & sqlite3

2006-10-12 Thread Steve Holden
en on time. And now I've missed getting ActivePython 2.5 out soon > after Python 2.5 because I'm focussed on Komodo 4.0 for now. > > For others, unfortunately ActivePython 2.5 will probably not be ready > until mid-November. > You guys need to hurry up and get that Kom

Re: Sending binary pickled data through TCP

2006-10-12 Thread Steve Holden
ta? Can I rely on len() == bytes? > Yes, since pickle returns a string of bytes, not a Unicode object. If bandwidth really is becoming a limitation you might want to consider uses of the struct module to represent things more compactly (but this may be too difficult if the objects being exchang

Re: What value should be passed to make a function use the default argument value?

2006-10-13 Thread Steve Holden
7;t make stringly enough. > If we somehow want to seperate parameters in those that > can be used with a keyword and those that don't it has > to be something different than providing a default value > to that parameter. > Indeed. regards Steve -- Steve Holden

Re: OT: What's up with the starship?

2006-10-13 Thread Steve Holden
confirm that I can't log in with my SSH private key, and that the system fingerprint has changed. Maybe some crew member can tell us what gives. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype:

Re: Python Best Practice References

2006-10-13 Thread Steve Holden
or use it for any purpose, or disclose its contents to any other person. >>Thank you. >> > > > By all means, please start here: > > http://www.python.org/doc/essays/styleguide.html > Nowadays I suspect PEP 8, derived from that essay, would be considered more

Re: Sending binary pickled data through TCP

2006-10-14 Thread Steve Holden
I wasn't aware of any > that are as easy to use as pickle, or don't require implementing them > myself, which is not something I have time for. > Marshal may achieve what you want, but on a more limited range of datatypes than pickle. regards Steve > Thanks again, > -D

Re: Python component model

2006-10-14 Thread Steve Holden
ible: you might change or adapt your components according to >>events, switch between entities, enable dynamic configuration etc. This >>can be achieved in C++, Java etc. as well but not without pain. > > > Having "static" properties and events is necessary for

Re: SQLAlchemy and py2exe

2006-10-21 Thread Steve Holden
install like > all the other packages? > > Thanks guys... > http://mail.python.org/pipermail/distutils-sig/2005-August/004945.html\ regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

Re: silent processing with python+modpython+cheetah

2006-10-21 Thread Steve Holden
s, > Sai krishna. http://wiki.python.org/moin/WebFrameworks regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -

Re: print dos format file into unix format

2006-10-21 Thread Steve Holden
gt; open(outfile, "wb").write(open(infile, "rb").read().replace("\r", "")) Or something like that ... :) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

Re: A Comparison Of Dynamic and Static Languiges

2006-10-22 Thread Steve Holden
r yourself lucky. Your "solution" is simplistic beyond belief. Are you *sure* you know in advance all potential senders from the USA? I'm (currently) in the UK, but sending via a .com domain that operated through a server in the USA. Where am I "from". I suspect your pos

Re: Fwd: Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-22 Thread Steve Holden
gt; At the moment SourceForge is only listing one (UK) mirror for mingw, and that seems to be down. I'm guessing something is broken, since I know it used to be much more widely available. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-22 Thread Steve Holden
out this state of affairs if I were running the mirror at UKC. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: A Comparison Of Dynamic and Static Languiges

2006-10-22 Thread Steve Holden
Fredrik Lundh wrote: > Steve Holden wrote: > > >>Since network 127 is reserved in its entirety for loopback (local >>process) use, it would seem that any DNS name that maps to an address in >>that space with the single exception of "localhost&qu

Re: Customize the effect of enumerate()?

2006-10-22 Thread Steve Holden
eone uses enumerate, it's going to number the items the same way as >>ever. Is there any way to modify that behavior, any special function to >>set? There doesn't appear to be, according to the docs, but it never >>hurts to make sure. > > > You can write your own e

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-23 Thread Steve Holden
dows (despite complaints from others who don't feel this happens quickly enough). regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings

Re: sharing persisten cache between modules

2006-10-23 Thread Steve Holden
thing > wrong. I´ve made a cache module, imported it in each of the > submodules. I don´t know how to make the data "static". > No, it doesn't. At least, not if the cache is global to the module that's imported by all the other ones. regards Steve -- Steve Holden +

Re: encoding of sys.argv ?

2006-10-23 Thread Steve Holden
or more information. sStarted with C:/Steve/.pythonrc >>> import sys >>> sys.stdin.encoding 'US-ASCII' >>> sys.getdefaultencoding() 'ascii' >>> The strings in sys.argv are encoded the same as the standard input, I bleieve. regards

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-23 Thread Steve Holden
Paul Boddie wrote: > Steve Holden wrote: > >>Fredrik Lundh wrote: >> >>>Méta-MCI wrote: >>> >>> >>>>For the professional developments, it is a major risk. > > > I'll cut in here and mention that it's a risk that ca

Re: python2.5 importerror on md5

2006-10-23 Thread Steve Holden
2.3-56)] on linux2 > > If anyone has encountered similar problems or knows of a way to > fix/suggestions please let me know. > I believe the _md5 module (as opposed to the md5 module) is a compiled extension. I'm guessing the import succeeds on the machine you used to build pyth

Re: Attempting to parse free-form ANSI text.

2006-10-23 Thread Steve Holden
message >>>> >>>> >> >>Sorry about the line wrap mess in the previous message. I try again with >>another setting: >> >>Frederic >> > > I give up! > > Don't give up, attach it as a file! regards Steve

Re: python2.5 importerror on md5

2006-10-23 Thread Steve Holden
x27;ll probably be somewhere like /usr/lib/python2.5/lib-dynload. When I said sys-prefix I meant the --exec-prefix configuration option, but actually I'm not sure what determines where shared libraries end up. At least knowing what you are looking for should help. This may affect other modules that use extension support. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get each pixel value from a picture file!

2006-10-23 Thread Steve Holden
m sure you'll have a lot of fun, and you can do a surprising amount of processing just noodling around in an interactive interpreter session. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

Re: How to get each pixel value from a picture file!

2006-10-23 Thread Steve Holden
to try out interactively ... > 3) pix = im.load() > print pix[44,55] > pix[44, 55] = value > my python cannt identify "[x,y]" ?? > Now what makes you think that an image can be addressed that way? I'd be quite surprised if yo got

Re: pretty basic instantiation question

2006-10-23 Thread Steve Holden
ay madness lies, as you end up creating Python statements on the fly using eval() and exec and other such dangerous and insanity-inducing tricks :-) Instead use a container structure like a list to hold them, and then use an appropriate technique to access them while they are still in the cont

Re: sharing persisten cache between modules

2006-10-24 Thread Steve Holden
qualify cm to get at the module's attributes, should you have chosen to call your module something inappropriately long. This reduces the typing still further. always-looking-to-avoid-typos-ly y'rs - steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: http call.

2006-10-24 Thread Steve Holden
. It doesn't matter what language the server uses: you will be talking HTTP to it! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio

Re: can't open word document after string replacements

2006-10-24 Thread Steve Holden
lieve. However, if your document can be adequately represented in RTF (rich-text format) then you could consider doing string replacements on that. I invoice the PyCon sponsors using this rather inelegant technique. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden

Re: Protecting against SQL injection

2006-10-24 Thread Steve Holden
s the supplied password. > Slightly safer than not doing anything to the user-supplied inputs, but nowehere near as safe as it needs to be. Use parameterized queries! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.co

Re: return same type of object

2006-10-24 Thread Steve Holden
ng else altogether? > The latter solution is more Pythonic, IMHO, as it works for subclasses. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings h

Re: The format of filename

2006-10-24 Thread Steve Holden
\temp> REM correctly opened the text file in notepad > > Windows seems to doing the translation inconsistently (I know > that comes as a shock...) > The command line processor parses the slash as a switch delimiter, but the system call interface doesn't know about such refinements

Re: Simple python + html + from --> to python script

2006-10-24 Thread Steve Holden
a2"].value print """\ Content-type: text/plain Hello: the data were: %s and %s""" % (d1, d2) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Steve Holden
sturlamolden wrote: [...] > This was an extremely stupid question on my side. I take my hat off to anyone who's prepared to admit this. We all do it, but most of us try to ignore the fact. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: return same type of object

2006-10-24 Thread Steve Holden
Bruno Desthuilliers wrote: > David Isaac a écrit : [...] > >>But Steve suggests going with the latter. > > > That's what I'd do too a priori. > Believe it or not, I wasn't at the priory when I wrote that. Sorry. regards Steve -- Steve Holden +

Re: [0T] Re: Simple python + html + from --> to python script

2006-10-24 Thread Steve Holden
aum > > > > button elements don't submit the form - they in fact don't do anything > unless you attach behaviour to them with javascript. What you want here > is an input type='submit'. > > Also, the "button" tag doesn't require a

Re: strange problem

2006-10-24 Thread Steve Holden
, for example, longest field-length for each column. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending Dictionary via Network

2006-10-24 Thread Steve Holden
If you don't have easy_install, get it! > Thanks so much, Bruno. > regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.i

Re: Want to reduce steps of an operation with dictionaries

2006-10-24 Thread Steve Holden
; c=dict([(k,v) for v,k in enumerate(a) if b.has_key(k)]) > erroneously (for me) gets: > {'a': 0, 'c': 2, 'd': 3} > > Thanks for your help. > In Python {'a':0, 'c':1, 'd':2} == {'a': 0, 'c': 2, 'd'

Re: How to find out the directory that the py file is in?

2006-10-24 Thread Steve Holden
he absolute dir name which the file is in? Is there any > function can be called easily? > > Thanks, > Peng > That would be os.path.split(os.path.abspath(__file__))[0] You *are* planning to read the documentation at some stage, right? ;-) regards Steve -- Steve Holden

Re: win32com problem

2006-10-24 Thread Steve Holden
nergy.StudyDoc.GetFirstTet(), perhaps? > while tet: > print str(tet) > tet = Synergy.StudyDoc.GetNextTet(tet) > > Any clues on what I'm doing wrong, or how to investigate whether there > is a bug in win32com or in the third party apps com implementation. >

Re: Want to reduce steps of an operation with dictionaries

2006-10-24 Thread Steve Holden
Carl Banks wrote: > Steve Holden wrote: > >>[EMAIL PROTECTED] wrote: >> >>>Hello: >>>I have next dictionaries: >>>a={'a':0, 'b':1, 'c':2, 'd':3} >>>b={'a':0, 'c':1, 'd':2

Re: To remove some lines from a file

2006-10-25 Thread Steve Holden
m: Remove the first two lines that don't begin with "@" from a file. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.ici

Re: cleaner way to write this?

2006-10-25 Thread Steve Holden
f dlg.ShowModal() == wx.ID_OK: > db_name = dlg.GetValue() > dlg.Destroy() > return db_name > > but I suppose it's a matter of preference. Of course, in 2.5 you can write db_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() return db_n

Re: cleaner way to write this?

2006-10-25 Thread Steve Holden
ave to check > in the wxpython group on how to handle this one, I think. I suspect you need to use a validator so the user can't click OK until they've put a value int eh text entry item. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: question about True values

2006-10-25 Thread Steve Holden
set() > > Any other value besides the above will compare as "not false". > And today's question for the novices is: which Python type did Skip miss from the above list? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: question about True values

2006-10-25 Thread Steve Holden
'if s: ' equivalent > to 'if s == True:' with a possible gain in readability. But - as you > demonstrate the cost of that (minimal) gain in readability would be too > high. In any event - I think it is mostly bad style to use a > non-boolean variable in '

Re: question about True values

2006-10-25 Thread Steve Holden
Paul Rubin wrote: > John Salerno <[EMAIL PROTECTED]> writes: > >>if (10 > 5) >>would be the same as >>if (10 > 5) == True > > > Yes. Though it would be bad style to write it in the latter way, not to mention less efficient. regards Steve -- St

Re: question about True values

2006-10-25 Thread Steve Holden
gt; > from the above list? >> >> more that one: >> >> 0L >> decimal.Decimal(0) # is decimal.Decimal('0'), also >> u'' >> array.array('c') # or any other typecode, I suspect, without initializer > > > Just for fun: > bu

Re: question about True values

2006-10-26 Thread Steve Holden
most of my programming in recent > years being in various dialects of Visual Basic (which probably > explains a lot). What attracts me to Python so far is the cool slice > operations, the iterators, the libraries and the convience of > programming in a REPL environment. So far,

Re: Handling emails

2006-10-26 Thread Steve Holden
ing messages with obnoxious content like this. If you insist on telling someone off publicly via a newsgroup, once is enough. I agree it's a pain, but Fulvio may not have it in his power to switch the header off. Mail admins do some incredibly stupid things. regards Steve -- Steve Holden

Re: displaying \n-less prompts in a pythonic way

2006-10-26 Thread Steve Holden
e user, returning the typed text''' > > sys.stdout.write(label) > return sys.stdin.readline() > Or use raw_input(), which was designed for such situations: >>> mystr = raw_input("Who is this? ") Who is this? Steve regards Steve -

Re: doesnt seems to work can any help be provided

2006-10-26 Thread Steve Holden
Arun Nair wrote: [stuff] You will find people are willing to help, even sometimes with homework questions, when questioners show some evidence that they are looking to learn rather than simply to have their problems solved for them. regards Steve -- Steve Holden +44 150 684 7255 +1

Re: question about True values

2006-10-26 Thread Steve Holden
Ben Finney wrote: > Gabriel Genellina <[EMAIL PROTECTED]> writes: > > >>At Wednesday 25/10/2006 23:29, Paul Rubin wrote: >> >>>Steve Holden <[EMAIL PROTECTED]> writes: >>>I get that iter(()) is True (Python 2.3.4). >> No I didn't -

Re: Insert Content of a File into a Variable

2006-10-26 Thread Steve Holden
oesn't print the content of the file. > Because you haven't read it! data = open('somefile.txt').read() print data regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

Re: To Stop a Process that is Waiting on socket.accept()

2006-10-26 Thread Steve Holden
0, in cleanup > server.shutdown(SHUT_RDWR) > NameError: global name 'SHUT_RDWR' is not defined > ---end--- > > Can anybody suggest a better way to do this? > You haven't copied the code you are actually running. The program above may or may not work, bu

Re: Matching Pure Numeric and '' with Python re

2006-10-27 Thread Steve Holden
gt;>> for word in list: ... if p.match(word): ... print "[%s]" % word ... [0123] [] >>> There is, however, an old saying to the effect that if you try to solve a problem with regular expressions you then have *two* problems. If this isn't jus

Re: question about True values

2006-10-27 Thread Steve Holden
ew people have more right to call you on this than the effbot, well known for his prolific output. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: question about True values

2006-10-27 Thread Steve Holden
gt;with reality. >> >>pointers, please. > > > Sorry, the answer is no. I don't care whether you can locate my code > or not or wish to believe me or not. > ... though I might have got more hits by spelling your name correctly :) regards Steve -- Steve Holden

Re: my first software

2006-10-27 Thread Steve Holden
insists on treating forard slashes ONLY as option indicators. > >>exemaker? some kind of web server? > > > Okay, didn't know that :) > > Regards, > > > Björn > regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web L

Re: question about True values

2006-10-27 Thread Steve Holden
rce community": > print "thank you" > else: > print "bugger off" > > bugger off > > Clearly this is not true. (Google Cliff/Dyer open source: only 11 > hits.), but the string is *something* so the if block gets evalua

Re: Where do nested functions live?

2006-10-28 Thread Steve Holden
bar(): isn't executed until the foo() function is called, and its execution binds the name bar in foo's local namespace to the function that is defined. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

Re: correct parameter usage for "select * where id in ..."

2006-10-28 Thread Steve Holden
sql, (values, )) which I repsume is shat you really meant to do. Note, though, that not all DB API modules will accept lists and/or tuples as data elements of that kind, so you may be disappointed. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: Import if condition is correct

2006-10-28 Thread Steve Holden
le times: it's not. Python only runs the module's code the first time the module is imported into a program. A further import statement effectively does noting, because the interpreter sees (from an entry in the sys.modules dictionary) that the module is already present. regards Ste

Re: Import if condition is correct

2006-10-28 Thread Steve Holden
MindClass wrote: > Steve Holden wrote: > >>I'm guessing that you think this might be necessary to avoid importing >>the same module multiple times: it's not. Python only runs the module's >>code the first time the module is imported into a program. A furt

Re: PROBLEM with MOD_PYTHON

2006-10-28 Thread Steve Holden
ple backslashes is indeed because of the use of repr() > when doing the error dump. For gmane users the list is also available as newsgroup gmane.comp.python.mod_python regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb

Re: importing class

2006-10-29 Thread Steve Holden
t; and "command2" function, this may just be because you are only quoting partial code). Then in your main program create the object with myDialog = YesNo(master, "Yes", "No") Looks like you are new to Python - perseverre and you will pick it up quite quickl

Re: wxPython for web development?

2006-10-30 Thread Steve Holden
walterbyrd wrote: > I assume that wxWidgets can not be used if all you have is mod-python? > Correct. wxPython assumes access to some sort of screen-based interface, with direct keyboard and mouse input. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web L

Re: [wxPython] wxFrame don't have Bind attribute ??

2006-10-30 Thread Steve Holden
you have already gained to write a *short* program that exhibits the same failure. Then post the code and the traceback. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogsp

Re: importing class

2006-10-30 Thread Steve Holden
nly way to tell your object which callbacks to call! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://

Re: create global variables?

2006-10-30 Thread Steve Holden
It would be *much* easier and *much* better programming practice to modify your code so the function returns a two-element tuple, which you then assign to two variables in an unpacking assignment. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd

Re: enumerate improvement proposal

2006-10-30 Thread Steve Holden
or her own faculty economist (or statistician or > physicist) and get them to radically change their computational tools. > When you've walked a mile in my shoes, leaky abstractions won't seem > like such a big deal after all. > Divorce is obviously the only answer. How could you

Re: Python windows interactive.

2006-10-30 Thread Steve Holden
vely once you learn the conventions, but once functionality "hardens" into something of five lines or more that you want to experiment with you will find it's usually easier to edit a script or program in a text file and run it. This is even more the case when you start to use

Re: create global variables?

2006-10-31 Thread Steve Holden
atom) Xma = pt.get(atom) return Xaa, Xma Unless there is something decidedly odd about the side-effects of the statements I've removed, since you never appear to use the values of a, m, Xaa and Xma there seems little point in calculation them. regards Steve -- Steve Ho

Re: 3d programming without opengl

2006-10-31 Thread Steve Holden
arizes them here > (http://slut.sourceforge.net/examples/index.html), but the little videos > don't do them justice. > Looks like c.l.py just slashdotted you ... """The GeoCities web site you were trying to view has temporarily exceeded its data transfer limit. Please t

Re: create global variables?

2006-10-31 Thread Steve Holden
Alistair King wrote: > Steve Holden wrote: > >>[EMAIL PROTECTED] wrote: >> >> >>>J. Clifford Dyer wrote: >>> >>> >>> >>>>Alistair King wrote: >>>> >> >>[... advice and help ...] >

Re: scared about refrences...

2006-10-31 Thread Steve Holden
on't know.. maybe I have more to learn. > You do. Firstly, learn to leave your paranoia outside your programming life. If a function or method makes undocumented changes to its mutable parameters then it needs changing (or its documentation does). Adequate testing should reveal such nonsenses be

Re: import in threads: crashes & strange exceptions on dual core machines

2006-10-31 Thread Steve Holden
internals will have to answer the question of > what _should_ be occurring. > ... and who better than Tim Peters? http://mail.python.org/pipermail/python-list/2004-December/254497.html HTH regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web L

Re: Where do nested functions live?

2006-11-01 Thread Steve Holden
and forgot was this: Since we have a class that goes out of scope > when the function returns, and we don't need more than one instance, why > bother to make an instance? Why not use the class object itself? > > def whatever( new_ms ): > > class scope ( object ): > &g

Re: logo design

2006-11-01 Thread Steve Holden
olution spat you out to lead us all to the light, huh? > > No personal offense intended, but you're a boring, elitist prick. > > - alex23 > This conversation has clearly descended to the level where it needs to be taken to email. Nobody wants to read this. regards Stev

Re: re question

2006-11-01 Thread Steve Holden
lt;.+>") >>> nongreedy = re.compile("<.+?>") >>> m1 = greedy.match(target) >>> m2 = nongreedy.match(target) >>> m1.group(0) 'Sample String' >>> m2.group(0) '' >>> regards Steve -- Steve Holde

Re: CSV module, DictReader problem (bug?)

2006-11-01 Thread Steve Holden
csv', since those work just fine 'cause the Windows >>APIs deal with them properly. > > > Not all APIs do the right thing. If you fire up the cmd.exe shell and > feed it slashes as path separators, it barfs. Example: > C:\junk>dir c:/junk/*.bar > Invalid

Re: can I import the module twice (under differnet names)

2006-11-02 Thread Steve Holden
mespace as well as independent code objects and so on then you will have to somehow persuade the interpreter that they come from different files, I believe. If you just want to be able to use several names to refer to the same module then you have already had a coupe of good answers. regards Stev

Re: is mod_python borked?

2006-11-02 Thread Steve Holden
that? Like all systems mod_python has its limitations, but it has an active development community who are extremely responsive to user and developer input. Follow-ups set to gmane.comp.python.mod_python. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden We

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
(presumably INSERTing the new researcher's details first). To minimize consistency problems it would help to make all of these insertions as a single database transaction. > Hope that makes sense. It seems like such a common task. > regards Steve -- Steve Holden +44 150

Re: string formatter for tuple

2006-11-02 Thread Steve Holden
n to the "a single object can be formatted as a single argument rather than a tuple" rule is when that single object is itself a tuple! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenwe

Re: Help on writing P2P Streaming client

2006-11-02 Thread Steve Holden
o get this done. > > Every help is appreciated. > I take it you know BitTorrent is written in Python? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com R

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
rough 9. To write record 7 only you could use dbWrite(rec[7]) conn.commit() # assuming dbWrite uses connection conn del rec[7] # you'd also want to kill the window containing this record To write them all you might try for r in rec: dbWrite(r) conn.

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
JohnJSal wrote: > Steve Holden wrote: > > >> del rec[7] > > > Hmmm, but what if the record can remain open, changes can be made, and > then saved again to the same object? I suppose it isn't necessary to > delete them, right? Man, this stuff gets compli

Re: creating new objects with references to them

2006-11-02 Thread Steve Holden
l the information in the fields, but how do I then associate it with > that second instance? > > (Or I wonder if I really even need to, since upon saving, the > information gets stored in the database immediately. Maybe I don't even > need a Researcher class at all.) > How abo

Re: Python in sci/tech applications

2006-11-02 Thread Steve Holden
d but I don't see MinGW listed in that page... >>Maybe it's included but not listed... > > > It's there. > Well I tend to believe you, but Firefox is calling you a liar: a search fails at "min". Do you anticipate a 2.5-based release any ti

Re: scared about refrences...

2006-11-02 Thread Steve Holden
o another objet >>doesn't impact the name=>object binding in the caller's namespace), but >>this name really refers to the same object (Python doesn't copy anything >>unless explicitely told to do so). >> >>HTH > > > > I

Re: is mod_python borked?

2006-11-02 Thread Steve Holden
ir to Walter, it was me who reposted his question. But I think it's great that the whole of c.l.py is now up to speed on mod_python, so thanks! regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

Re: what's the difference between these two methods? (aka, why doesn't one of them work?)

2006-11-02 Thread Steve Holden
intelligent as it is. I think it does a remarkably complete emulation of a human being: http://www.flickr.com/photos/[EMAIL PROTECTED]/152495923/ For what it's worth it's also amazingly helpful if you can ignore to sometimes acerbic wit. regards Steve -- Steve Holden

Re: SE 2.3 temporarily unavailable. Cheese shop defeats upload with erratic behavior. Urgently requesting help.

2006-11-03 Thread Steve Holden
hange of email address could probably be achieved by tweaking the data for one or two individuals, and an automated solution should clearly be added as volumes build up. For now, how about a link that causes someone to receive email? I'd be surprised if this couldn't b

Re: SE 2.3 temporarily unavailable. Cheese shop defeats upload with erratic behavior. Urgently requesting help.

2006-11-03 Thread Steve Holden
jim-on-linux wrote: > On Friday 03 November 2006 08:21, Steve Holden > wrote: > >>Frederic Rentsch wrote: >> >>>jim-on-linux wrote: >>> >>>>Frederic, >>>> >>>>I've been trying to get back into my package >>>

Re: Converting Microsoft Works databases.... *shudder*

2006-11-03 Thread Steve Holden
dBase database > and MS Word, MS Excel, and any other ODBC aware product Including, presumably, mx.ODBC in Python, which gives the most attractive possibilities for output. can read the > data. If the data size is large or if you want to move to server, you > can do that later. >

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-03 Thread Steve Holden
of objects that only refer to each other without being bound to a name in any current namespace or to any container object bound to such a name. In other words, it detects (and reclaims) objects with non-zero reference counts which nevertheless can be reclaimed without ill effect on the program. regar

Re: Javascript is turning into Python?!

2006-11-03 Thread Steve Holden
binding more than > one variable. > with x as f(), y as g(): >blah (x, y) Wouldn't that be with f() as x, g() as y: blah(x, y) regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenw

Re: PySchool - Online Python Web Framework Workshop.

2006-11-03 Thread Steve Holden
a radio button, since you ask submitters to "check all that apply". regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list

<    11   12   13   14   15   16   17   18   19   20   >