Re: GUI toolkits and dynamic table browser widget

2012-05-17 Thread Simon Cropper
On 18/05/12 14:00, Vincent Vande Vyvre wrote: On 18/05/12 02:52, Simon Cropper wrote: Hi, There has been some discussion on this list regarding GUI toolkits and it reinvigorated my search for one to meet my needs. I would like to create windows with grids (AKA rows and column of a table like e

Re: SocketServer.BaseRequestHandler and __init__/super()

2012-05-17 Thread Chris Angelico
On Fri, May 18, 2012 at 10:32 AM, Tim Chase wrote: > Any thoughts on this? (other than "SocketServer should > have inherited from object which is a 2.x best-practice") Well, Python 3 dodges the issue by making all classes inherit from object. That might be a solution :) ChrisA -- http://mail.py

Re: Sharing Data in Python

2012-05-17 Thread Jason Friedman
> I have some Pickled data, which is stored on disk, and it is about 100 MB in > size. > > When my python program is executed, the picked data is loaded using the > cPickle module, and all that works fine. > > If I execute the python multiple times using python main.py for example, each > python

Re: GUI toolkits and dynamic table browser widget

2012-05-17 Thread Vincent Vande Vyvre
On 18/05/12 02:52, Simon Cropper wrote: > Hi, > > There has been some discussion on this list regarding GUI toolkits and > it reinvigorated my search for one to meet my needs. > > I would like to create windows with grids (AKA rows and column of a > table like excel). Do any of the GUI interfaces h

Re: argparse - option with optional value

2012-05-17 Thread John O'Hagan
On Thu, 17 May 2012 14:26:50 -0700 (PDT) Miki Tebeka wrote: > Greetings, > > I'd like to have an --edit option in my program. That if not specified will > not open editor. If specified without value will open default editor > ($EDITOR) and if specified with value, assume this value is the editor

Re: str.isnumeric and Cuneiforms

2012-05-17 Thread Terry Reedy
On 5/17/2012 8:50 PM, Steven D'Aprano wrote: On Thu, 17 May 2012 21:32:29 +0200, Marco wrote: Is it normal the str.isnumeric() returns False for these Cuneiforms? '\U00012456' '\U00012457' '\U00012432' '\U00012433' They are all in the Nl category. Are you sure about that? Do you have a refe

Re: Right way to initialize python embedded in a multi-threaded application

2012-05-17 Thread Mark Hammond
On 17/05/2012 10:08 PM, shooshx wrote: I'm embedding python in a multi-threaded C application. I've taken care to wrap every call to the Python C API with gstate = PyGILState_Ensure(); // call python code PyGILState_Release(gstate); But I'm stumped with what to do in the initialization. Right a

Re: str.isnumeric and Cuneiforms

2012-05-17 Thread Steven D'Aprano
On Thu, 17 May 2012 21:32:29 +0200, Marco wrote: > Is it normal the str.isnumeric() returns False for these Cuneiforms? > > '\U00012456' > '\U00012457' > '\U00012432' > '\U00012433' > > They are all in the Nl category. Are you sure about that? Do you have a reference? It seems to me that they

GUI toolkits and dynamic table browser widget

2012-05-17 Thread Simon Cropper
Hi, There has been some discussion on this list regarding GUI toolkits and it reinvigorated my search for one to meet my needs. I would like to create windows with grids (AKA rows and column of a table like excel). Do any of the GUI interfaces have these types of widgets? i have looked but ca

SocketServer.BaseRequestHandler and __init__/super()

2012-05-17 Thread Tim Chase
Sparring with a little sandbox/test code (in 2.6, FWIW), I'm trying to set up some instance variables in my __init__ but keep hitting my head against the wall. Initially, I had something of the form class MyServer(SocketServer.BaseRequestHandler): def __init__(self, *args, **kwargs):

Re: argparse - option with optional value

