Re: Real time event accuracy

2012-05-09 Thread Toby
On 05/09/2012 09:13 AM, Dave Angel wrote: > On 05/09/2012 11:52 AM, Tobiah wrote: >> I'd like to send MIDI events from python to another >> program. I'd like advice as to how to accurately >> time the events. I'll have a list of floating point >> start times in seconds for the events, and I'd lik

Error importing .pyd python extension

2006-10-30 Thread Toby
Hi, I've managed to get my hands on the ms 2003 toolkit, and have successfully (i think) created a .pyd file in win xp (setup.py is provided intersystems cache): C:\CacheSys\Dev\python>setup.py install enter directory where you i

Re: Error importing .pyd python extension

2006-10-30 Thread Toby
P.S. I have run 'depends', and all the dll's are there, the only error its throwing up is: "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." The offending file is mpr.dll in c:\windows\system32

Commandline wrapper: help needed

2007-01-27 Thread Toby
an undefined name. Now, when the debugger says "0: [ABORT] Exit debugger...", entering 0 should get you back to the "*" prompt--and indeed does, unless you are using my wrapper, in which case everything hangs, and the only solution is to terminate everything with Ctrl-\

Re: how to remove c++ comments from a cpp file?

2007-01-27 Thread Toby
ine (immediately preceding each newline). By default [...] "$" matches only at the end of the string. re.DOTALL [...] without this flag, "." will match anything except a newline. So a simple solution to your problem would be: r = re.compile("//.*&

Re: Commandline wrapper: help needed

2007-01-28 Thread Toby
Toby A Inkster wrote: > Hello Toby, excellent name you have there. Why, thank you! > What advantage (if any) does this method have over standard UNIX-style > pipes? The advantage is being able to write my own filters and input/output modules and have as small a granularity as need

Endianness conversion

2007-02-24 Thread Toby
As part of a program I'm writing, I need to save to disk big amounts of data (hundreds of MB, in 8kB chunks) swapping every couple of bytes. I obviously cannot do it in a Python loop. Is there a function I could use in the standard library, or do I have to write my own C extension?

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-24 Thread Toby
thon already does it at runtime: class A: A_class_var = 1 class B(A): B_class_var = 2 def __init__(self): self.B_inst_var = 3 >>> b.A_class_var 1 >>> b.B_class_var 2 >>> b.B_inst_var 3 >>> A.another = 4 >>> b.another 4 Can you post a ">>>&q

Re: Endianness conversion

2007-02-24 Thread Toby
;Swap every two bytes of a even-sized python string, in place" cdef int i cdef char t, *p p = data for i from 0 <= i < len(data) / 2: t = p[0] p[0] = p[1] p[1] = t p = p + 2 Toby -- http://mail.python.org/mailman/listinfo/python-list

Re: Endianness conversion

2007-02-24 Thread Toby
Daniel Harding wrote: > Try the using the array module. array objects provide a byteswap > method which reverses endianness. Thanks! Toby -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-25 Thread Toby
ely what to return)' class A(AttrSearch): a = 1 class B(A): a = 2 class C(A): a = 3 class D(B, C): a = 4 D().a # --- end --- Results: Looking for "a" in a D instance, found 4 candidates: A1 B2 C3 D4 (now choose wisely what to return) Toby -- http://mail.python.org/mailman/listinfo/python-list

Re: How to build Hierarchies of dict's? (Prototypes in Python?)

2007-02-25 Thread Toby
of class B' class C(A): a = 'attribute "a" of class C' class D(B, C): a = 'attribute "a" of class D' t = D() t.a = 'attribute "a" of instance t' # --- end --- Now if you ask for t.a, for example in a print statement, you get None, bu

emacs python mode problem

2007-12-05 Thread Toby
For some reason, emacs python-mode has stopped working for me. It has been working without any problems since I installed it on Ubuntu Gutsy Gibbon, but now the "Start Interpreter" causes emacs to hang requiring me to kill emacs. Other parts of python-mode seem to work okay, though. Any suggestions

Re: Mathematica 7 compares to other languages

