Re: Speed ain't bad

2005-01-03 Thread Jeff Shannon
then the 'if ...' might be slightly faster, even though the exception-based route is more Pythonic. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: what is lambda used for in real code?

2005-01-03 Thread Jeff Shannon
on body rather than burying that manipulation somewhere in the argument list. Personally I'd call this a wash, though I expect that others will disagree with me. ;) And whatever the merits of this particular case, similar cases may not be so easy to avoid in this fashion... Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Help clean up clumsy code

2005-01-04 Thread Jeff Shannon
7;s version works on strings (and unicode objects) because they lack an __iter__() method, even though they follow the (older) sequence protocol. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda as declarative idiom

2005-01-04 Thread Jeff Shannon
maybe even a new process or thread... d = a + e(3) I see this as simply a combination of both of the aforementioned concepts -- argument control plus moment-of-evaluation control. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 on Windows XP

2005-01-05 Thread Jeff Shannon
troubleshoot a bit more effectively. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 on Windows XP

2005-01-05 Thread Jeff Shannon
ctive mode, and since you didn't give it a script to run, it simply started, found nothing to do, and then terminated itself. You need to run idle.pyw, *not* pythonw.exe. The idle.pyw script runs inside the pythonw.exe interpreter, but the latter can't do anything without instruc

Re: What could 'f(this:that=other):' mean?

2005-01-05 Thread Jeff Shannon
anted (2), perhaps function calls are first in the queue for syntactic sugar. Huh? How much simpler of syntax do you want for calling a function? I'm not sure what you'd want as "sugar" instead of funcname(). Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-06 Thread Jeff Shannon
but shrewd risk-taking -- if you take a one-in-three chance of making a tenfold return on investment, then 66% of the time you'll lose but if you hit those odds just once, you'll come out way ahead.) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: What could 'f(this:that=other):' mean?

2005-01-06 Thread Jeff Shannon
Jonathan Fine wrote: Jeff Shannon wrote: Jonathan Fine wrote: Giudo has suggested adding optional static typing to Python. (I hope suggested is the correct word.) http://www.artima.com/weblogs/viewpost.jsp?thread=85551 An example of the syntax he proposes is: > def f(this:that=ot

Re: sorting on keys in a list of dicts

2005-01-06 Thread Jeff Shannon
) in L2] I suppose that your version has the virtue that, if the sortkey value is equal, items retain the order that they were in the original list, whereas my version will sort them into an essentially arbitrary order. Is there anything else that I'm missing here? Jeff Shannon Technician/Pr

Re: The Industry choice

2005-01-06 Thread Jeff Shannon
attempt to *encourage* hardworking programmers to share in a public commons, by ensuring that what's donated to the commons remains in the commons. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-06 Thread Jeff Shannon
special cases aren't special enough to break the rules". Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-06 Thread Jeff Shannon
many open variables to consider. One can't control for all of them in experiments (what few experiments are practical in social sciences, anyhow), and they make any anecdotal evidence hazy enough to be suspect. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.or

Re: Securing a future for anonymous functions in Python

2005-01-06 Thread Jeff Shannon
Paul Rubin wrote: Jeff Shannon <[EMAIL PROTECTED]> writes: It seems to me that in other, less-dynamic languages, lambdas are significantly different from functions in that lambdas can be created at runtime. What languages are those, where you can create anonymous functions at runtime, b

Re: The Industry choice

2005-01-07 Thread Jeff Shannon
Paul Rubin wrote: Jeff Shannon <[EMAIL PROTECTED]> writes: Note that the so-called 'viral' nature of GPL code only applies to *modifications you make* to the GPL software. Well, only under an unusually broad notion of "modification". True enough. It can be difficul

Re: The Industry choice