2012-05-17 Thread Ben Finney
Miki Tebeka writes: > I'd like to have an --edit option in my program. That if not specified > will not open editor. If specified without value will open default > editor ($EDITOR) and if specified with value, assume this value is the > editor program to run. So, two rather separate tasks: handl

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Ben Finney
Steven D'Aprano writes: > If you already know Python, and just want to learn Tkinter, then using > such an old book is probably acceptable, in my opinion. There are much more current resources though, which is important because not only Python but especially Tk has gone through some dramatic im

Re: Looking for Python script for Vector Map simplification, preserving shape and topology

2012-05-17 Thread Simon Cropper
On 18/05/12 03:46, David Shi wrote: Dear All, I am looking for Python script for Vector Map simplification, preserving shape and topology. Please get in touch with davidg...@yahoo.co.uk Regards. David David, You really need to provide more information to get a specific answer; what sort

argparse - option with optional value

2012-05-17 Thread Miki Tebeka
Greetings, I'd like to have an --edit option in my program. That if not specified will not open editor. If specified without value will open default editor ($EDITOR) and if specified with value, assume this value is the editor program to run. The way I'm doing it currently is: ... no_ed

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Peter
I have used Grayson's book - purchased and read many years ago now though. I am only an occasional GUI programmer, but have recently moved away from Tkinter and ttk towards wxPython - mainly because I am very dissatisfied with the lack of widgets to choose from. (new from 2.7 on) ttk supposedly

Re: Are there any instrumentation widgets for wxpython or tkinter?

2012-05-17 Thread Peter
Or wxPython is another good alternative. Download the demo and have a look at the widgets people have already used/created. I think there are some good choices for instrumentation (from memory). -- http://mail.python.org/mailman/listinfo/python-list

str.isnumeric and Cuneiforms

2012-05-17 Thread Marco
Is it normal the str.isnumeric() returns False for these Cuneiforms? '\U00012456' '\U00012457' '\U00012432' '\U00012433' They are all in the Nl category. Marco -- http://mail.python.org/mailman/listinfo/python-list

Looking for Python script for Vector Map simplification, preserving shape and topology

2012-05-17 Thread David Shi
Dear All, I am looking for Python script for Vector Map simplification, preserving shape and topology. Please get in touch with davidg...@yahoo.co.uk    Regards. David -- http://mail.python.org/mailman/listinfo/python-list

multiprocessing : farming out python functions to a cluster

2012-05-17 Thread Abhishek Pratap
Hey Guys I am wondering if I can execute/run python functions through multiprocessing package on a grid/cluster rather than on the same local machine. It will help me create 100's of jobs on which same function has to be used and farm them out to our local cluster through DRMAA. I am not sure if t

Re: Newbie questions on import & cmd line run

2012-05-17 Thread Ross Ridge
Steven D'Aprano wrote: >#! ("hash-bang") lines currently do nothing on Windows machines, they are >just comments. However, on Unix and Linux machines (and Macintosh?) they >are interpreted by the shell (equivalent to cmd.exe or command.com), in >order to tell the shell what interpreter to use

Re: Extracting DB schema (newbie Q)

2012-05-17 Thread Steve Sawyer
Thanks, James, but John Gordon identified my usage error so I'm good to go now. On Mon, 14 May 2012 09:28:06 -0700 (PDT), james hedley wrote: >On Monday, 14 May 2012 17:01:49 UTC+1, Steve Sawyer wrote: >> Brand-new to Python (that's a warning, folks) >> >> Trying to write a routine to import a

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Peter Pearson
On Thu, 17 May 2012 07:48:50 -0400, Mark R Rivet wrote: > > I am in the process of learning python, and want to learn tkinter for > GUI stuff. Is tkinter what people are using for GUI? Tkinter is one option. PyGUI is another. More suggestions will probably accrete on this thread. -- To email

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Peter Pearson
On Wed, 16 May 2012 23:55:29 -0400, Mark R Rivet wrote: > I have a copy of this book and was wondering how relevant the content > is considering the publish date is 2000. Are people still using this > information? Anyone have any experience with this book? I bought the book years ago, hoping to

Re: Pan/Zoom Line Plot in Coyote Graphics