2008-12-01 Thread toby
On Dec 1, 5:24 am, budden <[EMAIL PROTECTED]> wrote: > Mathematica is a great language, but: > 1. it is too slow > 2. It is often hard to read > 3. It gives sence to every keystroke. You press escape by occasion and > it goes in a code as a new > symbol, w/o error. Nasty. > 3. I know 5-th version.

Re: Mathematica 7 compares to other languages

2008-12-03 Thread toby
On Dec 2, 5:04 pm, Tamas K Papp <[EMAIL PROTECTED]> wrote: > On Tue, 02 Dec 2008 13:57:35 -0800, Lew wrote: > > Xah Lee wrote: > >> If [yo]u would like to learn [the] [E]nglish lang[uage] and writing > >> insights from me, peruse: > > > /Au contraire/, I was suggesting a higher standard for your po

Re: Mathematica 7 compares to other languages

2008-12-03 Thread toby
On Dec 3, 4:15 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: > > > My example demonstrates several of Mathematica's fundamental limitations. > > enough babble Jon. > > Come flying $5 to my paypal account, and i'll give you real code, I'll give yo

Re: Mathematica 7 compares to other languages

2008-12-10 Thread toby
On Dec 10, 3:37 pm, [EMAIL PROTECTED] wrote: > On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTED]> wrote: > > > > > For those of you who don't know linear algebra but knows coding, this > > means, we want a function whose input is a list of 3 elements say > > {x,y,z}, and output is also a list of 3 elem

Re: NoSQL Movement?

2010-03-03 Thread toby
On Mar 3, 3:54 pm, ccc31807 wrote: > On Mar 3, 12:36 pm, Xah Lee wrote: > > > recently i wrote a blog article on The NoSQL Movement > > athttp://xahlee.org/comp/nosql.html > > > i'd like to post it somewhere public to solicit opinions, but in the > > 20 min or so, i couldn't find a proper newsgro

Re: Scheme as a virtual machine?

2010-11-22 Thread toby
On Nov 22, 10:57 am, Howard Brazee wrote: > On Mon, 22 Nov 2010 05:38:53 +0100, Ertugrul S ylemez > wrote: > > >Haskell is a simple language with a comparably small specification. > >It's not as simple as Common Lisp, but it's simple.  Note that simple > >doesn't mean easy.  Haskell is certainly

Re: Scheme as a virtual machine?

2010-11-22 Thread toby
On Nov 22, 12:28 pm, namekuseijin wrote: > On 22 nov, 14:47, Howard Brazee wrote: > > > On Mon, 22 Nov 2010 08:14:40 -0800 (PST), toby > > > wrote: > > >This is a good (if familiar) observation. Teaching children (or young > > >people with little exposure

Re: Scheme as a virtual machine?

2010-11-24 Thread toby
On Nov 24, 1:10 pm, Raffael Cavallaro wrote: > On 2010-11-23 11:34:14 -0500, Keith H Duggar said: > > > You don't understand the implications of your own words: > > >    "having a financial interest in the outcome of a debate makes > >    anything that person says an advertisement for his financia

Re: multi-core software

2009-06-09 Thread toby
On Jun 7, 2:41 pm, Jon Harrop wrote: > Arved Sandstrom wrote: > > Jon Harrop wrote: > >> I see no problem with mutable shared state. > > > In which case, Jon, you're in a small minority. > > No. Most programmers still care about performance Frequently when they shouldn't. > and performance means

Re: Xah's Edu Corner: The importance of syntax & notations.

2009-08-16 Thread toby
On Aug 16, 12:05 pm, Peter Keller wrote: > In comp.lang.scheme Xah Lee wrote: > > > Xah's Edu Corner: The importance of syntax & notations. > > >http://www.stephenwolfram.com/publications/recent/mathml/mathml_abstr... > > > this article should teach the coding sophomorons and computer > > ?scienc

Re: Would there be support for a more general cmp/__cmp__

2005-10-20 Thread Toby Dickenson
comparison method of an individual object is being called. If you need a total ordering across a domain of objects then you need to involve some representation of that domain as a whole. -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting with only a partial order definition

2005-10-27 Thread Toby Dickenson
minimises the number of comparisons (because a comparison involves asking a human), and which takes advantage of any pre-existing rough ordering. You need timsort - the algorithm behind python lists sort() method. -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Using graphviz to visualize trace.py output, anybody?

2005-11-01 Thread Toby Dickenson
> Maybe there is some other tool that I am not aware of which can create > this kind of trace. I use eclipse with pydev plugin on MacOS 10.3.9 kcachegrind http://kcachegrind.sourceforge.net/cgi-bin/show.cgi -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: "private" variables a.k.a. name mangling (WAS: What is print? A function?)

2005-01-25 Thread Toby Dickenson
right? The problem occured because the double-underscore mangling uses the class name, but ignores module names. A related project already had a class named C derived from B (same name - different module). My refactoring caused aliasing of some originally distinct double-underscore attributes. --

Re: asynchronous comunication, wxPython and threads.

2005-06-21 Thread Toby Dickenson
hine sooner or later, and three communictions threads is starting to get ugly. A framework like Twisted will let you handle many machines in the one thread, but it still makes sense to keep a second one for the GUI. -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: System Independent Wallpaper Changer

2005-07-06 Thread Toby Dickenson
On Wednesday 06 July 2005 01:12, Terrance N. Phillip wrote: > I've done some searching, and can't seem to find a programatic way of > getting *** that to happen. http://www.google.com/search?q=setwallpaper+dcop I hope this helps -- Toby Dickenson -- http://mail.python.org/

Re: [path-PEP] Path inherits from basestring again

2005-07-26 Thread Toby Dickenson
). def functions_which_modifies_some_file_in_place(path): output = open(path+'.tmp', 'w') . I dont want a seperator inserted between path and the new extension. -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Limited XML tidy

