Widget common to multiple views: import from commonDlg?

2020-04-02 Thread Rich Shepard
.grid(row=3, sticky='wen') notes.configure(xscrollcommand=scroll_x.set) (I'm not confident I have the scrollbars correctly written.) Now, when I edit this data entry widge I do so in each of the eight data entry/edit modules. My question is whether I can put this one widget in

Adding tkinter modules to notebook tabs

2020-04-04 Thread Rich Shepard
a few describe how to place individual widgets on a tab. But I've not found how to place a widget-filled module on a notebook tab. I am asking for references I can read to learn how to do this. Thanks in advance ... and stay healthy, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding tkinter modules to notebook tabs

2020-04-04 Thread Rich Shepard
# add titles to tabs nb.add(page3, text='Biota') ... This puts the text on each notebook tab, correct? If so, how do I add class BiotaDataForm(Tk.Frame): which defines all the widgets in the module in views/biota.py into the body of the notebook's page3? Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding tkinter modules to notebook tabs

2020-04-05 Thread Rich Shepard
e. Each of the tab frames is a separate Frame subclass in the same file, but they could be in separate files. Thanks, Terry. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding tkinter modules to notebook tabs [RESOLVED]

2020-04-05 Thread Rich Shepard
nge all Tk widgets to ttk widgets for optical reasons, but that's a side note. I thought I had all as ttk; I'll check and correct as necessary. Best regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: SQLAlchemy & Postgresql

2020-05-28 Thread Rich Shepard
r all database tables) in a single module, model.py. This assumes, of course, that you have defined the postgres database schema. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: GUI (tkinter) popularity and job prospects for

2020-10-22 Thread Rich Shepard
y purpose is to get the recipient to read the enclosed resume. 2. The resume's only purpose is to get you an interview with an ultimate decision-maker (not a personnel gate keeper). 3. The interview's purpose is to sell yourself as a benefit to the company and proof of how clever the

Python3 change logs

2020-12-15 Thread Rich Shepard
gards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-15 Thread Rich Shepard
On Tue, 15 Dec 2020, Skip Montanaro wrote: Change logs are kept as part of the source, I believe. Try browsing the cpython GitHub repo: https://github.com/python/cpython Skip, Thanks, I will. Stay well, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-15 Thread Rich Shepard
ot; page, but under Download -> All Releases (rather than Source code) there's a column of Release Notes for each version. I'll check github, too. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-15 Thread Rich Shepard
again, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 change logs

2020-12-16 Thread Rich Shepard
On Tue, 15 Dec 2020, Terry Reedy wrote: In particular, for latest release (now 3.9) you would want tkinter in https://docs.python.org/3/whatsnew/3.9.html#improved-modules but nothing there. However, https://docs.python.org/3.8/whatsnew/3.8.html#tkinter Thanks, Terry. Stay well, Rich

setuptools issue

2020-12-17 Thread Rich Shepard
etup.py cannot find a suitable setuptools. TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

RE: setuptools issue

2020-12-18 Thread Rich Shepard
quot;, line 27, in run subprocess.check_call([sys.executable, 'scripts/download_import_cldr.py']) File "/usr/lib64/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/python3', 'scripts/download_import_cldr.py']' returned non-zero exit status 1. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: "Worst bugs" and Python?

2020-12-18 Thread Rich Shepard
hits the software industry. Carpe weekend, Rich -- https://mail.python.org/mailman/listinfo/python-list

Installing python3 modules

2020-12-26 Thread Rich Shepard
e-packages/ directory. There's not a pip3 so how do I get pip and all other python modules in the python3.9/site-packages/ directory? As an occasional coder (for my own business uses) I'm far from an advanced python user. TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing python3 modules

2020-12-26 Thread Rich Shepard
/usr/lib/python2.7/site-packages/ rather than //usr/lib64/python3.9/site-packages/. I'm rebuilding all installed python3 packages. Stay well, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing python3 modules

2020-12-26 Thread Rich Shepard
On Sat, 26 Dec 2020, Barry Scott wrote: It works great with 3.9. which web psge did you see the claim on? Barry, I don't recall which pip3 installation page it was. But I used 'python3 get-pip.py' and that worked. Stay well, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing python3 modules

2020-12-26 Thread Rich Shepard
and all other python modules in the python3.9/site-packages/ directory? Fixed. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Learning why module will not load

