Re: Try: which only encompasses head of compound statement

2007-08-27 Thread Scott David Daniels
of the file it tried to get to in an attribute filename, so just catch it outside this code (as others have already suggested). -Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: beginner, idiomatic python

2007-08-26 Thread Scott David Daniels
a parameter, for i in f(v) is it defined that the variable is evaluated for every loop? Nope. Take the tutorial. for i in f(v): suite is the same as: iterator = iter(f(v)) for i in iterator: suite -Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org

Re: beginner, idiomatic python

2007-08-25 Thread Scott David Daniels
]) != bag([1,2,3,4]) bag([1,2,2,3]) - bag([1,2]) == bag([2,3]) bag([1,2,3]) - bag([3,4]) == bag([1]) Excellent. By symmetry, I see that list casts the set back into a list. Some will say 'sorted' is a better conversion of a set to list, since the result is well-defined. --Scott David Daniels [EMAIL

Re: beginner, idiomatic python

2007-08-23 Thread Scott David Daniels
in self.ported_pages(): if page.port in missing: missing.pop(page.port) if not missing: break sampleList = missing.values() ... -Scott David Daniels -- http://mail.python.org/mailman/listinfo/python-list

Re: introspection and functions

2007-08-22 Thread Scott David Daniels
yagyala wrote: Hi. I would like to be able to tell, at run time, how many parameters a function requires. Ideally I would like to be able to tell which are optional as well. I've tried looking at the functions attributes, but haven't found one that helps in this. How can I do this? Thanks

Re: Can I add methods to built in types with classes?

2007-08-19 Thread Scott David Daniels
CC wrote: ... But am still a long way from seeing how I can use this OOP stuff. ... I wrote: from string import hexdigits def ishex(word): for d in word: if d not in hexdigits: return(False) else return(True) Then I can do this to check if a string is safe

Re: clarification

2007-08-17 Thread Scott David Daniels
Laurent Pointal wrote: Thomas Jollans a écrit : On Friday 17 August 2007, Beema shafreen wrote: hi everybody, i have a file with data separated by tab mydata: fhl1fkh2 zip shows these two are separated by tab represented as columns i have to check the common data between these two

Re: help on object programing

2007-08-17 Thread Scott David Daniels
is hidden while Small is being defined. -Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Relative Imports

2007-07-17 Thread Scott David Daniels
dealt with this. Thanks for your help, -Pat My guess (without seeing your code or error messages; shame on you) is that you are running A/B/anothermodule.py; not -m A.B.anothermodule -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Implementaion of random.shuffle

2007-07-16 Thread Scott David Daniels
shabda raaj wrote: ... Oh, I wasn't aware that I could see the source of all python modules Well, actually not _all_ (or is that __all__), but that is exactly why so many of us love Python -- no magic (or at least as little as needed). --Scott David Daniels [EMAIL PROTECTED] -- http

Re: Portable general timestamp format, not 2038-limited

2007-07-02 Thread Scott David Daniels
way to know if a stamp is leap-second aware or not; you'll just have to know for a whole group. Once you have done a naive difference, there is no way to correct it. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: is this a valid import sequence ?

2007-06-24 Thread Scott David Daniels
unnecessary for the Python compiler. Your post led a newbie to presume the extra use of global was good style, while I think you'll find there is no such consensus. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Inferring initial locals()

2007-06-24 Thread Scott David Daniels
higher order functions to build functions, --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: try/except with multiple files

2007-06-24 Thread Scott David Daniels
files: files.pop().close() --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: is this a valid import sequence ?

2007-06-23 Thread Scott David Daniels
be using methods on the named object to alter the referenced object). You only need global when you need to write (re-bind) the global name-to-object mapping. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Do eval() and exec not accept a function definition? (like 'def foo: pass) ?

2007-06-23 Thread Scott David Daniels
print x, y foolish(2.4) -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Interpolation of a discrete 3D trajectory

2007-06-17 Thread Scott David Daniels
can decide among various ways to interpolate (the term for what you want to do). I personally like the cubic B-spline because it is so easy to understand it visually. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Priority Queue with Mutable Elements

2007-06-16 Thread Scott David Daniels
accompany identical priority values? Thanks, Chris Make the priority value for element: (intended_value, id(element)) always a total order that obeys the partial order implied by intended_value. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Namespaces/introspection: collecting sql strings for validation

2007-04-22 Thread Scott David Daniels
.' % modname, class_, name) if __name__ == '__main__': import sys for modname in sys.argv[1: ]: investigate(modname, sometest) -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: I need a string/list/generator/comprehension incantation.

2007-04-20 Thread Scott David Daniels
. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about Tkinter MenuOption variable

2007-04-19 Thread Scott David Daniels
David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in a strange land: IronPython and ASP.NET at the next PyGTA

2007-04-13 Thread Scott David Daniels
to see you all there, Mike You might mention Toronto, Ontario, Canada in an announcement to a global mailing list. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange Behavior with Old-Style classes and implicit __contains__

2007-04-11 Thread Scott David Daniels
, 'KeyError', False, 'KeyError', False, 'KeyError'] And here are the results under Python 2.4.3: tester(10) [works] Looks like a bug to me. No problem with 2.5.1c1 here. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a new data structure while filtering its data origin.

