Re: TaskQueue

2006-03-21 Thread Ron Adam
eing an external task anyway? I'm sure there are lots of um... issues. ;-) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: __slots__

2006-03-25 Thread Ron Garret
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > > One other question I did not get answered: is there any > > simple example of a Pythonic use of __slots__ that does NOT > > involve the creation of **many** instances. > > Since the only benefit of __slots__ is saving

Re: Accessing func_name from inside a function

2006-03-26 Thread Ron Adam
is" which would be short for "This object". This may also relate to suggestions to reduce the need for having self in the argument list of methods. So if a keyword "This" could mean this method or function, then "Self" could mean this class. Hmmm, methods that use "Self" in this way might run into problems, but I havn't had enough coffee to think it though. ;-) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Advice for Python and Web Server/Services?

2006-03-26 Thread Ron Davis
m so straight Python would be great if I can get it working. Thanks for any advice you can give. -- Ron Davis -- Ron Davis -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing func_name from inside a function

2006-03-26 Thread Ron Adam
Alex Martelli wrote: > Ron Adam <[EMAIL PROTECTED]> wrote: > >> A "Current" key word would fix this. Or possibly "This" which would be >> short for "This object". > > I think "This" would cause huge confusion, since in oth

Re: any() and all() on empty list?

2006-03-28 Thread Ron Adam
'all([])' is undefined? Here, none() and all() return contradicting values. So maybe the correct version may be... def all(S): if S == []: return False for x in S: if x return True return False I think a few valid actual use case examples could clear it up. What

Re: any() and all() on empty list?

2006-03-29 Thread Ron Adam
Paul Rubin wrote: > Ron Adam <[EMAIL PROTECTED]> writes: >> In this view and empty set can be True for all(). Is it posible >> 'all([])' is undefined? Here, none() and all() return contradicting >> values. So maybe the correct version may be... > >

Re: any() and all() on empty list?

2006-03-29 Thread Ron Adam
Paul Rubin wrote: > Ron Adam <[EMAIL PROTECTED]> writes: >> Just thinking about things. I really just want what is best for >> Python in the long term and am not trying to be difficult. > > I'm sorry, maybe it's the math geek in me, but I just see all tho

Re: any() and all() on empty list?

2006-03-29 Thread Ron Adam
()'. if not any(bug.status == 'open' for bug in bugs_filed): do_release() So to give a counter example... Where we are assembling widgets in a manufacturing plant. Where we don't want to go to the next step until *all* the sub parts are present. if all(part.status == &#x

Re: any() and all() on empty list?

2006-03-30 Thread Ron Adam
Duncan Booth wrote: > Ron Adam wrote: > >> Where we are assembling widgets in a manufacturing plant. Where we don't >> want to go to the next step until *all* the sub parts are present. >> >> if all(part.status == 'present' for part in unit): >

Re: any() and all() on empty list?

2006-03-30 Thread Ron Adam
hasall(S, value, test=None) hasall(S, True) # Test for actual "True" values or 1. hasall(S, True, bool) # test for true values, not zero or False. hasall(S, 'ok') hasall(S, True, lambda n: n=42) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() on empty list?

2006-03-30 Thread Ron Adam
Ron Adam wrote: > > hasall(S, True, lambda n: n=42) > That was suppose to be: hasall(S, True, lambda n: n==42) -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() on empty list?

2006-03-30 Thread Ron Adam
invalid value when passing arguments. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() on empty list?

2006-03-31 Thread Ron Adam
Carl Banks wrote: > Ron Adam wrote: >> Carl Banks wrote: >> >>> In Python, yes and no are the only possible answers. Probably the only >>> analogous thing you could do in Python would be for all() to raise >>> ValueError when passed an empty sequen

Re: proposed proposal: set.values()

2006-03-31 Thread Ron Adam
etween dicts > and sets. You could just do the following... >>> class vset(set): ... values = set.copy ... >>> s = vset([1,2,3]) >>> s.values() vset([1, 2, 3]) >>> for x in s.values(): ... x ... 1 2 3 Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() on empty list?

2006-04-01 Thread Ron Adam
ions for a better name. How about: countall(S, value=True) Considering len() is used to get a length, and countall() is related to all(), but it's explicit about what it's counting and would not return True on an empty set. I think it would be useful. true_count, count = countall(S), len(S) Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() on empty list?

2006-04-01 Thread Ron Adam
d=None): > if d == None: > d = {} > > for x in seq: > if x in d: > d[x] += 1 > else: > d[x] = 1 > return d > > > This neatly replaces truecount(), and you can use it for other things as > well. if True

