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
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
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
Thanks! :)
--
http://mail.python.org/mailman/listinfo/python-list
oversight?
Anyway, where would I subit this report to have it considered that this be
added to Tix?
Thanks for your help.
Ron Provost
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm attempting to develop a plugin framework for an application that I'm
working on. I wish to develop something in which all plugins exist in a
directory tree. The framework need only be given the root of the tree. The
framework then uses os.path.walk to search all for all files nam
I've written a screen saver which opens multiple copies on windows 98.
I'm trying to check the process list to determine if it is already running.
So far all the example win32 routines I've found, through google, only
work on newer xp and nt versions of windows. This is the current attempt
to g
document_reader
# script to read and search all doc files
# and run related examples scripts.
core
tools
examples
docs
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Why doesn't this work?
>>> def foo(lst):
... class baz(object):
... def __getitem__(cls, idx): return cls.lst[idx]
... __getitem__=classmethod(__getitem__)
... baz.lst = lst
... return baz
...
>>> f = foo([1,2,3])
>>> f[0]
Traceback (most recent call last):
File "", line 1, in ?
T
Thanks for the reply Roger,
Since will put this on my web site for general use, I don't want users
to have to install additional software.
I'll try win32com.client.Dispatch('Wbemscripting.Swbemlocator') see what
that does.
As a last resort, I use a registry key as a run status varable. Not my
pl wrote:
Hi all,
I followed the mails entitled 'How to turn a variable name into a
string?' in march 2005 posts as I have a similar problem.
Use the locals() function instead of globals().
Thanks by the way, I was wondering how to do this also, your post, and
Daniel pointing out 'is', helped me w
Jeff Shannon wrote:
Are you sure that you really need that single-element list?
No I'm not sure, I thought I found a concdition where it made a
difference while playing with it, but I don't recall just what
circumstance it was?
Don't forget, in Python, all names are references. You only have to
Igorati wrote:
Hello all, I am still needing some help on this code, I have gone a bit
further on it. Thank you for the help. I am trying to understand how to
make the file searchable and how I am to make the deposit and withdrawl
interact with the transaction class.
I need to just search the file
The indentation got messed up a bit, it should look like this.
class Transaction:
def __init__(self):
self.name = ''
self.amount = 0.0
self.type = ''
class Account:
def __init__(self, name=''):
self.name = name
self.ledger = []
def newtransaction(self
On 18 Mar 2005 14:16:01 -0800, "Alia Khouri" <[EMAIL PROTECTED]>
wrote:
>This is an informal survey to gauge the community's interest in adding
>popular modules to the python standard library.
I would prefer to have a install utility included that retrieves a
list of modules we can install, updat
values)
mydict = NumDict()
n = 0
for k in list('abcdefg'):
n += 1
mydict[k] = n
print mydict
# {'a': 1, 'c': 3, 'b': 2, 'e': 5, 'd': 4, 'g': 7, 'f': 6}
mydict.count('c')
mydict['e'] = [
def appendlist(self, key, *values):
>try:
>self[key].extend(values)
>except KeyError:
>self[key] = list(values)
Why is it better than this?
dict[key]+=n
dict[key]+=list
Ron
--
http://mail.python.org/mailman/listinfo/python-list
ries that auto
defaults to a mode that doesn't behave that way is inconsistent with
the rest of the language.
Yet, I'm all for the creation of specialized containers in a standard
module! :) Then we can have string dicts, and int dicts, and card
dicts, account dicts, etc, as well as specialized lists. Call them
'smart containers'. But they should not be built into the base class.
Ron
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 20 Mar 2005 13:16:37 -0500, "George Sakkis"
<[EMAIL PROTECTED]> wrote:
>I'm sure there must have been a past thread about this topic but I don't know
>how to find it: How
>about extending the "for in" syntax so that X can include default
>arguments ? This would be very
>useful for list/
On 21 Mar 2005 08:21:40 GMT, Antoon Pardon <[EMAIL PROTECTED]>
wrote:
>Well at least I find them missing.
>
>For the moment I frequently come across the following cases.
>
>1) Two files, each with key-value pairs for the same dictionary.
>However it is an error if the second file contains a key th
he screen, convert the graphic image to text and put it on the
clipboard. They work fairly well.
Most of them aren't free. But a shareware version with a limited
trial period might work just fine for this one purpose.
Ron
--
http://mail.python.org/mailman/listinfo/python-list
padlist(xyz,3,0) for xyz in [1,2,3],[3,4],[5,6,7]]:
print x,y,z
Which isn't too different from what you are suggesting. I think
someone may have already suggested using list comprehensions.
Ron
--
http://mail.python.org/mailman/listinfo/python-list
On 21 Mar 2005 22:37:42 -0800, "Kay Schluehr" <[EMAIL PROTECTED]>
wrote:
>Mappings like that:
>
> ((x,y),z) -> x+y-z
>
> ((x,y=0),z) -> None
>
>should be valid actions too.
>
>What is the audience thinking about that?
I think that there's too much implied, and that in the long run it,
if w
quot;
>> fn( ( dfv(filterc='d'), evalstring), (exec estring) )
So we need to use a three item tuple:
safe_exec ( (*inputs) , (expressionstring) , ( *outputs) )
>> def dfv( arg = value):
return arg
>> x, y = 1, 2
>> safeexec( (x, y, dfv(z=0)),
On Tue, 22 Mar 2005 21:43:48 +0100, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
>Ron a écrit :
>(snip)
>>>>def dfv( arg = value):
>>
>> return arg
> >
> >>> def dfv( arg = value):
>... return arg
>...
>Tracebac
On Tue, 22 Mar 2005 21:56:57 GMT, Ron <[EMAIL PROTECTED]> wrote:
>Why should a function not create a local varable of an argument if the
>varable doesn't exist and a default value is given?
ok... thought it out better. :)
Getting a default into a function isn't the proble
nerator I
have for C++ and it works just fine.
Any thoughts on what I'm doing wrong in the Python Reg Ex world?
Thanks for the comments & help.
Ron
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 22 Mar 2005 18:15:25 -0500, "George Sakkis"
<[EMAIL PROTECTED]> wrote:
>"Ron" <[EMAIL PROTECTED]> wrote:
>> On Tue, 22 Mar 2005 21:56:57 GMT, Ron <[EMAIL PROTECTED]> wrote:
>>
>> >Why should a function not create a local
On Tue, 22 Mar 2005 21:45:42 +0100, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
>Ron a écrit :
>> On 21 Mar 2005 22:37:42 -0800, "Kay Schluehr" <[EMAIL PROTECTED]>
>> wrote:
>>
>>
>>>Mappings like that:
>>>
>>> ((x,
On 23 Mar 2005 10:13:16 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>Do I really need to mention that the whole concept here is broken. This
>only works if you call it from global scope. If you call it from inside a
>function it [usually] won't work:
That's only becuase it was asked to go up
On 23 Mar 2005 10:13:16 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>Do I really need to mention that the whole concept here is broken. This
>only works if you call it from global scope. If you call it from inside a
>function it [usually] won't work:
Ok... you can get globals this way if you k
On 23 Mar 2005 14:47:30 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>Kay Schluehr wrote:
>
>> A working makeVars seems not to be different from
>>
>> def makeVars(**nameVals):
>>globals().update(nameVals)
>
>Not quite. If Ron can come up w
On Wed, 23 Mar 2005 06:21:30 +0100, Kay Schluehr <[EMAIL PROTECTED]>
wrote:
>I think my proposal was more in mind of Rons modified exec than
>Pythons lambda.
>
>When George proposed his unpacking behavoir for list-comps as a pack of
>suggar:
>
>1. [x*y-z for (x,y,z=0) in (1,2,3), (4,5), (6,7,8)]
>
On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober"
<[EMAIL PROTECTED]> wrote:
>Hi! There goes a newbie trouble:
>
>for i in range(0, len(subject)):
>if subject[i] in preps:
>psubject.append(noun_syn_parser(subject[0:i]))
>subject[0:i] = []
>
>Since the last li
On Thu, 24 Mar 2005 03:42:04 GMT, Ron <[EMAIL PROTECTED]> wrote:
>On Wed, 23 Mar 2005 23:27:54 +0100, "Gabriel F. Alcober"
><[EMAIL PROTECTED]> wrote:
>
>>Hi! There goes a newbie trouble:
>>
>>for i in range(0, len(subject)):
>>
On 24 Mar 2005 09:20:52 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>Ron wrote:
>
>>>> A working makeVars seems not to be different from
>>>>
>>>> def makeVars(**nameVals):
>>>>globals().update(nameVals)
>>>
>>&g
On Thu, 24 Mar 2005 12:07:44 -0500, "George Sakkis"
<[EMAIL PROTECTED]> wrote:
>"Kay Schluehr" <[EMAIL PROTECTED]> wrote:
>> [snipped]
>>
>> Wouldn't it be fun to use in Python?
>>
>> Only drawback: does not look like executable pseudo-code anymore :(
>>
>>
>> Regards Kay
>
>I don't know if it wou
Is this built into any of the python versions? Need it! Using 2.3.5 and
doesn't seem to have it.Newbe needs help!email[EMAIL PROTECTED] Thanks Ron
--
http://mail.python.org/mailman/listinfo/python-list
Kay Schluehr wrote:
Steven Bethard wrote:
So the object of a "where" is then always an ordered dict?
Yes.
If so, then
I guess I like this proposal best so far.
However, it does seem to have the problem that you can't have any
additional local variables so, for example, list comprehensions are
pr
you are correct. :-/
I was trying to not use eval(). This could be made to work, but it will
get messy, which is another reason not to do it.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
Ron wrote:
How about using ***name in the same way as *name, and **name are used?
It extends the current argument options in a consistent manner and 'I
believe' is easy to explain and visually says something different is
happening here.
This builds on the alrea
[EMAIL PROTECTED] wrote:
Many people I know ask why Python does slicing the way it does.
Can anyone /please/ give me a good defense/justification???
I'm referring to why mystring[:4] gives me
elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element).
Many people don't like idea that 5th elemen
pple soft basic to remember what
I couldn't do. Part of the reason for the spaghetti code was that with
line numbers it's easier to tack on something to the end than it is to
change all the line numbers if you didn't allow for room. I for one,
don't miss goto's or line
Ron wrote:
[EMAIL PROTECTED] wrote:
Many people I know ask why Python does slicing the way it does.
Can anyone /please/ give me a good defense/justification???
I'm referring to why mystring[:4] gives me
elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element).
> There are ac
or decide for ourself) to give to the name "foo".
So what is the meaning of foo? In general computer discussions foo is
ever changing and represents an abstract object to be used and reused to
describe a multitude of possibilities. I would call that a variable.
;-)
Cheers,
Ron
--
http
s as well. :)
I think you will have to modify the function func in some way to get
locals when it exits.
def func():
x = 20
y = 40
func.locals = locals() # inserted line
func()
print func.locals
On a related note, I'd like to know how to import locals into a function.
Chee
Bengt Richter wrote:
I don't know what pythonw.exe does with std i/o that hasn't been intercepted,
but I would think it could be handy to have it force a console window, and maybe
have a pythonw.exe command line option to dump either or both stdout and stderr
silently. That way by default you'd see
Russell E. Owen wrote:
Can anyone recommend a fast cross-platform plotting package for 2-D
plots?
Our situation:
We are driving an instrument that outputs data at 20Hz. Control is via
an existing Tkinter application (which is being extended for this new
instrument) that runs on unix, mac and wi
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
Terry Hancock wrote:
> On Thursday 22 September 2005 12:26 pm, Ron Adam wrote:
>
>>Steve Holden wrote:
>>
>>>Ron Adam wrote:
>>>
>>>> >>> True * True
>>>>1 # Why not return True here as well?
>>>>
For complete domain details go to:
http://whois.godaddy.com
You can find out more by following the godaddy link or just go here and
enter the numbers displayed to access it.
https://www.godaddy.com/gdshop/whois.asp?se=%2B&domain=LIAGE%2Enet&ci=1718
Maybe an email to the
t;self" becomes a reference to the class
instance it is in.
self.name = name
is the same as ...
leader.name = name
But we didn't know it was going to be called "leader" when we wrote the
class. So self is a convienent place holder.
I hope this helped.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
/www.godaddy.com)
Domain Name: LIAGE.NET
Created on: 18-Mar-05
Expires on: 18-Mar-06
Last Updated on: 20-Jun-05
Administrative Contact:
Linden, James [EMAIL PROTECTED] <--- lindensys.net not found
---
The web site at tictek give the same exact under construction notice as
LIAGE.NET.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Erik Max Francis wrote:
> Ron Adam wrote:
>
>> When you call a method of an instance, Python translates it to...
>>
>> leader.set_name(leader, "John")
>
>
> It actually translates it to
>
> Person.set_name(leader, "John")
g.
Every user account would be a complete unit which can be backed up and
restored independently of the OS. If something went wrong you could
always find out which user (or application developer) was responsible.
Anyway... just wishful thinking. I'm sure there are a lot of problems
that would need to be worked out. ;-)
Cheers,
Ron Adam
--
http://mail.python.org/mailman/listinfo/python-list
)
beacon + 3
>>> del beacon
>>> dir(A)
['__doc__', '__module__', 'beacon', 'ham', 'spam']
>>> A.beacon(3)
beacon + 3
>>> dir(C)
['__doc__', '__module__', 'beacon', 'ham', 'spam']
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
_["set_name"].__get__(leader, "John")
# which results in...
#Person.set_name(leader, "John")
except:
raise( AttributeError,
"%s object has no attribute %s" \
% (leader, "set_name&
e" for more information.
>>> class a(object):
... def b(self, value):
... print value
...
>>> aa = a()
>>> def foo(value):
...print "%r" % value
...
>>> aa.b('hello')
hello
>>> aa.b = foo
>>> aa.b('hello')
'hello'
>>> del aa.b
>>> aa.b('hi there')
hi there
>>>
So the underlying mechanism for calling methods doesn't kick in until
*after* an attempt to get an attribute of the same name in the instance.
>>> a.boo = boo
>>> def boo(self, value):
...print list(value)
...
>>> a.boo = boo
>>> aa.boo('hello')
['h', 'e', 'l', 'l', 'o']
The attribute aa.boo is not there, so call boo.__get__() in class a.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Sun, 25 Sep 2005 14:52:56 +0000, Ron Adam wrote:
>
>
>>Steven D'Aprano wrote:
>>
>>
>>
>>>Or you could put the method in the class and have all instances recognise
>>>it:
>>>
>>>py> C.eg
:##
## INFO:
#
# Existing comments
# wrapped in a labeled
# block comment.
#
:##
The markup form might make it easy to read labeled comments into a
dictionary where the labels become the keys. Then special ""
definitions wouldn't be neede
Steven D'Aprano wrote:
> On Tue, 27 Sep 2005 16:42:21 +0000, Ron Adam wrote:
>
>
>>>>>>>def beacon(self, x):
>>>>
>>>>...print "beacon + %s" % x
>>>>...
>>>
>>>
>>>Did you me
Terry Reedy wrote:
> "Ron Adam" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Actually I think I'm getting more confused. At some point the function
>>is wrapped. Is it when it's assigned, referenced, or called?
>
>
&g
pr, then each succeeding 'if' divides the
sub expressions, etc... ?
So ...
A if B else C + X * Y
Would evaluate as... ?
A if B else (C + X * Y)
and...
value = X * Y + A if B else C
would be ?
value = (X * Y + A) if B else C
or ?
value = X * Y + (A if B else C)
I think I'm going to make it a habit to put parentheses around these
things just as if they were required.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Reinhold Birkenfeld wrote:
> Ron Adam
>>I think I'm going to make it a habit to put parentheses around these
>>things just as if they were required.
> Yes, that's the best way to make it readable and understandable.
>
> Reinhold
Now that the syntax is settl
, it is lost. To keep it around you want to assign it to self.y.
class Xyz(object): # create an class to create an object instance.
def y(self)
self.q = 2
xyz = Xyz()
xyz.y()
print xyz.q # prints 2
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Ron Adam wrote:
> Also,
>
> In your example 'q' is assigned the value 2, but as soon as the method
> 'y' exits, it is lost. To keep it around you want to assign it to self.y.
Ooops, That should say ...
"To keep it around you want to assign it
ost cases where critical code is used you really want value testing
not type checking. This is where self validating objects are useful and
there is nothing preventing anyone from using them in Python.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
r to other name spaces, so it could slow
everything down.
And there would probably be ways to unlock objects. But maybe that's
not a problem as I think what you want to prevent is erroneous results
due to unintentional name changes or object changes.
I think both of these would have unexpected side effects in many cases,
so their use would be limited.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> Op 2005-10-04, Ron Adam schreef <[EMAIL PROTECTED]>:
>
>>Antoon Pardon wrote:
>>
>>>Op 2005-10-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>:
>>>
>>>>And lo, one multi-billion dollar Mars lander starts braki
Bengt Richter wrote:
> On Wed, 05 Oct 2005 11:10:58 GMT, Ron Adam <[EMAIL PROTECTED]> wrote:
>>Looking at it from a different direction, how about adding a keyword to
>>say, "from this point on, in this local name space, disallow new
>>names". Then you can
Fredrik Lundh wrote:
> Ron Adam wrote:
>
>
>>Is there a way to conditionally decorate? For example if __debug__ is
>>True, but not if it's False? I think I've asked this question before. (?)
>
>
> the decorator is a callable, so you can simpl
mething similar with using py2exe. I think it occurs
when there are more than one file with the same name in different
locations in the search path. Try renaming cx_Oracle to _cx_Oracle then
import as...
import _cx_Oracle as cx_Oracle
Of course your problem might be entirely different. But this might help.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
bly list table. """
return [x[4] for x in dislist if type(x[4]) is str]
Another benefit, is to be able to get the results without having to
redirect, capture, and then reset sys.stdout.
But I still need to rewrite disassemble_string() and need to test it
with tracebacks.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
to handle when a list has too few items in it.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Ron Adam wrote:
>
> Can anyone show me an example of of using dis() with a traceback?
>
> Examples of using disassemble_string() and distb() separately if
> possible would be nice also.
[cliped]
> But I still need to rewrite disassemble_string() and need to test it
rgs)
... the function 'fn' does here. So they remain local bindings to
objects in the scope they were first referenced from even after the
function is returned. In effect, 'cache' and 'fn' are replaced by the
objects they reference before the cached_result function is returned.
Is this correct?
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Ron Adam wrote:
>
>
>>In effect, 'cache' and 'fn' are replaced by the objects they reference
>>before the cached_result function is returned.
>
>
> not really; accesses to "free variables" always go via specia
our indicator pair till you find the
try-except that is giving you the errror. Once you find the try-except
pair that has intercepted the error, you can insert a bare raise right
after the except and see the actual python error is. That should give
you a better idea of what's going on.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
rence material just to figure out
where to start.
If I was forced to go back to MS C++ again, I think I would take up
painting instead of programing as my main hobby.
;-)
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
n about
the actual error in this case.
[(, 'gen.py', 17, '?', ["a =
15+'c'\n"], 0)]
try:
suspect code block
a = 15+'c'
print 'hello'
for x in range(10):
Traceback (most recent call last):
File "gen.py", line 26, in ?
raise "your error"
Error: your error
Hope this helps,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Is this a bug or a feature?
class mydict(dict):
def __setitem__(self, key, val):
print 'foo'
dict.__setitem__(self, key, val)
>>> d=mydict()
>>> d[1]=2
foo
>>> d.setdefault(2,3)
3
rg
--
http://mail.python.org/mailman/listinfo/python-list
r and food. Additionally, if you're looking for a job as a
Python developer, bring your resume.
Please RSVP at http://rsvp.nylug.org to attend, as seating is limited.
- Ron
(announcement follows)
The New York Linux User's Group Presents
George Sakkis wrote:
>
>
> What date is it ? It isn't mentioned at the web site either.
>
Sorry about that, actually it is on the web site, right at the top in
the blue band.
October 26, 2005 6:00pm - 10:00pm
Hope to see you there.
- Ron
--
http://mail.python.org/mailma
1 - 100 of 772 matches
Mail list logo