2005-01-07 Thread Jeff Shannon
duct in which your code is linked together with LGPL'ed code does *not* require that your code also be (L)GPL'ed. Changes to the core library must still be released under (L)GPL, but application code which merely *uses* the library does not. (I've forgotten, now, exactly how LGPL d

Re: The Industry choice

2005-01-07 Thread Jeff Shannon
Alex Martelli wrote: Jeff Shannon <[EMAIL PROTECTED]> wrote: Note that the so-called 'viral' nature of GPL code only applies to *modifications you make* to the GPL software. The *only* way in which your code can be 'infected' by the GPL is if you copy GPL source.

Re: Calling Function Without Parentheses!

2005-01-07 Thread Jeff Shannon
a questionable usage is an error or not. Better to have that done by a developer tool (pychecker) than through runtime checks every time the program is used. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting on keys in a list of dicts

2005-01-07 Thread Jeff Shannon
Nick Coghlan wrote: Jeff Shannon wrote: I suppose that your version has the virtue that, if the sortkey value is equal, items retain the order that they were in the original list, whereas my version will sort them into an essentially arbitrary order. Is there anything else that I'm mi

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Jeff Shannon
quot;integers". With all due respect to Richard Feynman, I'd have thought that "counting numbers" would be non-negative integers, rather than the full set of integers... which, I suppose, just goes to show how perilous it can be to make up new, "more natural" terms

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Jeff Shannon
ry rat, at least, map/lambda was always a nasty puzzle for me and difficult to sort out. But when list comps were introduced, after reading just a sentence or two on how they worked, they were completely clear and understandable -- much more so than map/lambda after many months of exposure

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread Jeff Shannon
enough that lambda would be undesireable if not impossible, or they're simple and numerous (e.g. calling a function with different parameters) such that it's easy to write a factory function that returns closures rather than feed the parameter in with a lambda. Jeff Sha

Re: python3: 'where' keyword

2005-01-11 Thread Jeff Shannon
de of someone who wants to write Visual Basic as filtered through Java and Perl... If I want mental gymnastics when reading code, I'd use Lisp (or Forth). (These are both great languages, and mental gymnastics would probably do me good, but I wouldn't want it as part of my day-t

Re: reference or pointer to some object?

2005-01-11 Thread Jeff Shannon
mutate it. Since it's the same object, it doesn't matter where the mutation happened. But in rebind(), we're moving the somedict label to a *new* dict object. Now d and somedict no longer point to the same object, and when the function ends the object pointed to by so

Re: python guy ide

2005-01-11 Thread Jeff Shannon
command shell open. Edit, save, alt-tab to command shell, uparrow-enter to run program... not as convenient as a toolbar button or hotkey, but it works. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: a new Perl/Python a day

2005-01-12 Thread Jeff Shannon
Jon Perez wrote: ... or why 'Perl monkey' is an oft-heard term whereas 'Python monkey' just doesn't seem to be appropriate? That's just because pythons are more likely to *eat* a monkey than to be one :) Jeff Shannon Technician/Programmer Credit Internati

Re: Refactoring; arbitrary expression in lists

2005-01-12 Thread Jeff Shannon
;cc"): return extToMimeDict["cpp"] If the intent of this is to catch .cc files, it's easy to add an extra entry into the dict to map '.cc' to the same string as '.cpp'. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2005-01-12 Thread Jeff Shannon
nd) to map/lambda than it is to a list comprehension. In this case, at least the code block is visually self-contained in a way that lambdas are not, but I still have to do more mental work to visualize the overall results than I need with list comps. Jeff Shannon Technician/Programmer Credit Int

Re: reference or pointer to some object?

2005-01-12 Thread Jeff Shannon
acking) and use exceptions to indicate error status. Changing the value of a parameter is a side-effect that complicates reading and debugging code, so Python provides (and encourages) more straightforward ways of doing things. Jeff Shannon Technician/Programmer Credit International -- http://mai

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-13 Thread Jeff Shannon
your nested function would have access to the outer namespace via normal nested scopes, so I'm really not seeing what the gain is... (Then again, I haven't been following the whole using/where thread, because I don't have that much free time and the initial postings failed to c

Re: reference or pointer to some object?

2005-01-13 Thread Jeff Shannon
Antoon Pardon wrote: Op 2005-01-12, Jeff Shannon schreef <[EMAIL PROTECTED]>: It's also rather less necessary to use references in Python than it is in C et. al. You use nothing but references in Python, that is the reason why if you assign a mutable to a new name and modify the obj

Re: Refactoring; arbitrary expression in lists

