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

modify python code as newbie

2020-01-17 Thread ron . eggler
Hi, I'm semi new to Python but need to modify a program that calls the mqtt_client.publish() function from aws iot. Now, when the publish function fails, it raises an exception. I need to change the code so that when an exception is raised, instead of giving up, it should retry (indefinitely)

Modify Python code as newbie

2020-01-17 Thread ron . eggler
Hi, I'm semi new to Python but need to modify a program that calls the mqtt_client.publish() function from aws iot. Now, if the publish function fails, it raises an exception. I need to change the code so that when an exception is raised, instead of giving up, it should retry. Here's some sem

Re: (side-)effects and ...

2015-07-05 Thread Ron Adam
expressions? Variables that are changed from an outside environment are "Volatile". https://en.wikipedia.org/wiki/Volatile_%28computer_programming%29 It isn't used in python, though I think maybe it should be. Cheers, Ron -- https://mail.python.org/mailman/listinfo/python-list

Re: Lawful != Mutable (was Can Python function return multiple data?)

2015-06-21 Thread Ron Adam
mutated would be a good initial step. Have it turned off by default. I think it will be needed to test how any of the above is working. It may also allow some multiprocessing just by avoiding raising any MutatedObject exceptions. Cheers, Ron -- https://mail.python.org/mailman/listinfo/python-list

Re: Set a flag on the function or a global?

2015-06-16 Thread Ron Adam
On 06/16/2015 05:15 AM, Steven D'Aprano wrote: On Tuesday 16 June 2015 10:24, Ron Adam wrote: >Another way is to make it an object with a __call__ method. > >The the attribute can be accessed from both outside and inside dependably. That's what functions are, objects wit

Re: Set a flag on the function or a global?

2015-06-15 Thread Ron Adam
his is interactive, I'd advise going for the absolute simplest, which this would be. Go for the function attribute IMO. Another way is to make it an object with a __call__ method. The the attribute can be accessed from both outside and inside dependably. Cheers, Ron -- https://mail.python.org/mailman/listinfo/python-list

Re: Rule of order for dot operators?

2015-05-19 Thread Ron Adam
On 05/19/2015 02:25 AM, Chris Angelico wrote: On Tue, May 19, 2015 at 12:43 PM, Ron Adam wrote: >Having just implementing something similar for nested scopes, it turns out >it can't be operators because if it was, then the names y and z would be >resolved in the wrong scope.

Re: Rule of order for dot operators?

2015-05-18 Thread Ron Adam
z is resolved in y's scope. Which is why you can implement objects with closures, but you need to delay name resolution to do that. Which is what the "." does. Pythons attribute lookup is a bit more complex than this of course. https://docs.python.org/3.4/howto/descriptor.h

An experiment with blocks of object code and other meta ideas.

2015-04-27 Thread Ron Adam
ome form. Possibly as a script language that can be used in projects. There is lots of opportunities to make improvements and additions as there are zero users currently. It's still very early in it's development, so don't expect too much at this time. Cheers, Ron -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ron Adam
needed is already in a text editor. The token file format becomes the bridge that spans the gap between the user/editor and the compiler/interpreter. Then your compiler/interpreter is all implementation details that work on a single standardised token file format rather than unforma

Re: Great Math Mystery

2015-04-17 Thread Ron Adam
by people in safe conditions. Percentage of incorrect judgements of people in dangerous conditions. Percentage of incorrect judgements of people in safe, but perceived dangerousness conditions.. etc... Would be possible to calculate a norm or average from that kind of info? It

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Ron Adam
anguage designers preference at that time. But still, I think the whole braces are good/evil is over stated. There are lots of more important things in languages to consider. Cheers, Ron -- https://mail.python.org/mailman/listinfo/python-list

Re: logger doesn't roll over

2012-11-21 Thread Ron Eggler
Hooops sh*t! I outsmarted myself I guess... :o However, Thanks for the kick GC! Ron Eggler 1804 - 1122 Gilford St. Vancouver, BC V6G 2P5 (778) 230-9442 On 12-11-21 11:41 AM, Gary Chambers wrote: Ron, LOGFILE, maxBytes=(1048576*10), backupCount=5 What am I doing wrong here, I don't g

Re: serial module