Re: any() and all() on empty list?

2006-04-01 Thread Ron Adam
comments. > > Ideally there should be an official tally() function in some module in > Python, and then we can just use it and not worry about how to write it. :-) And it's a good candidate to be written in C as well. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: any() and all() on empty list?

2006-04-01 Thread Ron Adam
Ron Adam wrote: > Steve R. Hastings wrote: >> This neatly replaces truecount(), and you can use it for other things as >> well. > > if True in talley(S): do_somthing() > > Works for me... ;-) > > > Cheers, > Ron Actulley talley isn&#

xml element tree to html problem

2006-04-04 Thread Ron Adam
t html tag. 'object' is always mapped to , 'name' is always mapped to . etc... So I will probably have a dictionary to look them up. The problem I have is finding a relatively painless way to do the actual translation. Thanks in advance for any advise. Cheers, R

Re: xml element tree to html problem

2006-04-04 Thread Ron Adam
uot;size": ("li", "size"), > } > > for elem in tree.getiterator(): > elem.tag, klass = MAP[elem.tag] > if klass: > elem.set("class", klass) > > print ET.tostring(tree) Thanks a *LOT!* :-) This is w

Re: Python Module for Determining CPU Freq. and Memory?

2006-04-06 Thread Ron Adam
t For looking at memory on windows you might be able to make improvements to this class I wrote. I was going to add memget() methods for getting individual items, but it wasn't as useful as I was hoping it would be in checking my python memory use. For that I need info on individual ta

Re: pre-PEP: The create statement

2006-04-06 Thread Ron Adam
.. name = object(): This is a bigger change than adding the create keyword, (definitely not a pre-P3k item), and I'm not sure if it fits your use case, but it does allow for a larger variety of types without adding additional keywords. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: good style guides for python-style documentation ?

2006-04-06 Thread Ron Adam
reader)? > > any suggestions from this list ? > > Well there's: PEP 8 -- Style Guide for Python Code http://www.python.org/dev/peps/pep-0008/ But I presume you already know that one. It covers doc strings some, but not general documentation. A how-to on documenting would b

Appending Elements in Element Tree

2006-04-07 Thread Ron Adam
ould wrap the append and do it this way... def eappend(e1, e2): if e2 is None: return e1 e1.append(e2) return e1 Then do... e = eappend(e, get_element(obj)) # Append if not None. But maybe there's a better way? Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: how you know you're a programming nerd

2006-04-07 Thread Ron Adam
When you are working on your programming project on Friday night instead of going out. When you do go out, you look forward to getting home so you can work on your programming project some more. -- http://mail.python.org/mailman/listinfo/python-list

Re: how you know you're a programming nerd

2006-04-08 Thread Ron Adam
John Salerno wrote: > Ron Adam wrote: >> When you are working on your programming project on Friday night >> instead of going out. > > Ok, you win. :) > > Oh wait, it's Friday night and I'm typing this message...dang it! Yep, Hah Hah... No

Re: Appending Elements in Element Tree

2006-04-08 Thread Ron Adam
Ron Adam wrote: > > In my program I have a lot of statements that append elements, but > sometimes I don't want to append the element so it requres an if > statement to check it, and that requires assigning the returned element > from a function to a name or calli

Re: calculating system clock resolution

2006-04-08 Thread Ron Adam
Steven D'Aprano wrote: > On Fri, 07 Apr 2006 16:39:40 -0700, jUrner wrote: > >> Maybe it was not too clear what I was trying to point out. >> >> I have to calculate the time time.time() requires to return the next >> tick of the clock. >> Should be about 0.01ms but this may differ from os to os. >

TypeError: startView() takes exactly 1 argument (3 given)

2009-12-29 Thread Ron Croonenberg
gument (3 given)' does someone have any pointers or tips?, thanks; Ron here is the code I have the problem with: import rb import pygtk import gtk, gobject pygtk.require('2.0') class tb_button (rb.Plugin): # # the init thing # def __init__(self): rb.Plugin.__init__

Re: TypeError: startView() takes exactly 1 argument (3 given)

2009-12-30 Thread Ron Croonenberg
Dave Angel wrote: Ron Croonenberg wrote: Hello, I am trying to write a plugin for Rhythmbox in python and run into a 'strange' problem. For a method (an action for clicking a button) I started a method and however many arguments I use, it keeps giving me the same error:

Solved: TypeError: startView() takes exactly 1 argument (3 given)

2009-12-30 Thread Ron Croonenberg
Dave Angel wrote: Ron Croonenberg wrote: Hello, I am trying to write a plugin for Rhythmbox in python and run into a 'strange' problem. For a method (an action for clicking a button) I started a method and however many arguments I use, it keeps giving me the same error: 'Typ

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-30 Thread Ron Croonenberg
hello, is there a way, in python, to create a splash window and when the program has completed disappears by sending a msg to it? (I tried creating two gtk windows but gtk_main doesn't seem to return unless it gets closed.) tia Ron -- http://mail.python.org/mailman/listinfo/python-list

whoops: create a splash window in python

2009-12-30 Thread Ron Croonenberg
sorry about posting with the wrong subject... * hello, is there a way, in python, to create a splash window and when the program has completed disappears by sending a msg to it? (I tried creating two gtk windows but gtk_main doesn't seem to return unless it gets closed.) tia

Recall: How to log messages _only once_ from all modules ?

2009-11-24 Thread Barak, Ron
Barak, Ron would like to recall the message, "How to log messages _only once_ from all modules ?". -- http://mail.python.org/mailman/listinfo/python-list

How to log messages _only once_ from all modules ?

2009-11-24 Thread Barak, Ron
le Googling and reading http://docs.python.org/library/logging.html didn't enlighten me. Could you suggest what should I change in the above scripts so that the log messages would appear only once ? Thanks, Ron. <><> client.log Description: client.log client.py Description: client.py server.py Description: server.py -- http://mail.python.org/mailman/listinfo/python-list

How to log messages _only once_ from all modules ?

2009-11-24 Thread Barak, Ron
le Googling and reading http://docs.python.org/library/logging.html didn't enlighten me. Could you suggest what should I change in the above scripts so that the log messages would appear only once ? Thanks, Ron. server.py Description: server.py client.py Description: client.py client.log Description: client.log -- http://mail.python.org/mailman/listinfo/python-list

Re: How to log messages _only once_ from all modules ?

2009-11-24 Thread Ron Barak
On Nov 24, 3:45 pm, Soltys wrote: > Barak, Ron pisze: > > > > > > > Hi, > > > I'm trying to add the logging module to my application, but I seem to be > > missing something. > > My application (a wxPython one) has a main script that calls variou

Re: How to log messages _only once_ from all modules ?

2009-11-24 Thread Ron Barak
On Nov 24, 5:08 pm, Soltys wrote: > Ron Barak pisze: > > > > > > > On Nov 24, 3:45 pm, Soltys wrote: > >> Barak, Ron pisze: > > >>> Hi, > >>> I'm trying to add the logging module to my application, but I seem to be > >>&g

Re: python admin abuse complaint

2010-02-06 Thread Ron Adam
at person is able to grasp it. Regards, Ron -- http://mail.python.org/mailman/listinfo/python-list

How to add a library path to pythonpath ?

2010-03-16 Thread Barak, Ron
m_ts_tool\\SVMInspector\\lib', 'C:\\WINDOWS\\system32\\python26.zip', 'c:\\Python26\\DLLs', 'c:\\Python26\\lib', 'c:\\Python26\\lib\\plat-win', 'c:\\Python26\\lib\\lib-tk', 'c:\\Python26', 'c:\\Python26\\lib\\site-packages', 'c:\\Python26\\lib\\site-packages\\wx-2.8-msw-unicode'] $ What am I doing wrong ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: How to add a library path to pythonpath ?

2010-03-16 Thread Barak, Ron
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\version\PythonPath\ as C:\Python26\Lib;C:\Python26\DLLs;C:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\;C:\Python26\Lib\lib-tk; However, even with all the above, the SVMInspecor modules are not found. Bye, Ron. From: Pablo Recio

RE: How to add a library path to pythonpath ?

2010-03-16 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@ieee.org] > Sent: Tuesday, March 16, 2010 5:04 PM > To: Barak, Ron > Cc: Pablo Recio Quijano; python-list@python.org > Subject: RE: How to add a library path to pythonpath ? > > > > Barak, Ron wrote:

RE: How to add a library path to pythonpath ?

2010-03-17 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@ieee.org] > Sent: Tuesday, March 16, 2010 6:24 PM > To: Barak, Ron > Cc: Pablo Recio Quijano; python-list@python.org > Subject: Re: How to add a library path to pythonpath ? > > Barak, Ron wrote: > &