2012-05-17 Thread David Fanning
David Fanning writes: > At my new job, we had a need to be able to zoom into a > lot of data very quickly and then pan around the data > to see what points are in the immediate vicinity. Aahhh! Darn it. I keep sending this to the wrong news group! Old fingers are hard to train, I guess. Sorry. I

Pan/Zoom Line Plot in Coyote Graphics

2012-05-17 Thread David Fanning
Folks, At my new job, we had a need to be able to zoom into a lot of data very quickly and then pan around the data to see what points are in the immediate vicinity. Python has a rudimentary capability like we wanted, but it's just a bit clunky and slow. You can pan IDL 8.1 graphics (sometimes ev

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Bill Felton
On May 17, 2012, at 9:07 AM, Kevin Walzer wrote: > On 5/16/12 11:55 PM, Mark R Rivet wrote: >> I have a copy of this book and was wondering how relevant the content >> is considering the publish date is 2000. Are people still using this >> information? Anyone have any experience with this book?

Re: Newbie questions on import & cmd line run

2012-05-17 Thread Mark Lawrence
On 17/05/2012 05:29, Chris Rebert wrote: On Wed, May 16, 2012 at 6:45 PM, gwhite wrote: #! That's a shebang line. See http://en.wikipedia.org/wiki/Shebang_(Unix) It's doesn't matter at all since you're on Windows. On Unix-like systems, one typically writes: #!/usr/bin/env python # File

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread python
> Mark Lutz' "Programming Python" has extensive coverage of Tkinter (it's a huge book and devotes several chapters to Tkinter), and has been updated at regular intervals, most recently in the last year or two; I've found it a very helpful reference and guide to Tkinter programming. +1 I highl

print XML

2012-05-17 Thread Nibin V M
Hello, I have the following code, which will assign XML data to a variable! What is the best method to write the contents of the variable to a file? === doc = minidom.parse(sys.stdin) === Any help will be highly appreciated! Thank you, -- Regards Nibin. http://TechsWare.in -- h

Re: tiny script has memory leak

2012-05-17 Thread Terry Reedy
On 5/17/2012 5:50 AM, Alain Ketterlin wrote: gry writes: sys.version --> '2.6 (r26:66714, Feb 21 2009, 02:16:04) \n[GCC 4.3.2 [gcc-4_3-branch revision 141291]] I thought this script would be very lean and fast, but with a large value for n (like 15), it uses 26G of virtural memory, and

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-17 Thread Terry Reedy
On 5/17/2012 4:23 AM, Devin Jeanpierre wrote: str.isdecimal = isdecimal(...) S.isdecimal() -> bool Return True if there are only decimal characters in S, False otherwise. Help on method_descriptor in str: str.isdigit = isdigit(...) S.isdigit() -> bool Return True i

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Kevin Walzer
On 5/16/12 11:55 PM, Mark R Rivet wrote: I have a copy of this book and was wondering how relevant the content is considering the publish date is 2000. Are people still using this information? Anyone have any experience with this book? I guess what I mean, is, any of the code in this book depre

Right way to initialize python embedded in a multi-threaded application

2012-05-17 Thread shooshx
I'm embedding python in a multi-threaded C application. I've taken care to wrap every call to the Python C API with gstate = PyGILState_Ensure(); // call python code PyGILState_Release(gstate); But I'm stumped with what to do in the initialization. Right after the call to Py_IsInitialized() I've

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Andrew Berg
On 5/17/2012 6:48 AM, Mark R Rivet wrote: > I am in the process of learning python, and want to learn tkinter for > GUI stuff. Is tkinter what people are using for GUI? tkinter is one of several GUI toolkits that can be used with Python. IIRC, most people use PyGTK or PyQt for serious projects. ht

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Mark R Rivet
On 17 May 2012 09:53:40 GMT, Steven D'Aprano wrote: >On Wed, 16 May 2012 23:55:29 -0400, Mark R Rivet wrote: > >> I have a copy of this book and was wondering how relevant the content is >> considering the publish date is 2000. Are people still using this >> information? Anyone have any experienc

Re: tiny script has memory leak