2007-03-29 Thread Scott David Daniels
= result.setdefault(b, {}).setdefault(c, []) if a not in inner: inner.insert(0, a) # I had used append, but ... print result == wanted --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: where function

2007-03-18 Thread Scott David Daniels
' -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: class question

2007-03-17 Thread Scott David Daniels
') gal = Person(age=31, name='Martha') kid = Person(age=1, name='Ellen', dad=guy, mom=gal) print '%s of %s and %s.' % (kid, kid.dad, kid.mom) print %s's kids: %s. % (guy, guy.children()) print %s's kids: %s. % (gal, gal.children()) --Scott David Daniels [EMAIL PROTECTED] -- http

Re: Problem I have with a while loop/boolean/or

2007-03-13 Thread Scott David Daniels
really want to see what is going wrong, replace that last by: print 'Please answer yes or no (not %r):' % hint -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Signed zeros: is this a bug?

2007-03-11 Thread Scott David Daniels
zero from zero that way. Not saying I know how in portable C, but --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: TitleCase, camelCase, lowercase

2007-03-08 Thread Scott David Daniels
Ben Finney wrote: I prefer to use the term title case to refer unambiguously to NameWithSeveralWords, leaving the term camel case to describe the case with the humps only in the middle :-) The names TitleCase and camelCase might suffice here. -- --Scott David Daniels [EMAIL PROTECTED

Re: Dyanmic import of a class

2007-03-08 Thread Scott David Daniels
() -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a c array to python list

2007-03-01 Thread Scott David Daniels
data as it changes, you could Create a Block and fill it. If you need Python 2.4 or 2.5, you'll need to figure out how to build from sources on Windows (I assume building from sources is otherwise easy). -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python

Re: Walk thru each subdirectory from a top directory

2007-02-27 Thread Scott David Daniels
: #yield os.path.join(root, r) def findallfiles(base): return list(produce_all_files(base)) -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Lists: Converting Double to Single

2007-02-26 Thread Scott David Daniels
] Or, if you want to simultaneously assert there is only one list, use unpacking like: [l] = l Although I'd prefer to use a better name than l; something like: lst = [[3.5, 4.5, 5.5, 6.5, 7.5]] [inner] = lst print inner, lst -- --Scott David Daniels [EMAIL PROTECTED] -- http

Re: Finding non ascii characters in a set of files

2007-02-23 Thread Scott David Daniels
:] or ['.']: for name in non_ascii(glob.glob(os.path.join(dirname, '*.py')) + glob.glob(os.path.join(dirname, '*.pyw'))): print name --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: What is more efficient?

2007-02-18 Thread Scott David Daniels
David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Testers please

2007-02-13 Thread Scott David Daniels
compression -- that is, I was seeing less than a single bit required per byte in the original. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: A note on heapq module

2007-01-16 Thread Scott David Daniels
= __le__ = __ge__ = __lt__ --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: A note on heapq module

2007-01-16 Thread Scott David Daniels
Scott David Daniels wrote: Sorry, I blew the __ne__: def __ne__(self, other): return not isinstance(other, Heap) or self.h != other.h return not isinstance(other, self.__class__) and sorted( self.h) != sorted(other.h) Should

Re: Maths error