RE: How to add a library path to pythonpath ?

2010-03-17 Thread Barak, Ron
> -Original Message- > From: Mark Hammond [mailto:skippy.hamm...@gmail.com] > Sent: Wednesday, March 17, 2010 2:08 AM > To: Barak, Ron > Cc: Pablo Recio Quijano; python-list@python.org > Subject: Re: How to add a library path to pythonpath ? > > On 17/03/2010 1

Recall: How to add a library path to pythonpath ?

2010-03-18 Thread Barak, Ron
Barak, Ron would like to recall the message, "How to add a library path to pythonpath ?". -- http://mail.python.org/mailman/listinfo/python-list

Need help with basic DOM XML tree traversing

2010-04-25 Thread Barak, Ron
e I'm doing wrong ? Thanks, Ron. $ python -u xml_parse.py node: dom2.nodeType: 9 dom2.nodeName: #document node is DOCUMENT_NODE: node: dom2.nodeType: 9 dom2.nodeName: #document node is DOCUMENT_NODE: ('dom2._get_childNodes():', [, ]) Traceback (m

RE: Need help with basic DOM XML tree traversing

2010-04-26 Thread Barak, Ron
> -Original Message- > From: Stefan Behnel [mailto:stefan...@behnel.de] > Sent: Sunday, April 25, 2010 6:42 PM > To: python-list@python.org > Subject: Re: Need help with basic DOM XML tree traversing > > Barak, Ron, 25.04.2010 17:06: > > This is my first

py2exe sets error message

2010-04-26 Thread Ron Adelman
getting following error message when trying to run my setup file ...\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated import sets >Removing files in directory :./dist,keeping protedted files... python 2.65 new install. Any work arounds(Hacks)?? -- http://mail.pyth

How to get xml.etree.ElementTree not bomb on invalid characters in XML file ?

2010-05-04 Thread Barak, Ron
Error: not well-formed (invalid token): line 6, column 34 I read the documentation for xml.etree.ElementTree and see that it may take an optional parser parameter, but I don't know what this parser should be - to ignore the invalid characters. Could you suggest a way to call ElementT

RE: How to get xml.etree.ElementTree not bomb on invalid characters in XML file ?

2010-05-04 Thread Barak, Ron
> -Original Message- > From: Stefan Behnel [mailto:stefan...@behnel.de] > Sent: Tuesday, May 04, 2010 10:24 AM > To: python-list@python.org > Subject: Re: How to get xml.etree.ElementTree not bomb on > invalid characters in XML file ? > > Barak, Ron, 04.05.2010

Re: Broken pipe

2010-05-06 Thread Ron Eggler
.. :) Hm weird now I get something like: Traceback (most recent call last): File "./TestService.py", line 14, in sock.connect((host,port)) File "", line 1, in connect TypeError: an integer is required with this code: #!/usr/bin/python import sys import string from

Re: Broken pipe

2010-05-07 Thread Ron Eggler
-- Ron Eggler Suite# 1804 1122 Gilford St Vancouver, BC V6G 2P5 Canada (778) 230-9442 > On Thu, May 6, 2010 at 11:11 PM, Ron Eggler wrote: > > On May 6, 2010 10:37:14 pm Chris Rebert wrote: > >> On Thu, May 6, 2010 at 10:27 PM, cerr wrote: > >> > Hi There, > &g

How to eliminate "Debug: src/helpers.cpp(140): 'CreateActCtx' failed" message ?

2010-05-11 Thread Barak, Ron
non-fatal error and the application continues to run. I googled, but did not find a way to eliminate this Debug message. Could you suggest how to eliminate this message ? Thanks, Ron. Notes: $ python -V Python 2.6.4 $ cat setup.py #!/usr/bin/env python from

What are the limitations of cStringIO.StringIO() ?