2020-12-29 Thread Rich Shepard
'six' import python3_six Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'python3_six' How do I diagnose why neither module is found? TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Learning why module will not load

2020-12-29 Thread Rich Shepard
ll be corrected today. Thanks. Stay well, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Learning why module will not load

2020-12-29 Thread Rich Shepard
using python-3.9.1. Stay well, Rich -- https://mail.python.org/mailman/listinfo/python-list

ipython missing required module with python-3.9.1

2020-12-30 Thread Rich Shepard
ent', 'enums', 'eventloop', 'filters', 'history', 'input', 'interface', 'key_binding', 'keys', 'layout', 'mouse_events', 'output', 'prompt', 'prompt_async', '

NumPy: build script not finding correct python version

2021-01-03 Thread Rich Shepard
sysconfig if sys.version_info[:2] < (3, 5): raise RuntimeError("Python version >= 3.5 required.") I'm not seeing why sys.version_info is not finding the installed version within the script and need insight from others with greater Python knowledge than I have. TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: NumPy: build script not finding correct python version [UPDATE]

2021-01-03 Thread Rich Shepard
On Sun, 3 Jan 2021, Rich Shepard wrote: I'm trying to rebuild numpy-1.18.2 using the newly installed Python-3.9.1. The script fails when running setup.py: Traceback (most recent call last): File "setup.py", line 32, in raise RuntimeError("Python version >= 3.5 r

Tkinter menu item underline syntax

2021-01-06 Thread Rich Shepard
of the character you’d like underlined (from 0 to the length of the string - 1)." There is no example of the proper syntax and my web searches haven't found one, either. How do I pass a string index to the command to underline that character? TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menu item underline syntax [RESOLVED]

2021-01-06 Thread Rich Shepard
e line above it needed to be terminated by a comma, not \n. I found the answer: underline is an option and options are key: value pairs. So, the correct syntax is underline: 0. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menu item underline syntax [RESOLVED]

2021-01-06 Thread Rich Shepard
( label = 'New', command = self.callbacks['file->new', underline: 0], accelerator = 'Ctrl+N' ) The label line separated from the command with a comma. The underline option is a key and separated from its value with a colon. HTH,

Re: Tkinter menu item underline syntax [RESOLVED]

2021-01-06 Thread Rich Shepard
7;s time to run it through pdb. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menu item underline syntax [RESOLVED]

2021-01-06 Thread Rich Shepard
rote any Python code. Assignments have spaces surrounding equal signs while values to options don't. I think I have the code cleaned now. Regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menu item underline syntax [RESOLVED]

2021-01-07 Thread Rich Shepard
that's what a colon means in a context like x[a:b] The template I used for the menu doesn't scale to my application so I'm re-writing it from scratch. Thanks, all, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter menu item underline syntax [RESOLVED]

2021-01-07 Thread Rich Shepard
editor, 978. menu.add_command(label=ulchars[i] + " " + file_name, command=callback, underline=0) Thank you for the clarification. Rich -- https://mail.python.org/mailman/listinfo/python-list

tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Rich Shepard
^ yet that's the syntax he prints on page 84 (and has in the book's code supplement). Why am I getting an invalid syntax error here? TIA, Rich #!/usr/bin/env python3 # main file to start application. from os import environ import sys import pdb from datetime import datetime

Re: tkinter: creating/attaching menubar to top level window [RESOLVED]

2021-01-08 Thread Rich Shepard
eyes saw what I kept missing, menubar.add_cascade(menu=self.menu_file, label='File') I was going to add the 'self' there when I found what stopped the processing before it. Many thanks. Stay well and carpe weekend, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Rich Shepard
On Fri, 8 Jan 2021, Richard Damon wrote: It could be either: self.menu = menubar or self['menu'] = menubar Got it, Richard. Removed the period after 'self'. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list

Application window geometry specifier

2021-01-12 Thread Rich Shepard
;geometry', self._w, newGeometry) _tkinter.TclError: bad geometry specifier "600x500+340.0+262.0" As the geometry string represents window width times window height plus x-offset plus y-offset I'm not seeing my error. Please show me what's wrong with specifier. TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-08 Thread Rich Teer
ing new Java programming contracts. > -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-08 Thread Rich Teer
TML emails before I even see them, and more often tham not I'll delete any others that sneak through the gate. If people want me to read their email, they should send it to me in an open, universal format, which for email is plain text. It's as simple as that. -- Rich Teer, SCNA,