2012-05-22 Thread Ron Eggler
Grant Edwards wrote: > On 2012-05-19, Paul Simon wrote: >> "Ron Eggler" wrote: > >>> [...] my code looks like this: > >>> #!/usr/bin/python > [...] >>>port='/dev/ttyUSB0', > >> Sounds like you may be using t

serial module

2012-05-18 Thread Ron Eggler
onnections (the parameters differs on the device # you are connecting to) ser = serial.Serial( port='/dev/ttyUSB0', baudrate=19200, parity=serial.PARITY_ODD, stopbits=serial.STOPBITS_TWO, bytesize=serial.SEVENBITS ) ser.open() Why do I get this error? Thank

Re: LinuxJournal Readers' Choice Awards 2011 Best {Programming, Scripting} Language

2011-12-05 Thread Ron
Hello Wesley, Thanks for the interesting news from Linux Journal. Now, enquring minds want to know, when will there be a Core Python 3? Ron :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Django ported to Python3!

2011-12-03 Thread Ron
s Python 3. And many Python folks will finally start to take Python 3 seriously only when Django does announce official support. Ron -- http://mail.python.org/mailman/listinfo/python-list

Django ported to Python3!

2011-12-02 Thread Ron
It looks like Vinay Sajip has succeeded in porting Django to Python3 (in a shared code base for Python 3.2 and Python 2.7). This is an astoundingly good job, done very fast and is big news. See https://groups.google.com/forum/#!topic/django-developers/XjrX3FIPT-U and the actual code is at Bitbucket

Re: Python without a tty

2011-09-29 Thread ron
On Sep 29, 5:21 am, Steven D'Aprano wrote: > I have a Python script which I would like to test without a tty attached > to the process. I could run it as a cron job, but is there an easier way? > > I am running Linux. > > -- > Steven Have you tried GNU Screen? It let's you run processes under vi

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-13 Thread ron
On Sep 12, 4:49 am, Steven D'Aprano wrote: > On Mon, 12 Sep 2011 06:43 pm Stefan Behnel wrote: > > > I'm not sure what you are trying to say with the above code, but if it's > > the code that fails for you with the exception you posted, I would guess > > that the problem is in the "[more stuff her

Re: Segmentation Fault on exit

2011-08-10 Thread ron
On Aug 6, 6:35 am, Vipul Raheja wrote: > Hi, > > I have wrapped a library from C++ to Python using SWIG. But when I > import it in Python, I am able to work fine with it, but it gives a > segmentation fault while exiting. Following is the log: > > vipul@vipul-laptop:~/ossim-svn/src/pyossim/swig$ p

Re: What's in a name?

2011-08-09 Thread Ron
On Aug 1, 10:11 am, Andrew Berg wrote: > Hmm > How about Rainbow Video Encoder Wrapper (Rainbow View for short - RView > is taken, possibly multiple times)? > I added an arbitrary word to a generic name, and the result doesn't seem > to be taken by anything software-related. It wraps more than

Re: learnpython.org - an online interactive Python tutorial

2011-04-20 Thread Ron
Thanks! :) -- http://mail.python.org/mailman/listinfo/python-list

learnpython.org - an online interactive Python tutorial

2011-04-20 Thread Ron
Hey everyone. I've written an online interactive Python tutorial atop Google App Engine: http://www.learnpython.org. All you need to do is log in using your Google account and edit the wiki to add your tutorials. Read more on the website. Thanks for your help, and I would appreciate if you he

pyOpenGL Error unable to detect undefined names

2010-12-02 Thread Ron
OpenGL_accelerate.numpy_formathandler (src\numpy_formathandler.c:3543) ValueError: numpy.dtype does not appear to be the correct type object The code is very simple all I have is two import statements: from OpenGL.GLU import * from OpenGL.GL import * The code analysis says that it is "unable to dete

Podcast about Python's versions and implementations

2010-08-17 Thread Ron
New podcast up is a look at the various versions and implementations of Python, including Python 3, Python 2, PyPy, IronPython, Jython, Stackless, Psycho, Shedskin, Cython, Unladen Swallow, Berp, etc. http://www.awaretek.com/python/ Ron -- http://mail.python.org/mailman/listinfo/python-list

scrapelib for web scraping