2005-01-13 Thread Jeff Shannon
dicts are unordered, the ordering of the literal (or of a set of statements adding to the dict) doesn't matter. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Jeff Shannon
B now. And besides, for long-term archiving purposes, I'd expect that zip et al on a character-stream would provide significantly better compression than a 4:1 packed format, and that zipping the packed format wouldn't be all that much more efficient than zipping the character stream

Re: finding/replacing a long binary pattern in a .bin file

2005-01-13 Thread Jeff Shannon
is simpler. (For a large file, chunking it might be necessary, though...) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: reference or pointer to some object?

2005-01-13 Thread Jeff Shannon
s s = func(s) This seems to be a way to go, but it becomes messy if i hand over lots of parameters and expect some more return functions. This has the advantage of being explicit about s being (potentially) changed. References, in the way that you mean them, are even messier in the case of nume

Re: What strategy for random accession of records in massive FASTA file?

2005-01-13 Thread Jeff Shannon
for RNA sequences as well as DNA sequences, you've got at least a fifth base to represent, which means you need at least three bits per base, which means only two bases per byte (or else base-encodings split across byte-boundaries) That gets ugly real fast.) Jeff Shannon Tec

Re: hash patent by AltNet; Python is prior art?

2005-01-17 Thread Jeff Shannon
ings get too bad here, I'd like to have somewhere pleasant to emigrate to. ;) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Fuzzy matching of postal addresses

2005-01-17 Thread Jeff Shannon
a more-detailed matching, you might look into finding an algorithm to determine the "distance" between two strings and using that to score possible matches. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: macros

2005-01-18 Thread Jeff Shannon
anageable level. To rephrase this a bit more succinctly ;) there's a big difference between having no practical way to prevent something, and actually encouraging it. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Assigning to self

2005-01-18 Thread Jeff Shannon
ol over the circumstances in which your Singleton will be created and/or retrieved, and it also makes it trivial to replace the Singleton with some other pattern (such as, e.g., a Flyweight or Borg object) should the need to refactor arise. Jeff Shannon Technician/Programmer Credit International --

Re: Zen of Python

2005-01-19 Thread Jeff Shannon
uch closer to the "completely flat" side of things. It's not "... as nested (or as flat) as you have to be and no more", it's "... as nested as you have to be and no more, but if you need significant nesting, you might want to re-examine your design". ;) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: why am I getting a segmentation fault?

2005-01-21 Thread Jeff Shannon
ore robust (and readable) fashion. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: default value in a list

2005-01-21 Thread Jeff Shannon
ot;a:b:c".split(':') >>> o = LineObj(*l) >>> o.__dict__ {'a': 'a', 'c': 'c', 'b': 'b', 'e': None, 'd': None} >>> This is a bit more likely to be meaningful, in that there's

Re: Tuple slices

2005-01-24 Thread Jeff Shannon
mory allocation, and for a reasonable tuple the size of the memory required is not going to significantly affect the allocation time. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Another scripting language implemented into Python itself?

2005-01-24 Thread Jeff Shannon
cripts, you'll probably have the same security issues I mentioned for Python. Unless you really need that level of features, you may be better off designing your own limited language. Check into the docs for pyparsing for a starter... Jeff Shannon Technician/Programmer Credit Internatio

Re: is this use of lists normal?

2005-01-24 Thread Jeff Shannon
e in a master dictionary keyed by id -- in other words, simply replace the tuples in my previous example with a dict like what you've got here. You could also create a simple class to hold each item, rather than using small dicts. (You'd probably still want to store class instances in a master dict keyed by id.) Generally, any time your problem is to use one piece of information to retrieve another piece (or set) of information, dictionaries are very likely to be the best approach. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Classical FP problem in python : Hamming problem

2005-01-25 Thread Jeff Shannon
ng the identifiers made it so that you felt the need to add a comment indicating what they were identifying, I'd say that yes, the long words *are* helpful. ;) Comments are good, but self-documenting code is even better. Jeff Shannon Technician/Programmer Credit International -- http://mail

Re: Tuple slices

2005-01-25 Thread Jeff Shannon
his purely abstract philosophy? Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Another scripting language implemented into Python itself?

2005-01-25 Thread Jeff Shannon
n letting them script it in Python is a perfectly valid (and probably quite desirable) approach. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Browsing text ; Python the right tool?