Re: Jargons of Info Tech industry

2005-10-09 Thread Rich Teer
on my web site: www.example.com/rich/photos". > People keep thinking of email as a techie preserve. Worse, people keep misusing email. -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich -- http://m

Re: Jargons of Info Tech industry

2005-10-09 Thread Rich Teer
rmatting for the foolish practice off allowing > untrusted code to run without even an ok. They have nothing to do > with each other. Agreed. But as I said above, I have many other issues with HTML emails, over and above the security concerns. -- Rich Teer, SCNA, SCSA, OpenSolaris CAB

Re: Jargons of Info Tech industry

2005-10-10 Thread Rich Teer
hen StarOffice and OpenOffice do the job just as well, for much cheaper (and are cross platform too)?! > You could even send me a URL to a webpage. Indeed! -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.

Re: Jargons of Info Tech industry

2005-08-22 Thread Rich Teer
On Mon, 22 Aug 2005, jan V wrote: > Please don't use ASCII art... not everyone uses a fixed-width font for his > newsreader... Then I humbly submit thet they are using broken and/or badly configured readers. ;-) -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member Pres

Re: Jargons of Info Tech industry

2005-08-23 Thread Rich Teer
On Tue, 23 Aug 2005, Mike Schilling wrote: > A formatting-only subset of HTML would be useful for both e-mail and Usenet > posts. Nope; plain text for both mediums is, IMHO, th eonly way to go. -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (25

Re: Jargons of Info Tech industry

2005-08-25 Thread Rich Teer
, historically have been, and should always be, plain text mediums. If I wanted to look at prettily formatted HTML, I'd use a web browser to look at the web. -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-grou

Re: Jargons of Info Tech industry

2005-08-25 Thread Rich Teer
y possible (e.g., HTML email and Usenet) is not necessarily a good argument for actully DOING it. -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-08-25 Thread Rich Teer
On Thu, 25 Aug 2005, Ulrich Hobelmann wrote: > CSS sheet. If things were that way, suddenly people *would* use Outlook No no no! Let's keep those Outhouse lusers away from Usenet. There's tto much top posting as it is! -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President

Re: Jargons of Info Tech industry

2005-08-26 Thread Rich Teer
On Fri, 26 Aug 2005, John Bokma wrote: > people from www to Usenet or vice versa is beyond me. If 80% of the current > Usenet users stop posting, Usenet is not going to die :-D Heh. Quite the opposite, I reckon: it would get much better (higher SNR)! :-) -- Rich Teer, SCNA, SCSA, OpenS

Re: Jargons of Info Tech industry

2005-08-26 Thread Rich Teer
a grin? The idea of my wife checking her email while I'm "doing her" over my computer is most amusing! :-) -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing portable applications (Was: Jargons of Info Tech industry)

2005-08-27 Thread Rich Teer
On Sat, 27 Aug 2005, Mike Meyer wrote: > I think you're right - a web standard designed for writing real > applications probably wouldn't start life as a markup for text. The > only thing I can think of that even tries is Flash, but it's What about Java? -- Rich Teer,

Re: OpenSource documentation problems

2005-08-27 Thread Rich Teer
/ \C_c_c_c -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich -- http://mail.python.org/mailman/listinfo/python-list

Re: OpenSource documentation problems

2005-09-01 Thread Rich Teer
On Thu, 1 Sep 2005, Asbjørn Sæbø wrote: > I suppose you are going to volounteer to fix it, then. Right? I wish he'd just volunteer to shut up--permanently. -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-g

vendor-packages directory

2005-09-20 Thread Rich Burridge
t; + sys.version[:3], + "vendor-packages")] else: sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")] if sys.platform == 'darwin': Is this someth

Re: Managing Google Groups headaches

2013-12-04 Thread Rich Kulawiec
(comments from a lurker on python-list) - Google "groups" is a disaster. It's extremely poorly-run, and is in fact a disservice to Usenet -- which is alive and well, tyvm, and still used by many of the most senior and experienced people on the Internet. (While some newsgroups are languishing an

help please: tkinter grid layout is very slow

2014-11-13 Thread Rich Cook
Hi, I'm trying to toss together an image browser in tkinter, and it is so slow it is unworkable. Here is my code. Can someone point out why it's so slw? :-) Thanks root = Tkinter.Tk() root.geometry("1000x280+300+300") label = Tkinter.Button(root, compound=Tkinter.TOP) label.pack() numim

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-24 Thread Rich Teer
/ \C_c_c_c -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member . * * . * .* . . * . .* President