2010-08-17 Thread Ron
Shameless plug for a web scraping tool my son is involved in creating, called scrapelib. He is on leave from university and is a consultant for the Sunlight Foundation creating something called the Fifty States Project to monitor lobbyist money to state governments in the USA. http://github.com/mi

Python for MultiTouch!

2010-08-17 Thread Ron
Along with the news of Unbuntu supporting multitouch, I saw this and just had to share, I think its really nice: PyMT http://the-space-station.com/2010/8/16/python-multitouch:-pymt-0-5-released -- http://mail.python.org/mailman/listinfo/python-list

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

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

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: 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

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

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

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

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

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

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

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-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-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

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: 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

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-26 Thread Ron
On Jan 26, 10:59 am, CM wrote: > On Jan 24, 10:18 pm, Ron wrote: > > > Sikuli is the coolest Python project I have ever seen in my ten year > > hobbyist career. An MIT open source project, Sikuli uses Python to > > automate GUI tasks (in any GUI or GUI based app that run

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Ron
OK, here's an idea. I used to do screen scraping scripts and run them as CGI scripts with an HTMl user interface. Why not run Sikuli on Jython on a JVM running on my server, so that I can do my screen scraping with Sikuli? I can take user inputs by using CGI forms from a web client, process the req

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Ron
non-deterministic. I am in the analog engineering world and simple, deterministic black and white situations are all fine and useful, but I can see this very easy to use and simple technology being useful also ;-)) All of the above apps are but a few lines of code. Ron -- http://mail.python.org

Sikuli: the coolest Python project I have yet seen...

2010-01-24 Thread Ron
Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI elements into Python scripts as function arguments. Download at h

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

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

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: 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:

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: 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: 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

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

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

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

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: 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-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-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-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, >

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: 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,

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: Yet another unicode WTF

2009-06-04 Thread Ron Garret
In article , Lawrence D'Oliveiro wrote: > In message , Ron > Garret wrote: > > > Python 2.6.2 on OS X 10.5.7: > > Same result, Python 2.6.1-3 on Debian Unstable. My $LANG is en_NZ.UTF-8. > > > ... I always thought one of the fundamental > > invaria

Yet another unicode WTF

2009-06-04 Thread Ron Garret
Python 2.6.2 on OS X 10.5.7: [...@mickey:~]$ echo $LANG en_US.UTF-8 [...@mickey:~]$ cat frob.py #!/usr/bin/env python print u'\u03BB' [...@mickey:~]$ ./frob.py ª [...@mickey:~]$ ./frob.py > foo Traceback (most recent call last): File "./frob.py", line 2, in print u'\u03BB' UnicodeEncodeE

distutils extension configuration problem

2009-05-26 Thread Ron Garret
I'm trying to build PyObjC on an Intel Mac running OS X 10.5.7. The build is breaking because distutils seems to want to build extension modules as universal binaries, but some of the libraries it depends on are built for intel-only, i.e.: [...@mickey:~/Desktop/pyobjc-framework-ScreenSaver-2.2

RE: A fast way to read last line of gzip archive ?

2009-05-26 Thread Barak, Ron
Hi David, Thanks for the below solutions: most illuminating. I implemented your previous message suggestions, and already the processing time (on my datasets) is within acceptable human times. I'll try your suggestion below. Thanks again. Ron. > -Original Message- > From:

How to pickle a 'PySwigObject' ?

2009-05-25 Thread Barak, Ron
l(None, -1),2) Any ideas what could be changed to let me pickle the class ? Thanks, Ron. $ cat -n pickle_test.py 1 #!/usr/bin/env python 2 3 #import pickle 4 import cPickle as pickle 5 import wx 6 7 class ListControl(wx.Frame): 8 9 def

RE: A fast way to read last line of gzip archive ?

2009-05-24 Thread Barak, Ron
acceptable to (human) users. Bye, Ron. > -Original Message- > From: David Bolen [mailto:db3l@gmail.com] > Sent: Monday, May 25, 2009 01:58 > To: python-list@python.org > Subject: Re: A fast way to read last line of gzip archive ? > > "Barak, Ron" wr

RE: A fast way to read last line of gzip archive ?