2005-08-23 Thread Toby White
handler raises an exception, I can't see how to find out why. What I want to do is for DodgyErrorHandler to do something different depending on where we are in the course of parsing. Is there anyway to get that information back from xml.sax (or indeed from any other sax handler?) Toby --

Limited XML tidy

2005-08-23 Thread Toby White
exception, I can't see how to find out why. What I want to do is for DodgyErrorHandler to do something different depending on where we are in the course of parsing. Is there anyway to get that information back from xml.sax (or indeed from any other sax handler?) Toby -- Dr. Toby White

Re: Limited XML tidy

2005-08-26 Thread Toby White
additional packages. And in any case, it doesn't need to be perfectly robust. As long as it handles 99% of cases, I'll be happy. -- Dr. Toby White Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK Email: <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: python connect to server using SSH protocol

2005-02-09 Thread Toby Dickenson
s script hasnt started draining foe. For a real python program using ssh (but not 'interactive'... data written to fi does not depend on data read from foe) see http://dirstorage.sourceforge.net/replica.html -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Flow chart (function tree) & cross references

2005-02-22 Thread Toby Dickenson
On Tuesday 22 February 2005 13:27, qwweeeit wrote: > Does someone knows something about function tree generation and cross > references? for trees of *module* dependencies: http://www.tarind.com/depgraph.html -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Distributing applications

2005-03-02 Thread Toby Dickenson
On Wednesday 02 March 2005 14:12, Phillip Mills wrote: > now any comments or references on the mechanics of creating > a self-contained distribution? Run to http://starship.python.net/crew/theller/py2exe/ -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 and 4 spaces

2014-07-03 Thread Toby Shepard
On 07/03/2014 10:46 AM, Tim Chase wrote: Any evidence out there that this part of PEP8 is becoming more optional or even obsolete, as I've heard others say about the 80 char line length? Just need ammo for when the hammer of code unification comes down. I'm not sure you'll get a whole lot of "

Re: PEP8 and 4 spaces

2014-07-03 Thread Toby Shepard
On 07/03/2014 12:44 PM, Simon Ward wrote: On 3 July 2014 18:31:04 BST, Tobiah wrote: Coworker takes PEP8 as gospel and uses 4 spaces to indent. I prefer tabs. Boss want's us to unify. This isn't worth arguing about. How point of view changes things. Anyway, I gave up the 80 char lin

Re: PEP 354: Enumerations in Python

2006-02-28 Thread Toby Dickenson
x27;, 'wed', 'thu', 'fri', 'sat') > >>> Grades = enum('A', 'B', 'C', 'D', 'F') s/arguments/strings/ ? -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows distribution suggestions?