Python stack trace on blocked running script.

2006-07-25 Thread Rich Burridge
Hi all, If this is a frequently asked question, then just slap me silly and point me in the right direction. We are currently experiencing a hanging problem with Orca [1], a screen reader/magnifier written in Python. We know how to get a stack trace of the current thread in a Python problem, but

Parsing String, Dictionary Lookups, Writing to Database Table

2006-09-11 Thread Rich Shepard
chr(66)+chr(32): 0.167, # B + SP chr(18)+chr(32): 0.143, # DC2 + SP chr(10)+chr(32): 0.125, # LF + SP chr(6)+chr(32): 0.111# ACK + SP } I know how I'd do all this in C, but since I'm learning python I have not found how best to accomplish this despite

Re: Parsing String, Dictionary Lookups, Writing to Database Table

2006-09-12 Thread Rich Shepard
track. I greatly appreciate the time and effort you put into helping me. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax:

PyCrust Question

2006-09-13 Thread Rich Shepard
To test my code interactively I decided to try PyCrust. However, all the File menu items except Save and Quit are greyed out so I cannot open a saved file. Is there a simple explanation I've overlooked? Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Ap

Coding Nested Loops

2006-09-15 Thread Rich Shepard
rd dictionary. I suspect that iterators might be the way to accomplish this, but I really don't know. However, I would like to learn so that I can solve similar problems by myself. TIA, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ec

Re: Coding Nested Loops

2006-09-15 Thread Rich Shepard
verted into values meaningful to the application. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 -- http://mail.p

Re: Coding Nested Loops

2006-09-15 Thread Rich Shepard
On Fri, 15 Sep 2006, Bjoern Schliessmann wrote: That doesn't answer the question. A list of 2-tuples would do the same (and was ordered and could be indexed). Björn, et al.: For the purpose of generating a data sample, the list of 2-tuples will work. Thanks all, Rich -- Rich

Re: Coding Nested Loops

2006-09-15 Thread Rich Shepard
erstand what's going on. But, I can see that this would work. Thank you, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 F

Re: Coding Nested Loops

2006-09-16 Thread Rich Shepard
ops will work, too. Use whatever you find easiest to > maintain. I found the library page and will continue looking for more comprehensive documentation. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Acce

Re: Looking for a python IDE

2006-09-16 Thread Rich Shepard
There are a bunch of alternatives available and only your opinion will let you choose among them. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator <http://www.appl-ecosys.com> Voice:

Re: RegexBuddy (anyone use this?)

2006-09-16 Thread Rich Shepard
in which they were brought up. I'm really happy that you found an editor that you like, but your rationale will not sway many others. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator <

Re: Coding Nested Loops

2006-09-16 Thread Rich Shepard
ist, presumably so that you can iterate > through the elements yourself. OK. The former picks the element for you while with the latter we must specify which element to pick. Thank you. This is all very good to know. Rich -- Richard B. Shepard, Ph.D. |The Envi

Re: Coding Nested Loops

2006-09-16 Thread Rich Shepard
frame). Ah, yes. I totally forgot this. Thanks for the reminder, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 -- http://mail.python.org/mailman/listinfo/python-list

The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread rich murphy
I am studying Python language. I have Python 2.5 installed in my PC which is running on Windows XP. I placed the the script called "python_script" in C:\Python25 directory where all the other Python files are. When I tried to import the script called "python_script", it kept printing the famous e

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread rich murphy
Thank you both for responding. Yes of course the file has the ".py" extension and yes I went through the tutorial. Gabriel Genellina wrote: > At Wednesday 13/12/2006 22:16, rich murphy wrote: > > >I am studying Python language. I have Python 2.5 installed in my PC > >

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-13 Thread rich murphy
Ben Finney wrote: > "rich murphy" <[EMAIL PROTECTED]> writes: > > > I am studying Python language. > > Welcome! Allow me to direct you to the Python tutorial: > > http://docs.python.org/tut/> > > Please take the time to work through all the exe

Re: The Famous Error Message: "ImportError: No module named python_script"

2006-12-14 Thread rich murphy
Thanks to everyone who responded with valuable suggestions. I appreciate them all. I found the exact reason why "import" command fails. At the beginning I created my script file with MS Notepad. After studying all the advice, I realized that I did not try other text editors just becuase the tutori