2009-05-24 Thread Barak, Ron
> -Original Message- > From: garabik-news-2005...@kassiopeia.juls.savba.sk > [mailto:garabik-news-2005...@kassiopeia.juls.savba.sk] > Sent: Sunday, May 24, 2009 13:37 > To: python-list@python.org > Subject: Re: A fast way to read last line of gzip archive ? >

RE: wxpython and zoom/pan image

2009-05-24 Thread Barak, Ron
ouble-left-click) and create functions/class-instances that would perform the needed actions. I'd suggest reading "wxPython in Action" (ISBN 1-932394-62-1) as it would give you most of the answers you seek. Bye, Ron. > -Original Message- > From: rzzzwil...

RE: A fast way to read last line of gzip archive ?

2009-05-23 Thread Barak, Ron
> -Original Message- > From: MRAB [mailto:goo...@mrabarnett.plus.com] > Sent: Thursday, May 21, 2009 19:02 > To: 'python-list@python.org' > Subject: Re: A fast way to read last line of gzip archive ? > > Barak, Ron wrote: > > Hi, > >

A fast way to read last line of gzip archive ?

2009-05-21 Thread Barak, Ron
Hi, I need to read the end of a 20 MB gzip archives (To extract the date from the last line of a a gzipped log file). The solution I have below takes noticeable time to reach the end of the gzip archive. Does anyone have a faster solution to read the last line of a gzip archive ? Thanks, Ron

How to Spawn a process with P_NOWAIT and pass it some data ?

2009-05-20 Thread Barak, Ron
' Can anyone suggest what is the correct way to implement P_NOWAIT and still be able to communicate with the child process ? (Or, is there a way to create a subprocess.Popen object from what I assume is the process handle integer ?) Thanks, Ron. The numbering of the scripts' lines:

RE: get text from rogramms runn by subprocess.Popen immediatetly

2009-04-16 Thread Barak, Ron
Maybe try: p = Popen('./iodummy',stdin=PIPE, stdout=PIPE, stderr=PIPE).p (see "18.1.3.4. Replacing the os.spawn family" in http://docs.python.org/library/subprocess.html) Bye, Ron. > -Original Message- > From: Rüdiger Ranft [mailto:_r...@web.de] > Sent

Solved: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
Paste 6 7 class ListControl(wx.Frame, CopyAndPaste.CopyAndPaste): I'm getting no more Metaclass conflict TypeError exceptions :-) (a clear case of "The Devil Is In The ...") Thanks so much, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
ction towards a solution. Bye, Ron. $ cat -n metaclass_test01.py 1 #!/usr/bin/env python 2 3 import sys 4 import wx 5 import CopyAndPaste 6 7 #class ListControl(wx.Frame, CopyAndPaste): 8 class ListControl(wx.Frame):

RE: Is there a way to ask a class what its metaclasses are ?

2009-02-23 Thread Barak, Ron
> -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Sunday, February 22, 2009 22:12 > To: Barak, Ron > Cc: python-list@python.org > Subject: Re: Is there a way to ask a class what its metaclasses are ? >

RE: can error messages be improved or can they be overridden ?

2009-02-22 Thread Barak, Ron
Hi Stef, You can do something like (not tested): try: self.Brick.Par [ self.EP[2] ]['FileName'] = filename except IndexError,e: msg = "%s: '%s %s %s %d" % (e.strerror,e.filename,self.EP,self.EP[2],len(self.Brick.Par)) print msg

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
e a (non-strict) subclass of the metaclasses of all its bases So, obviously the line in blue is not to Python's liking. Bye, Ron. > -Original Message- > From: Hrvoje Niksic [mailto:hnik...@xemacs.org] > Sent: Sunday, February 22, 2009 14:05 > To: python-list@python.org &g

How to inherit from two classes without metaclass clashing ?

2009-02-22 Thread Barak, Ron
e) capabilities to this ListControl class. I changed the header of this class to be: class ListControl(wx.Frame, CopyAndPaste): But, the addition of CopyAndPaste to the class parents got me into this quagmire of metaclasses. Bye, Ron. > -Original Message- > From: Michele Simi