2005-05-17 Thread Toby Dickenson
need more Ive not used NSIS, but I have had good results from the free WiX tools, at http://sourceforge.net/projects/wix/. Documentation is poor, but examples are plenty. -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Impact Analysis Tool ?

2005-05-26 Thread Toby Dickenson
nge affects only A, B, and C out of the whole alphanet. Then I would > be able to isolate what needs to be changed and unit tested..I am > trying to improve programmer productivity at design time. For physical dependencies between modules: http://www.tarind.com/depgraph.html --

Re: collect data using threads

2005-06-14 Thread Toby Dickenson
ntents. It might only "show up" after that iteration has finished, when the consumer has discarded its reference to the shared list. -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

Re: Commandline wrapper: help needed

2007-01-28 Thread Toby A Inkster
Toby wrote: > Any idea how to improve the script and solve this problem? Hello Toby, excellent name you have there. What advantage (if any) does this method have over standard UNIX-style pipes? -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact -- h

Re: Ip address

2007-01-28 Thread Toby A Inkster
you can't get off-net because there aren't > any routers. ... or you can't get off-net because you don't *know* the routers. -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux * =

Re: Ip address

2007-01-28 Thread Toby A Inkster
IP address of your router. If you're not using NAT, then you shouldn't need to worry about your router, as IP addresses alone provide full end-to-end routing. (Indeed that's the whole point of IP.) -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek

Re: Web File System

2007-01-31 Thread Toby A Inkster
anthony.cutrone wrote: > Files and folders have to be in an SQL database, mounted in ext3-like > system. File would be identified by a single ID, and links with names > should be connected on these IDs. Take a look at FUSE. Also, have you considered subversion? -- Toby A Inkster

Re: Writing "pythonish" code

2007-02-02 Thread Toby A Inkster
re "mangled" which makes it more difficult for other code (even subclasses!) to access the member. Difficult though -- not impossible. -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux * = I'

Re: "Subscribing" to topics?

2007-02-04 Thread Toby A Inkster
e Agent. So you just need a server. "pubnews.gradwell.net" still seems to exist -- it's free. Alternatively, "news.individual.net" offers a good service for a fairly low yearly cost. -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek of ~ HT

Re: lambda functions ?

2007-02-05 Thread Toby A Inkster
Maxim Veksler wrote: > And what is the "f" object? An integer? a pointer? an Object? A function. -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek of ~ HTML/CSS/Javascript/SQL/Perl/PHP/Python*/Apache/Linux * = I'm getting there! -- http

Re: Thanks for the help

2007-02-09 Thread Toby A Inkster
[EMAIL PROTECTED] wrote: > Reid wrote: > >> I do not need 3d stuff. Just a couple of buttons and menu's. > > That's not "3D", that's GUI (Graphical User Interface). "3D" usually > refers to "3D graphics"... Hence the original

Re: BDFL in wikipedia

2007-02-21 Thread Toby A Inkster
Steven D'Aprano wrote: > Carl Banks wrote: >> >> Since when is Larry Wall benevolent? He should be called the SDFL. > > I can't think what the S stands for... if it was M, I'd say Malevolent, > but S? Scented, Sexy, Spanish... no, probably not those. I

Re: BDFL in wikipedia

2007-02-21 Thread Toby A Inkster
Jorge Vargas wrote: > shouldn't it mention Linus, Larry Wall, others?[3] Despite the link you posted, I don't think Linus, Larry Wall, Rasmus Lerdorf, etc describe themselves as BDFLs, even if they fulfil similar roles within their respective development communities. -- Toby

Re: Rational numbers

2007-02-24 Thread Toby A Inkster
led. If you tell me how, I'd be happy to compile it for you. Contact me through the feedback form on the site below. -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux * = I'm getting there! -- http://mai

Re: Finding non ascii characters in a set of files

2007-02-24 Thread Toby A Inkster
s also operates on binary files like images, etc, so you may want to be more specific with the wildcard. e.g.: perl -ne 'print "$ARGV:$.\n" if /[\x80-\xFF]/;' *.py *.txt *.*htm* -- Toby A Inkster BSc (Hons) ARCS Contact Me ~ http://tobyinkster.co.uk/contact Geek of ~ HTML/