2007-01-15 Thread Scott David Daniels
Tim Peters wrote: ... Alas, most people wouldn't read that either 0.5 wink. Oh the loss, you missed the chance for a 0.47684987 wink. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing a matrix (list[][]) ?

2007-01-13 Thread Scott David Daniels
entries of mat are = 0. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: how to find the longst element list of lists

2007-01-07 Thread Scott David Daniels
with: maxlength, maxlist = max((len(lst), lst) for lst in list_of_lists) or (for those pre-2.5 people): maxlength, maxlist = max([(len(lst), lst) for lst in list_of_lists]) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to suppress the output of an external module ?

2006-12-30 Thread Scott David Daniels
MRAB wrote: Scott David Daniels wrote: [EMAIL PROTECTED] wrote: In Windows the null device is, strictly speaking, nul or nul:, not nul.txt, but the latter appears to work too. Although I find the windows design and reasoning to be a mistake, I believe the use of file names NUL, PRN, and CON

Re: Some basic newbie questions...

2006-12-28 Thread Scott David Daniels
: numShells += aGun.shells return numShells theBizmark = Battleship() print theBizmark.getShellsLeft() In the above code, I guess I'm just asking for the *correct* way to do these simple kinds of things... --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman

Re: Some basic newbie questions...

2006-12-28 Thread Scott David Daniels
]) ... For Python 2.4 or later: # allows generator expressions ... def getShellsLeft(self): return sum(aGun.shells for aGun in self.guns) ... --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting lines from a database query

2006-12-26 Thread Scott David Daniels
that, unless you intend to get the newsgroup to write your code for you. Come back with your efforts and any problems you have with them. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting lines from a database query

2006-12-26 Thread Scott David Daniels
' and 'NoneType' objects What's the data and program that does that? --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Noobie: Open file - read characters multiply

2006-12-26 Thread Scott David Daniels
), line[9:].rstrip() or: for line in AP_file: print decoded_File, '%.4f' % (int(line[:8], 16) * .0001 ), line[9:].rstrip() --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to suppress the output of an external module ?

2006-12-26 Thread Scott David Daniels
the raw open (which should get the available channel), and the C stdout stuff is successfully redirected. Once done w/ your function, close your new stdout and copy the channel back. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: catching exceptions

2006-12-18 Thread Scott David Daniels
that got us here. ... --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Class and instance question

2006-12-17 Thread Scott David Daniels
): def __new__(class_): instance = object.__new__(class_) instance.a = 1 return instance You might have figured more of this out with: t = T() print repr(t) newt = NewT() print repr(newt) T.a t.a --Scott David Daniels [EMAIL PROTECTED] -- http

Re: binary input and memory address passing

2006-12-12 Thread Scott David Daniels
, and I'll put it up). If you look it over and have questions, let me know. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: funcs without () like print

2006-12-07 Thread Scott David Daniels
- functions, you should change your wishes. If, however, you are talking solely about the interactive prompt and ease of typing, you might want to check out ipython (find via your favorite search tool). Its flexibility may well be to your taste. --Scott David Daniels [EMAIL PROTECTED] -- http

Pending: A Mixin class for testing

2006-11-26 Thread Scott David Daniels
Hacked(Pending, SomeTrickyClass): _pending = sample_value_generator() TempHold, SomeTrickyClass = SomeTrickyClass, Hacked try: do the test finally: SomeTrickyClass = TempHold --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman

Re: Local variables persist in functions?

2006-11-25 Thread Scott David Daniels
): print size, list(chunky('abcdefghijklmnopqrstuvwxyz', size)) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Abelson and Python

2006-11-23 Thread Scott David Daniels
that are written in C in CPython. Not only is PyPy trying to get the _entire_ Python system into Python, it is trying to do so in a friendly-to-translation-in-a-statically-typed-language way. Besides, if you can freely use eval and exec, how hard is a pure python language interpreter? --Scott David

Re: What's going on here?

2006-11-22 Thread Scott David Daniels
to the class here? Why can't I assign to attributes of an instance of object? object itself doesn't have a __dict__ slot, so that very small objects (such as points) can be built without that overhead. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does this code crash python?

2006-11-12 Thread Scott David Daniels
, 60) Or, depending on your leading zero requirements: totalsecs = int(whatever) print '%2d:%02d' % divmod(totalsecs, 60) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Projecting MUD maps