Is there a way to ask a class what its metaclasses are ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Sunday, February 22, 2009 13:57 > To: Barak, Ron > Cc: python-list@python.org > Subject: Re: "metaclass conflict" error: where is noconf

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: Chris Rebert [mailto:c...@rebertia.com] > Sent: Sunday, February 22, 2009 11:48 > To: Barak, Ron > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: "metaclass conflict" error: where is noco

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Thursday, February 19, 2009 22:58 > To: Barak, Ron > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: "metaclass

Re: What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
In article <499f397c.7030...@v.loewis.de>, "Martin v. Löwis" wrote: > > Yes, I know that. But every concrete representation of a unicode string > > has to have an encoding associated with it, including unicode strings > > produced by the Python parser when it parses the ascii string "u'\xb5'"

Re: What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
In article <499f3a8f.9010...@v.loewis.de>, "Martin v. Löwis" wrote: > > u'\xb5' > >> u'\xb5' > > print u'\xb5' > >> ? > > > > Unicode literals are *in the source file*, which can only have one > > encoding (for a given source file). > > > >> (That last character shows up as a micron si

Re: What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
In article <499f18bd$0$31879$9b4e6...@newsspool3.arcor-online.net>, Stefan Behnel wrote: > Ron Garret wrote: > > I would have thought that the answer would be: the default encoding > > (duh!) But empirically this appears not to be the case: > > > >>&g

Re: To unicode or not to unicode

2009-02-20 Thread Ron Garret
In article <499f0cf0.8070...@v.loewis.de>, "Martin v. Löwis" wrote: > MRAB wrote: > > Thorsten Kampe wrote: > >> * Ron Garret (Thu, 19 Feb 2009 18:57:13 -0800) > >>> I'm writing a little wiki that I call µWiki. That's a lowercase >

What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
I would have thought that the answer would be: the default encoding (duh!) But empirically this appears not to be the case: >>> unicode('\xb5') Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position 0: ordinal not in range(

Re: To unicode or not to unicode

2009-02-20 Thread Ron Garret
In article , MRAB wrote: > Thorsten Kampe wrote: > > * Ron Garret (Thu, 19 Feb 2009 18:57:13 -0800) > >> I'm writing a little wiki that I call µWiki. That's a lowercase Greek > >> mu at the beginning (it's pronounced micro-wiki). > > &g

To unicode or not to unicode

2009-02-19 Thread Ron Garret
I'm writing a little wiki that I call µWiki. That's a lowercase Greek mu at the beginning (it's pronounced micro-wiki). It's working, except that I can't actually enter the name of the wiki into the wiki itself because the default unicode encoding on my Python installation is "ascii". So I'm

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , Albert Hopkins wrote: > On Thu, 2009-02-19 at 10:55 -0800, Ron Garret wrote: > > I'm trying to split a CamelCase string into its constituent components. > > This kind of works: > > > > >>> re.split('[a-z][A-Z]', 'fooBar

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , "andrew cooke" wrote: > i wonder what fraction of people posting with "bug?" in their titles here > actually find bugs? IMHO it ought to be an invariant that len(r.split(s)) should always be one more than len(r.findall(s)). > anyway, how about: > > re.findall('[A-Z]?[a-z]*', 'fo

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , Peter Otten <__pete...@web.de> wrote: > Ron Garret wrote: > > > I'm trying to split a CamelCase string into its constituent components. > > How about > > >>> re.compile("[A-Za-z][a-z]*").findall("fooBarBaz") > [&#

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , MRAB wrote: > Ron Garret wrote: > > I'm trying to split a CamelCase string into its constituent components. > > This kind of works: > > > >>>> re.split('[a-z][A-Z]', 'fooBarBaz') > > ['fo', 'a&#x

Regular expression bug?

2009-02-19 Thread Ron Garret
I'm trying to split a CamelCase string into its constituent components. This kind of works: >>> re.split('[a-z][A-Z]', 'fooBarBaz') ['fo', 'a', 'az'] but it consumes the boundary characters. To fix this I tried using lookahead and lookbehind patterns instead, but it doesn't work: >>> re.spli

"metaclass conflict" error: where is noconflict ?

2009-02-19 Thread Barak, Ron
;t seem able to find where to get the noconflict module from. Do any of you where noconflict could be downloaded/installed from ? Thanks, Ron. P.S.: I use Windows XP/cygwin, Python 2.5.2, wx-2.8-msw-unicode -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   >