Re: Xah's Edu Corner: Unix damage: color names

2006-02-07 Thread Rich Teer
/ \C_c_c_c -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich -- http://mail.python.org/mailman/listinfo/python-list

Popup menus without an associated window

2006-03-05 Thread Rich Churcher
Is there a way using any of the Python UI toolkits to generate popup menus outside the context of an application? For example, middle-clicking on the desktop shows a list of shortcuts to choose from. Pointers to source examples would be appreciated. -- Cheers, Rich. -- http://mail.python.org

Re: *** Dr G Polya BRILLIANTLY analyses the Virgina Shooting Incident ***

2007-04-24 Thread Rich Grise
he > same size as Ireland) a couple of hundred miles south of the > Australian mainland. It is a state of Australia (not Austria, which is > where you'd need to go for edelweiss). LOL! Thanks! Rich -- http://mail.python.org/mailman/listinfo/python-list

Right-Justifying Numeric Output

2007-01-25 Thread Rich Shepard
esults. Is there a way of right justifying numeric output? Thanks, Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.| Accelerator(TM) <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-6

Re: Right-Justifying Numeric Output

2007-01-25 Thread Rich Shepard
On Thu, 25 Jan 2007, hg wrote: > assuming max size = 10 > > #with spaces >>> '% 10d' % 11 > '11' > #with zeros >>> '%010d' % 11 > '11' Thank you very much! I didn't see this in any of my Python

Re: Descriptors and side effects

2007-11-05 Thread Rich Harkins
quot; def __init__(self, fn): self.fn = fn def __get__(self, target, cls=None): if target is None: return self.fn # Helps pydoc else: obj = self.fn(target) setattr(target, self.fn.__name__, obj) return obj

Re: Descriptors and side effects

2007-11-05 Thread Rich Harkins
for whether the associated objects were created. When used in a large tree, not creating a lot of extra lists and dictionaries can save a lot of memory and CPU as the children and attributes are not created or explored unless they were manipulated. Rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Descriptors and side effects

2007-11-05 Thread Rich Harkins
Bruno Desthuilliers wrote: > Rich Harkins a écrit : >> [EMAIL PROTECTED] wrote: >>> Hello everyone, >>> >>> I'm trying to do seemingly trivial thing with descriptors: have >>> another attribute updated on dot access in object defined using >>

Re: Functions as Objects, and persisting values

2007-11-05 Thread Rich Harkins
print "HERE" You will get: Y_VAR DESTROYED Y_VAR HERE If the entire dict of closed() was kept you would have seen: Y_VAR Y_VAR HERE DESTROYED Since closed hadn't been destroyed yet: thus there was only one reference remaining to global_x after closed() and inner() were called. Rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Descriptors and side effects

2007-11-05 Thread Rich Harkins
ssume... Yeah, that's probably the better term. [snip] Again, I've used it quite a bit for various things and it's worked well for the sort of thing the OP was requesting. Of course, your mileage may vary. :) Cheers! Rich PS: Sorry about the weird reposts. Thunderbird chaos. -- http://mail.python.org/mailman/listinfo/python-list

Re: opposite of zip()?

2007-12-17 Thread Rich Harkins
24))' 'unzip.unzip_extend([[], []], zipped)' 1000 loops, best of 3: 510 usec per loop By comparison, here's the unzip() version above: bash-3.1$ python -m timeit -s 'import unzip; zipped=zip(range(1024), range(1024))' 'unzip.unzip(zipped)' 1000 loops, best of 3: 504 usec per loop Rich -- http://mail.python.org/mailman/listinfo/python-list

Re: opposite of zip()?

2007-12-17 Thread Rich Harkins
> Neat and completely confusing, huh? :-) > > <http://paddy3118.blogspot.com/2007/02/unzip-un-needed-in-python.html> I hadn't thought about zip() being symmetrical like that. Very cool... Rich -- http://mail.python.org/mailman/listinfo/python-list

struct unpack to pre-allocated array?

2009-01-09 Thread Rich Henry
Is there any way to struct.unpack or struct.unpack_from into an existing array.array or similar structure? I am unpacking file data in a loop and i was hoping to find something that performs better than simply unpacking into a new tuple each iteration. Thanks in advance, Rich -- http

Re: how to get the thighest bit position in big integers?