2012-05-17 Thread Alain Ketterlin
gry writes: > sys.version --> '2.6 (r26:66714, Feb 21 2009, 02:16:04) \n[GCC 4.3.2 > [gcc-4_3-branch revision 141291]] > I thought this script would be very lean and fast, but with a large > value for n (like 15), it uses 26G of virtural memory, and things > start to crumble. > > #!/usr/bin/

Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Steven D'Aprano
On Wed, 16 May 2012 23:55:29 -0400, Mark R Rivet wrote: > I have a copy of this book and was wondering how relevant the content is > considering the publish date is 2000. Are people still using this > information? Anyone have any experience with this book? I guess what I > mean, is, any of the cod

ANN: straight.command 0.1a1 - A command framework with a plugin architecture

2012-05-17 Thread Calvin Spealman
I'd like to announce a new project, based on straight.plugin, a command framework that provides a declarative way to define command-line options, sub-commands, and allows plugins from third-parties to expand commands. This is all very early, I'm calling this version 0.1a1 and lots of things are mi

Re: tiny script has memory leak

2012-05-17 Thread Iain King
On Friday, 11 May 2012 22:29:39 UTC+1, gry wrote: > sys.version --> '2.6 (r26:66714, Feb 21 2009, 02:16:04) \n[GCC 4.3.2 > [gcc-4_3-branch revision 141291]] > I thought this script would be very lean and fast, but with a large > value for n (like 15), it uses 26G of virtural memory, and things

Re: bash/shell to python

2012-05-17 Thread Chris Rebert
On Wed, May 16, 2012 at 7:16 PM, Rita wrote: > Hello, > > I currently build a lot of interfaces/wrappers to other applications using > bash/shell. One short coming for it is it lacks a good method to handle > arguments so I switched to python a while ago to use 'argparse' module. Its > a great com

Re: Newbie questions on import & cmd line run

2012-05-17 Thread Dave Angel
On 05/17/2012 12:54 AM, alex23 wrote: > On May 17, 11:45 am, gwhite wrote: > > I don't think that only-one-import is true for scripts that are run > from the command line, though. They can exist as both '__main__' and > their actual name in the module table. (Someone please correct me if > this

Re: bash/shell to python

2012-05-17 Thread Chris Angelico
On Thu, May 17, 2012 at 12:16 PM, Rita wrote: > Hello, > > I currently build a lot of interfaces/wrappers to other applications using > bash/shell. One short coming for it is it lacks a good method to handle > arguments so I switched to python a while ago to use 'argparse' module. Its > a great co

Re: Where is the most recent Tkinter information

2012-05-17 Thread Devin Jeanpierre
On Thu, May 17, 2012 at 12:04 AM, Simon Cropper wrote: > The main page of the python 3.2.3 documentation for tkinter can be found > here... > http://docs.python.org/py3k/library/tkinter.html?highlight=tkinter#tkinter > it is dated 2012. > > This seems to be duplicated from the ActiveState site her

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-17 Thread Devin Jeanpierre
On Wed, May 16, 2012 at 5:07 PM, Thomas 'PointedEars' Lahn wrote: > RTFM. > > $ python3 -c 'print("42".isdecimal.__doc__ + "\n"); > print("42".isdigit.__doc__)' Heh, don't print docstrings. Use pydoc. $ ( export PAGER=cat && pydoc3 str.isdecimal && pydoc3 str.isdigit ) Help on method_descriptor

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-17 Thread Marco
On 05/17/2012 02:15 AM, Steven D'Aprano wrote: the Fine Manual has more detail, although I admit it isn't *entirely* clear what it is talking about if you're not a Unicode expert: http://docs.python.org/py3k/library/stdtypes.html#str.isdecimal You are right, that is clear, thanks :) Exampl

Re: How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-05-17 Thread EdmundBuffey
I have some more info from a company that makes under-cabinet http://www.ledstrips8.com/outdoor-led-lighting-c-11.html led outdoor lighting . From looking at some of these posts and seeing some of the pricing, I know they are better http://www.ledstrips8.com/flexible-led-strip-lighting-c-32.html