2005-01-25 Thread Jeff Shannon
one of Python's RAD tools (Boa Constructor, or maybe PythonCard, as examples) you'd be able to get very nice results. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Help! Host is reluctant to install Python

2005-01-25 Thread Jeff Shannon
#x27;t be too horrible on resources/management, and that he shouldn't be so afraid to try something new... Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-25 Thread Jeff Shannon
h requires complex inheritance trees. In Python, an object is whatever type it acts like -- behavior is more important than declared type, so there's no value to having a huge assortment of potential types. Deep inheritance trees only happen when people are migrating from Java. ;) Jeff

Re: python without OO

2005-01-25 Thread Jeff Shannon
odes of expression, different ways of approaching the same problem. That's *why* we have so many different programming languages -- because no single approach is the best one for all problems, and knowing multiple approaches helps you to use your favored approach more effectively. J

Re: Browsing text ; Python the right tool?

2005-01-26 Thread Jeff Shannon
John Machin wrote: Jeff Shannon wrote: [...] If each record is CRLF terminated, then you can get one record at a time simply by iterating over the file ("for line in open('myfile.dat'): ..."). You can have a dictionary classes or factory functions, one for each record type

Re: inherit without calling parent class constructor?

2005-01-26 Thread Jeff Shannon
), then you can give D's __init__() a B parameter that defaults to None. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Browsing text ; Python the right tool?

2005-01-26 Thread Jeff Shannon
John Machin wrote: Jeff Shannon wrote: [...] For ~10 or fewer types whose spec doesn't change, hand-coding the conversion would probably be quicker and/or more straightforward than writing a spec-parser as you suggest. I didn't suggest writing a "spec-parser". No (mechanical)

Re: python without OO

2005-01-27 Thread Jeff Shannon
te, and you have the very essence of object-oriented programming. (What you describe here *is* object-oriented programming, you're just trying to avoid the 'class' statement and use module-objects where 'traditional' OO would use class instances.) Jeff Shannon Techn

Re: how to comment out a block of code

2005-01-27 Thread Jeff Shannon
just for this! Normally it's a large round button, with perhaps a green backlight. Press the button and hold it in for about 3 seconds, and the rest of your code/writing will be ignored just as it should be. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.o

Re: subprocess.Popen() redirecting to TKinter or WXPython textwidget???

2005-01-27 Thread Jeff Shannon
our GUI widgets directly from the worker (i/o) thread -- very few GUI toolkits are threadsafe, so you need to make all GUI calls from a single thread. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: String Fomat Conversion

2005-01-27 Thread Jeff Shannon
me size for your test is a reflection of buffering. The next question is, which provides the most *conceptual* simplicity? (The answer to that one, I think, depends on how your brain happens to see things...) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: inherit without calling parent class constructor?

2005-01-27 Thread Jeff Shannon
Christian Dieterich wrote: On Dé Céadaoin, Ean 26, 2005, at 17:09 America/Chicago, Jeff Shannon wrote: You could try making D a container for B instead of a subclass: Thank you for the solution. I'll need to have a closer look at it. However it seems like the decision whether to do

Re: inherit without calling parent class constructor?

2005-01-27 Thread Jeff Shannon
Christian Dieterich wrote: On Déardaoin, Ean 27, 2005, at 14:05 America/Chicago, Jeff Shannon wrote: the descriptor approach does. In either case, the calculation happens as soon as someone requests D.size ... Agreed. The calculation happens as soon as someone requests D.size. So far so good

Re: Question about 'None'

2005-01-27 Thread Jeff Shannon
flamesrock wrote: I should also mention that I'm using version 2.0.1 (schools retro solaris machines :( ) At home (version 2.3.4) it prints out 'True' for the above code block. That would explain it -- as /F mentioned previously, the special case for None was added in 2.1

Re: Basic file operation questions

2005-02-03 Thread Jeff Shannon
be an issue in the vast majority of cases, but I'm naturally curious :) Disk access should be buffered, possibly both at the C-runtime level and at the file-iterator level (though I couldn't swear to that). I'm sure that the C-level buffering happens, though. Jeff Shannon Technic

Re: returning True, False or None

2005-02-04 Thread Jeff Shannon
for item in lst: if item is True: return True if item is False: answer = False return answer But yeah, the original, straightforward way is probably enough clearer that I wouldn't bother with anything else unless lists might be long enough for performance to matter. Je

