Re: argparse epilog call function?

2017-06-27 Thread Fox
what " -h " are you even talkin bout ? def Examples(): text = """Lots of examples""" print(text.format()) epilog='where the heck to put a -h ?? ' epilog=Examples() -- https://mail.python.org/mailman/listinfo/python-list

Re: Unable to access module attribute with underscores in class method, Python 3

2016-01-08 Thread Joseph Fox-Rabinovitz
> On Thu, Jan 7, 2016 at 11:14 AM, Joseph Fox-Rabinovitz > wrote: > > Hi, > > I have a module attribute whose name starts with a pair of underscores. I am > apparently unable to access it directly in a class method (within the same > module, but that is not relevant as

Unable to access module attribute with underscores in class method, Python 3

2016-01-08 Thread Joseph Fox-Rabinovitz
cessing a module attribute in such a way should be forbidden. -Joseph Fox-Rabinovitz P.S. For reference, the Stack Overflow question is here: http://stackoverflow.com/questions/34621484/how-to-access-private-variable-of-python-module-from-class -- https://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers ?? la Interface Builder (Re: what gui designer is everyone using)

2012-06-17 Thread Chris Fox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/06/2012 03:42, Chris Angelico wrote: > On Fri, Jun 15, 2012 at 7:47 AM, Dietmar Schwertberger > wrote: >> The point is, that if you want to promote Python as replacement >> for e.g. VB, Labview etc., then an easy-to-use GUI builder is >> requi

Re: Shared memory python between two separate shell-launched processes

2011-02-11 Thread Charles Fox (Sheffield)
On Feb 10, 6:22 pm, Jean-Paul Calderone wrote: > On Feb 10, 12:21 pm, "Charles Fox (Sheffield)" > wrote: > > > > > On Feb 10, 3:43 pm, Jean-Paul Calderone > > wrote: > > > > On Feb 10, 9:30 am, "Charles Fox (Sheffield)" > > >

Re: Shared memory python between two separate shell-launched processes

2011-02-10 Thread Charles Fox (Sheffield)
On Feb 10, 3:43 pm, Jean-Paul Calderone wrote: > On Feb 10, 9:30 am, "Charles Fox (Sheffield)" > wrote: > > > Hi guys, > > I'm working on debugging a large python simulation which begins by > > preloading a huge cache of data.  I want to step through

Shared memory python between two separate shell-launched processes

2011-02-10 Thread Charles Fox (Sheffield)
Hi guys, I'm working on debugging a large python simulation which begins by preloading a huge cache of data. I want to step through code on many runs to do the debugging. Problem is that it takes 20 seconds to load the cache at each launch. (Cache is a dict in a 200Mb cPickle binary file). So

Re: PDB how to define a global inspection function?

2011-02-10 Thread Charles Fox (Sheffield)
On Feb 8, 11:37 am, Peter Otten <__pete...@web.de> wrote: > CharlesFox(Sheffield) wrote: > > Hi guys, I'm new to this group and have a question about debugging. > > I'm stepping through my code (using emacs pdbtrack and python-mode.el) > > and would like to isnpect objects as I go.  So I've defi

PDB how to define a global inspection function?

2011-02-08 Thread Charles Fox (Sheffield)
ternal libraries). Is there a way to put it in the global scope for pdb to use? Also is there a way to automatically import it whenever pdb starts up (like a matlab startup file)? (I'm not using ipython as it's not happy with pdbtrack in emacs, so am launching from emacs M- x pdb

Re: libc Sleep api performs a busy waiting

2010-03-08 Thread Joe Fox
Hi, actually i have simplified my scenario a lot here , In my actual case , i have to call a C-api which blocks on c select , in a separate thread. my thread is getting struck in that api , and thus blocking all the other threads. Can you point to something which will help me call this blockin

libc Sleep api performs a busy waiting

2010-03-08 Thread Joe Fox
Hi , I am having a problem while using sleep function from libc , the thread in which i am calling it is getting struck and not allowing other threads to execute. Here is a simple code that i am trying to exeute import threading import time import dl def dummy1(): a=dl.open('/lib/libc.so.6

socket programming (client-server) error

2008-10-22 Thread ryan fox
i have implemented a small client server model to do file transfer over a LAN network. It work with some machines on the network and on others it doesnt. when i run the server.py file in some machine then it pops up a windows security alert. The message is as follows: Do you want to keep bl

array.shape() gives TypeError: 'tuple' object is not callable

2007-12-10 Thread Charles Fox
Hi gys -- I am looking at Numpy but getting this error when I try to get array sizes. I'm using Ubuntu Edgy with standard repositories and scipy. Any ideas? Am I doing something wrong or is it my install of scipy? $ python Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelea

Hide comments in emacs python mode?

2007-10-30 Thread Charles Fox
Hi guys, I'm playing with Python in emacs, with python mode. I'd like to be able to press a key to toggle the code comments on and off -- to switch between beautiful clean Python code, and the full text that tells me what's going in in English. Is this currently possible? I know there is a hide

Re: newbie: self.member syntax seems /really/ annoying

2007-09-13 Thread Charles Fox
hmm, I guess this is the difference between numerical programming and the rest -- sure, if I was writing a database server or something it would be great to have thisObject.veryLongName to know what everything is -- however when you are implementing a model from a published paper, the variables ten

Re: newbie: self.member syntax seems /really/ annoying

2007-09-12 Thread Charles Fox
Thanks guys -- yeah these two stategies (short s.varname; and explicit rescoping, a=self.a etc) are more or less what I was using. That's still kind of annoying though. The s.varname approach still makes numerical code much harder to read. I had a nasty bug with the boilerplate approach when for

newbie: self.member syntax seems /really/ annoying

2007-09-12 Thread Charles Fox
I've just started playing around with Python, as a possible replacement for a mix of C++, Matlab and Lisp. The language looks lovely and clean with one huge exception: I do a lot of numerical modeling, so I deal with objects (like neurons) described mathematically in papers, by equations like

xml.sax.writer

2006-08-30 Thread Dominic Fox
Hi, xml.sax.writer doesn't appear in the global module documentation, and googling for it doesn't tell you all that much either. Is it actually in the standard libraries, or is it an interloper from something else (the libxml bindings, say) that just happens to have taken up residence in the xml.s

Re: Is Forth for real?

2006-02-20 Thread fox
rickman wrote: > The original post seems to be missing, but my answer to the title > question is, No, Forth is not real. Not for real, for Integer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing numbers into characters using dictionaries

2006-01-26 Thread Colin Fox
ot;w"} Well, your num[3] is going to return '6', not '4', so your key lookup is going to fail right there. Same with num[5], which is 4, not 5. -- Colin Fox President CF Consulting Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2005-10-10 Thread Jeff Fox
Lots of links to all levels of tutorials and documentation here: http://www.awaretek.com/plf.html Python Podcast too! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tripoli: a Python-based triplespace implementation

2005-05-02 Thread Dominic Fox
> Is there some interoperability requirement with non-Python apps? If not, > why not just use pickle or marshal? I would imagine that much of the existing, current and useful triple-based data out there is serialized (or serializable) in RDF/XML. I wouldn't choose it as a serialization format arb

Re: Tripoli: a Python-based triplespace implementation

2005-05-02 Thread Dominic Fox
karouri wrote: > Interesting, but I wonder if you are aware of pylinda > (http://www-users.cs.york.ac.uk/~aw/pylinda/) and if so, what's the > difference? Tripoli trades off some of the generality of PyLinda in order to support some performance tweaks and some additional graph-related operations.

Tripoli: a Python-based triplespace implementation

2005-04-30 Thread Dominic Fox
I have been working on a Python implementation of a modified Tuple Space (cf Linda, JavaSpaces) that contains only 3-tuples (triples), and that has operators for copying and moving graphs of triples as well as sets matching a given pattern. It's called Tripoli, and the code for it can be found here

Monadic Parser Combinators in Python

2005-03-18 Thread Dominic Fox
Python: Now More Like Haskell Than Ever Before! I've implemented a small monadic parser combinator library in Python (based on Haskell code in a paper by Graham Hutton and Eric Meijer). http://codepoetics.com/poetix/index.php?p=94 It enables you to write things like this: > token = isalpha |seq

Re: Concurrent Python

2005-02-14 Thread Dominic Fox
> For an alternative approach (based on using generators forming a dataflow > component system) you might find our project interesting - the core > concurrency stuff is packaged up separately with API docs (and trivial > example) here: http://kamaelia.sourceforge.net/Docs/Axon.html Would it be cor

Concurrent Python

2005-02-11 Thread Dominic Fox
I've created a few classes to support some concurrent programming concepts in Python: AsyncResult represents the state of a process currently running in a separate thread. MultiEvent allows listeners to wait for any one of a list of events to be signalled. MultiQueue allows listeners to wait for a