2008-10-05 Thread Rich Healey
faster. > > OFFSET= tuple( int(x) for x in "5433" ) > def get_highest_bit_num(r): > s = "%x"%r > return len(s) * 4 - OFFSET[int(s[0],16)] > > P.S. Back home, this sort of 'nitpicking' would be judged > unconstructive. Wort

Re: Problem when Installing PyML module modules with mingw32

2008-11-04 Thread Rich Healey
uthor stated that the module was partly written in C++ (which I hate). > > Thanks in advance > > Aonlazio > Why remove "###Bla bla bla bunch of errors###" How do we help without the error messages! - -- Rich Healey - iTReign \.''`. /

Re: Problem when Installing PyML module modules with mingw32

2008-11-04 Thread Rich Healey
AON LAZIO wrote: > On Tue, Nov 4, 2008 at 9:25 PM, Rich Healey <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > Why remove "###Bla bla bla bunch of errors###" > > How do we help without the error messages! > AON LAZIO wrote: > Ah, s

imaplib fetch message flags

2009-03-01 Thread Rich Healey
ind. I've tried (BODY[HEADER.FIELDS (SUBJECT FROM FLAGS)]) but it doesn't have the desired result. I'm sure I'm missing something obvious. Thanks in advance Richo - -- Rich Healey - iTReign \.''`. / healey.r...@gmail.com Developer / Systems Admin

Re: imaplib fetch message flags

2009-03-01 Thread Rich Healey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich Healey wrote: > Hi List, > > I'm using an example of an imap client I found with google as a > framework for a more fullfeatured imap client. > > They use the line: > > f = self.M.fetch(num, '(BODY[HEADER

Re: print problem

2008-06-17 Thread Rich Healey
in the print statement, and it works. >> >> Is that because of the print statement buffer the characters until >> there is a new line character? > > Very probably, altough I can't reproduce it on Windows. Try invoking the > script with python -u (unbuffe

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Rich Healey
sier browse the projectfiles for example. I don't want to start a flamewar. But I like vim. - -- Rich Healey - [EMAIL PROTECTED] Developer / Systems Admin - OpenPGP: 0x8C8147807 MSN: [EMAIL PROTECTED] AIM: richohealey33 irc.psych0tik.net-> #hbh #admins richohealey irc.freenode.

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Rich Healey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David wrote: > Rich Healey wrote: >> >> I don't want to start a flamewar. >> >> But I like vim. >> > Hi Rich, could I take a look at your .vimrc , the python stuff. > thanks > -- > http://mail.python

Re: Why is recursion so slow?

2008-07-01 Thread Rich Harkins
Nick Craig-Wood wrote: [snip] By definition any function in a functional language will always produce the same result if given the same arguments, so you can memoize any function. Ah, so that's why time.time() seems to be stuck... ;) Rich -- http://mail.python.org/mailman/listinfo/p

Re: sending to an xterm

2008-08-08 Thread Rich Healey
program to run and foo and bar are its arguments. >> The problem is that as soon as the program exits, xterm will exit >> also. >> > > OK, I see that. > > (getting off topic) > > any chance of keeping the xterm open after running the command? > > Thanks

Could anyone point me to a good site for pearl compiler download

2008-08-21 Thread rich murphy
Could anyone point me to a good site for pearl compiler download. -- http://mail.python.org/mailman/listinfo/python-list

C API type issue

2008-10-03 Thread Rich Henry
Made a simple little test program as im learning to embed python, have a simple script that just sets x=10.0 in test.py and prints type(x). Python prints that x is a float but PyFloat_Check() returns false. If i removed the check and just force it to print the double value, its correct. Any ideas w

Re: Popup menus without an associated window

2006-03-06 Thread Rich Churcher
> HTH, Wonderful Miki, thank you very much! -- Cheers, Rich. -- http://mail.python.org/mailman/listinfo/python-list

UnboundLocalError with extra code after return

2009-09-29 Thread Rich Healey
t2() File "C:\tmp\callonce\callonce.py", line 12, in __ return func() UnboundLocalError: local variable 'func' referenced before assignment Any ideas on why? This looks like a bug to me, but I'm quite new to this style of programming so it may be some nuance I'm

Re: UnboundLocalError with extra code after return

2009-09-29 Thread Rich Healey
On Sep 30, 2:15 pm, Rich Healey wrote: > I'm trying to write a decorator that causes a function to do nothing > if called more than once- the reason for this is trivial and to see if > I can (Read- I'm enjoying the challenge, please don't ruin it for me > =] ) >

<    1   2   3   4   >