Re: returning True, False or None

2005-02-04 Thread Jeff Shannon
Jeremy Bowers wrote: On Fri, 04 Feb 2005 16:44:48 -0500, Daniel Bickett wrote: [ False , False , True , None ] False would be returned upon inspection of the first index, even though True was in fact in the list. The same is true of the code of Jeremy Bowers, Steve Juranich, and Jeff Shannon. As

Re: changing local namespace of a function

2005-02-04 Thread Jeff Shannon
ating dictionaries that'll be passed into functions, create class instances. class MyClass(object): def __init__(self, **kwargs): for key, val in kwargs: setattr(self, key, val) def fun(self): self.z = self.y + self.x a = MyClass(x=1, y=2) a.fun() print a.z Je

Re: [noob] Error!

2005-02-04 Thread Jeff Shannon
rpreter and try fiddling with things. You've got a lot of subexpressions there; pick some values and try each subexpression, one at a time, and take a look at what you get. I bet that it won't take you long to figure out why you're not getting the result you expect. J

Re: variable declaration

2005-02-08 Thread Jeff Shannon
. After it, on step (3) you can safely and peacefully add new PowerOfGenerator variable. You can also get all places where said variable exists by using grep, or your editor's search feature. I don't see how a var declaration gains you anything over 'grep PowerOfGenerator *.py

Re: Basic file operation questions

2005-02-08 Thread Jeff Shannon
losed during program shutdown if it hasn't happened before then. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-08 Thread Jeff Shannon
on a single installation medium would be a tricky edge case. I suspect it *could* be done in a GPL-acceptable way, but one would need to take care about it.) Of course, this is only my own personal interpretation and opinion -- IANAL, TINLA, YMMV, etc, etc. Jeff Shannon Technician/Program

Re: interactive execution

2005-02-08 Thread Jeff Shannon
real security, because malicious code can still get to __builtins__ from almost any object...) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: interactive execution

2005-02-09 Thread Jeff Shannon
the exec'ed statement actually sees, as well as what happens with the results. (But as I mentioned before, there is no real security here if you're exec'ing arbitrary code -- there's no sandboxing involved, and the exec'ed string *can* use that __builtins__ reference (among other things) to do all sorts of malicious stuff.) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2005-02-09 Thread Jeff Shannon
may (as just one of many examples) be much better off with something more like: for i in range(n)[::-1]: func(n) The '[::-1]' iterates over the range in a reverse (decreasing) direction; this may or may not be necessary depending on the circumstances. Jeff Shannon Technician/

Re: Is Python as capable as Perl for sysadmin work?

2005-02-09 Thread Jeff Shannon
Courageous wrote: *checks self to see if self is wearing rose colored glasses* assert(self.glasses.color != 'rose') ;) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2005-02-10 Thread Jeff Shannon
Dennis Lee Bieber wrote: On Wed, 09 Feb 2005 18:10:40 -0800, Jeff Shannon <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: for i in range(n)[::-1]: func(n) Shouldn't that be func(i) (the loop index?) You're right, that's what I *

Re: how can I replace a execfile with __import__ in class to use self variables

2005-02-10 Thread Jeff Shannon
-- def pr(self): print self.var --- (Though frankly I don't see the advantage of having this tiny function in a separate file to begin with...) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: [N00B] What's %?

2005-02-10 Thread Jeff Shannon
the interval [0...4) (including 0 but not including 4). Modulus is useful for all sorts of periodic behavior. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2005-02-11 Thread Jeff Shannon
Dennis Lee Bieber wrote: On Thu, 10 Feb 2005 09:36:42 -0800, Jeff Shannon <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: And as Peter Hansen points out, none of the Python versions leave n in the same state that the C loop does, so that's one more way in whic

Re: goto, cls, wait commands

2005-02-11 Thread Jeff Shannon
not* take that opportunity to purge things like GOTO. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Jeff Shannon
act) matches to his "requirements". Instead of saying "Hey, someone's done half my work for me -- great!", he's saying "Hey, why haven't you done the rest of my work!" Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables.