2009-07-01 Thread Barak, Ron
am.input_file.read() MemoryError 1. Anyone knows whet's the limitation on cStringIO.StringIO() objects ? 2. Could you suggest a better way to create a string that contains the concatenation of several big files ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-22 Thread Ron Garret
In article , Neil Hodgson wrote: > milanj: > > > and all of them use native threads (python still use green threads ?) > >Python uses native threads. But then it adds the global interpreter lock, which completely undermines the utility of native threads. So yes, it uses native threads,

Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
e a way to run a pyc file without specifying the python path ? Bye, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@ieee.org] > Sent: Wednesday, July 29, 2009 21:05 > To: Barak, Ron > Cc: 'python-list@python.org' > Subject: Re: Run pyc file without specifying python path ? > > Barak, Ron wrote: > > Hi, >

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
From: PythonAB [mailto:pyt...@rgbaz.eu] Sent: Thursday, July 30, 2009 12:18 To: Barak, Ron Cc: 'Dave Angel'; 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Hi Dave, Your solution sort of defeats my int

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
ious answer, I just cannot figure it out). Bye, Ron. > -Original Message- > From: Dave Angel [mailto:da...@dejaviewphoto.com] > Sent: Thursday, July 30, 2009 16:03 > To: Barak, Ron > Cc: 'Dave Angel'; 'python-list@python.org' > Subject: RE: Run pyc f

RE: Run pyc file without specifying python path ?

2009-07-31 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@dejaviewphoto.com] > Sent: Thursday, July 30, 2009 16:03 > To: Barak, Ron > Cc: 'Dave Angel'; 'python-list@python.org' > Subject: RE: Run pyc file without specifying python path ? > >

RE: Run pyc file without specifying python path ?

2009-08-02 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@dejaviewphoto.com] > Sent: Thursday, July 30, 2009 20:08 > To: Barak, Ron > Cc: 'python-list@python.org' > Subject: Re: Run pyc file without specifying python path ? > > Barak, Ron wrote: > > Hi

Re: help a newbie with a IDE/book combination

2006-07-12 Thread Ron Rogers Jr.
probably a way to do that from within vim or emacs) As some suggested, as a beginner you don't need much of a super powered IDE. If I wasn't using IDLE, I'd be using vim or gvim. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: first book about python

2006-07-12 Thread Ron Rogers Jr.
e Python tutorials: I've got the Python version of How to Think Like a Computer Scientist: http://www.ibiblio.org/obp/thinkCSpy/ And Dive into Python (available online as well as paper): http://diveintopython.org/ Hope this helps. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-28 Thread Ron Rogers Jr.
for a listing of books That sort of thing. The python.org site's been useful to me, pointing me to interesting software, documentation and whatnot. Though I didn't know about IDLE until I saw it mentioned in a post on Slashdot in a story asking for recommendations for Python IDE's. I am "very" new to Python. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: problems with documentation

2006-01-28 Thread Ron Rogers Jr.
e os module. > > rpd > The TOPICS seem to be case sensitve so help> assertion would not work, but help> ASSERTION will. Just figured this out myself, yesterday. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Needing a WinXP Python variant of a line of code

2006-01-30 Thread Ron Rogers Jr.
I have this line of code that's written with Linux in mind: path_to_nethack_logfile = os.popen("locate logfile | grep nethackdir").read() and I'm wanting a Windows equivalent, any suestions? Thanks. CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Needing a WinXP Python variant of a line of code

2006-01-30 Thread Ron Rogers Jr.
Tim Golden wrote: > [Ron Rogers Jr.] > > | I have this line of code that's written with Linux in mind: > | > | path_to_nethack_logfile = os.popen("locate logfile | grep > | nethackdir").read() > | > | and I'm wanting a Windows equivalent, any suggg

Re: Needing a WinXP Python variant of a line of code

2006-01-30 Thread Ron Rogers Jr.
gt; path_to_nethack_logfile = os.path.join(root, logs[0]) > exit > Thank you. I guess I should do more reading, since I hadn't read about os.walk yet. I shouldn't even be trying to do what I'm doing so early in my learning. It will eventually be

Re: Learning Python

2006-02-06 Thread Ron Rogers Jr.
might not be in your menus though, on my box it's at: python2.4 /usr/local/lib/python2.4/idlelib/idle.py CronoCloud (Ron Rogers Jr.) -- http://mail.python.org/mailman/listinfo/python-list

Initializing GHC from Python

2008-12-27 Thread Ron de Bruijn
Hi, We have just published a small article on how one can initialize GHC from Python, with only optional use of C. You can read it at http://gamr7.com/blog/?p=65 . Best regards, Ron de Bruijn -- http://mail.python.org/mailman/listinfo/python-list

Problem

2020-09-29 Thread Ron Villarreal via Python-list
Tried to open Python 3.8. I have Windows 10. Icon won’t open. -- https://mail.python.org/mailman/listinfo/python-list

<    3   4   5   6   7   8