2006-11-06 Thread Scott David Daniels
, b.east, c.east = A, B, C A.west, B.west, C.west = a, b, c -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Style for modules with lots of constants

2006-11-02 Thread Scott David Daniels
to convert values to associated names for debugging and such. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding traceback print_exc()?

2006-10-31 Thread Scott David Daniels
can be skipped as well: return excinfo_str -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: beginner's refcount questions

2006-10-30 Thread Scott David Daniels
. import sys sys.getrefcount(42 * 7) 2 --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I set up a timed callback without Tkinter or twisted or something?

2006-10-14 Thread Scott David Daniels
that uses something like: def action(): sleep(50) if not canceled: callback(foo) as its action. The callback ill be in another thread, but Look up threading for more details. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman

Re: Loops Control with Python

2006-10-13 Thread Scott David Daniels
. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: sufficiently pythonic code for testing type of function

2006-10-13 Thread Scott David Daniels
Bruno Desthuilliers wrote: ... idempotent - no side effects. Nope. idempotent: f(f(x)) = f(x) That is, after doing it once, repeating it won't hurt. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: prefix search on a large file

2006-10-12 Thread Scott David Daniels
Try: def leaders(sorted_list): held = None for phrase in held: if held is None or not phrase.startswith(held): held = row yield held print list(leaders(sorted(data))) --Scott David Daniels [EMAIL PROTECTED] -- http

Re: prefix search on a large file

2006-10-12 Thread Scott David Daniels
Tim Chase wrote: def leaders(sorted_list): held = None for phrase in held: ... I suspect you mean for phrase in sorted_list: no? Ooops -- renaming code before posting should get its own test. You are absolutely correct. --Scott David Daniels [EMAIL PROTECTED

Re: IDLE won't run

2006-10-12 Thread Scott David Daniels
works to give you Idle, the problem is in creating a separate process linked via a socket to localhost port 8833. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: 3D Vector Type Line-Drawing Program

2006-10-12 Thread Scott David Daniels
Ron Adam wrote: Scott David Daniels wrote: Ron Adam wrote: ... Is there a way to have the display show a wire frame image instead of shaded shapes? You can draw the edges as lines. Is there a setting for this?, or are you suggesting reading the coordinates and creating curve objects

Re: 3D Vector Type Line-Drawing Program

2006-10-11 Thread Scott David Daniels
Ron Adam wrote: Scott David Daniels wrote: James Stroud wrote: I'm looking for a program to do line-drawings in 3d, with output to postscript or svg or pdf, etc. I would like to describe a scene with certain 1-3d elements oriented in 3d space with dashed or colored lines and filled

Re: 3D Vector Type Line-Drawing Program

2006-10-09 Thread Scott David Daniels
). Take a look at VPython -- easy to start, 3-D display (wall-eye / cross-eye) easy to run on. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: A critique of cgi.escape

2006-10-08 Thread Scott David Daniels
, Ch) for Ch in Str] return \ + .join(mapped) + \ -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Names changed to protect the guilty

2006-10-07 Thread Scott David Daniels
('is') or nm.startswith('has')) ['hasattr', 'hash', 'isinstance', 'issubclass'] [hasattr(type,'mro'), hash(123), isinstance(type, type), issubclass(type, type)] [True, 123, True, True] :-) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python

Re: extract certain values from file with re

2006-10-06 Thread Scott David Daniels
a separator, sometimes there is a mix, and sometimes you do need a regular expression. Save re for when you need to do pattern matching. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: switching to numpy and failing, a user story

2006-10-06 Thread Scott David Daniels
customers pay as if they are using the full library. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: building strings from variables

2006-10-05 Thread Scott David Daniels
, some_param1, some_param2) ... Or another for readability: 4. some_string = ' '.join([cd, working_dir, ;, ssh_cmd, str(some_count), some_param1, some_param2]) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Resuming a program's execution after correcting error

2006-10-05 Thread Scott David Daniels
before in this newsgroup, Xerox Parc had that ability (the ability to finish an exception by returning to its source) in their system implementation language, and finally removed the capability when they saw how many bugs were related to its use. --Scott David Daniels [EMAIL PROTECTED] -- http

Re: Graph Theory

2006-10-05 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Are there any visualization tool which would depict the random graph generated by the libraries. Google for DOT (.DOT format w/ renders to a variety of output formats). -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python

Re: Raw strings and escaping

2006-10-03 Thread Scott David Daniels
to some strings as raw when what you really mean is that the notation you are using is a raw notation for a perfectly normal string. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: commands.getstatusoutput result is not command line exit value!!!

2006-10-02 Thread Scott David Daniels
of us playing along at home, there is a typo there: The preceding line should read: value. You will notice that 3072 == 12 * 256. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Battlefield Weapon Popularity Trend

2006-10-01 Thread Scott David Daniels
an inductir. --Scott David Daniels (who couldn't resist) [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: a query on sorting

2006-10-01 Thread Scott David Daniels
of real useful code containing, sorted(xrange(a, b, c)) are pretty slim. If you don't have to build the list in memory, returning a list can make a program that could be very memory efficient suddenly _much_ less so. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman

Re: How to change menu text with Tkinter?

2006-10-01 Thread Scott David Daniels
the language will be jarring to the user, as well as expensive to implement. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: windev vs python SOS

2006-10-01 Thread Scott David Daniels
. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Auto color selection PIL

2006-10-01 Thread Scott David Daniels
be more substantial even to a viewer with full color vision. -- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: a different question: can you earn a living with *just* python?

2006-10-01 Thread Scott David Daniels
learn an assembly language. You can still execute it (plenty of simulators are available for free), and you can get an idea of kinds of efficiency without having to learn five or six architectures. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: how to reuse class deinitions?

2006-10-01 Thread Scott David Daniels
File ... code that uses File ... or (actually my current style): from sdd import goodidea ... code that uses goodidea.File ... --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Automatic methods in new-style classes

2006-09-29 Thread Scott David Daniels
AttributeError(%r object has no attribute %r % (self.__class__.__name__, name)) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Automatic methods in new-style classes

2006-09-29 Thread Scott David Daniels
Scott David Daniels wrote: class Forwards(object): to_forward = set(['flush', 'read', 'write', 'close']) def __init__(self, backends): self.backends = backends def forwarder(self, methodname): def method(*args, **kwargs): for b

Re: Is it just me, or is Sqlite3 goofy?

2006-09-22 Thread Scott David Daniels
this is to modify the the interpreter. We could call the new language Python?!, or actually use an interobang if Unicode has such a character. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Python Books and Sites

2006-09-08 Thread Scott David Daniels
python books they own? Sounds great! Send me $1.50 and I'll send you my six answers. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good idea or a waste of time?

2006-08-28 Thread Scott David Daniels
and too general. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: unit test for a printing method

2006-08-28 Thread Scott David Daniels
= self.held if __name__ == '__main__': unittest.main() --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: conecting with a MsAcces DB by dao

2006-07-03 Thread Scott David Daniels
not include that part of the program, so you wound up crippling those who were willing to try to help you, because you thought you kinda-sorta knew what was going on (but not enough to fix it). Find smart questions and read it a couple of times. -- --Scott David Daniels [EMAIL PROTECTED

Re: Classes and global statements

2006-07-03 Thread Scott David Daniels
tiny theories and _test_ them. and the theories wander farther and farther off into the weeds --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: sending binary data over sockets

2006-07-03 Thread Scott David Daniels
module documentation as well. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary .keys() and .values() should return a set [withPython3000 in mind]

2006-07-03 Thread Scott David Daniels
of reference counts doesn't do the mad useless-copy stuff. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie graphing recommendations ?

2006-07-02 Thread Scott David Daniels
at PyGame if you want to paint screens. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: print shell output in a file

2006-07-01 Thread Scott David Daniels
: old_output, sys.stdout = sys.stdout, old_output old_output.close() print 'Output safely written to:', old_output.name --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a limited set of instanceses of a class

2006-07-01 Thread Scott David Daniels
= super(class_, Limited).__new__( class_, *args, **kwargs) class_._held_instances[id(instance)] = instance return instance return random.choice(class_._held_instances.values()) --Scott David Daniels [EMAIL

Re: Threading HowTo's in Windows platforms

2006-07-01 Thread Scott David Daniels
(to which the best reply is, See, we told you so.). --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8   9   10   11   12   >