2005-02-15 Thread Jeff Shannon
eed -- it looks like this worked perfectly to me, so the issue is in what's expected. :) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Jeff Shannon
ot;Interpretation is irrelevant. Logic is irrelevant. You will be assimilated." Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling a function from module question.

2005-02-15 Thread Jeff Shannon
names do that nicely. What do you see as the harm of using it?) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables.

2005-02-15 Thread Jeff Shannon
Bruno Desthuilliers wrote: Jeff Shannon a écrit : If running a console app from Explorer, the console will close as soon as the app terminates. Using raw_input() at the end of the app means that it won't close until the user hits Enter. So why dont you just open the console before runnin

Re: super not working in __del__ ?

2005-02-16 Thread Jeff Shannon
x27;t ever (normally) be cleaned up while they're still in use, but during program shutdown refcounting necessarily ceases to apply. The closest that would happen in C++, I believe, would manifest itself as memory leaks and/or access of already-freed memory. Jeff Shannon Technician/Programmer Credi

Re: [newbie]How to install python under DOS and is there any Wxpython can be installed under dos?

2005-02-16 Thread Jeff Shannon
u insist on using an OS that's been obsolete for a decade or more. ;) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: renaming 'references' to functions can give recursive problems

2005-02-16 Thread Jeff Shannon
name to this new function, it's simply calling itself. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't join() call str() on its arguments?

2005-02-16 Thread Jeff Shannon
se, one could ensure that unicode.join() used unicode() and str.join() used str(), but I can conceive of the possibility of wanting to use a plain-string separator to join a list that might include unicode strings. Whether this is a realistic use-case is, of course, a completely different quest

Re: Imported or executed?

2005-02-16 Thread Jeff Shannon
do more command-line checking than this...) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: super not working in __del__ ?

2005-02-16 Thread Jeff Shannon
__() is not a C++/Java destructor. Trying to make it into one is unlikely to give an overal benefit. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Font size

2005-02-16 Thread Jeff Shannon
27;t actually looked at it, but EasyGui (recently mentioned here; google should help you find it) may meet your needs and be simpler to use. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't join() call str() on its arguments?

2005-02-16 Thread Jeff Shannon
e), then str() will throw an exception. The Effbot mentioned a join() implementation that would be smart enough to do the right thing in this case, but it's not as simple as just implicitly calling str(). Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't join() call str() on its arguments?

2005-02-17 Thread Jeff Shannon
eep using that word. I do not think that it means what you think it means." Jeff Shannon -- http://mail.python.org/mailman/listinfo/python-list

Re: Pausing a program - poll/sleep/threads?

2005-02-17 Thread Jeff Shannon
se a timer to do this; just have it fire periodically every second or so, rather than only after several minutes.) Jeff Shannon -- http://mail.python.org/mailman/listinfo/python-list

Re: [newbie]How to install python under DOS and is there any Wxpython can be installed under dos?

2005-02-17 Thread Jeff Shannon
questionable. There *are* similar-but-not-compatible libraries for DOS... or perhaps I should say *were*, because I have no idea where one might find such a thing now. (Though I presume that Google would be the best starting place.) One would then need to find/create a Python wrapper for th

Re: Pausing a program - poll/sleep/threads?

2005-02-17 Thread Jeff Shannon
our server changing status without your client taking direct action. I really think that you *do* want to do fairly frequent status checks with your server. The cost is small, and the gains in responsiveness and robustness are potentially very significant. Jeff Shannon -- http://mail.python.org/mailman/listinfo/python-list

Re: How to wrap a class's methods?

2005-02-17 Thread Jeff Shannon
rgs, **kwargs) if s != 'OK': raise NotOK((s,r)) return r return wrapped I believe that this will be semantically almost equivalent, but conceptually slightly simpler. Jeff Shannon -- http://mail.python.org/mailman/listinfo/python-list

Re: super not working in __del__ ?

2005-02-17 Thread Jeff Shannon
Christopher J. Bottaro wrote: Jeff Shannon wrote: Python's __del__() is not a C++/Java destructor. Learn something new everyday... What is it then? Excuse my ignorance, but what are you suppose to do if your object needs to clean up when its no longer used (like close open file handles

Re: global var

2005-02-21 Thread Jeff Shannon
module-level reference "var". No variables are actually created in the execution of "global var". Jeff Shannon -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >