Re: [orca-list] Help with Accerciser iPython console
- From: Carolyn MacLeod <Carolyn_MacLeod ca ibm com>
- To: orca-list gnome org
- Subject: Re: [orca-list] Help with Accerciser iPython console
- Date: Fri, 8 Oct 2010 10:56:00 -0400
> Wow, if this is a novice question...
<grin> I guess I thought that
it must be a novice python question... basically, "How do I pass by
reference?" :)
I have never used python before, so
I figured this ought to be simple, but it doesn't appear to be.
I still haven't figured out how to do
it... perhaps I'll try to find a python mailing list.
Thanks, Steve.
Carolyn
steve holmes88 gmail com wrote on 07/10/2010
06:38:06 PM:
> Re: [orca-list] Help with Accerciser
iPython console
>
> Steve Holmes
>
> to: orca-list
>
> 07/10/2010 06:38 PM
>
> Sent by: orca-list-bounces gnome org
>
> On Thu, Oct 07, 2010 at 02:10:06PM
-0400, Carolyn MacLeod wrote:
> > Hi.
> >
> > Sorry to ask a novice Accerciser/ipython
question on this list. I did not
> > find an Accerciser mailing
list, and the IRC channel seems inactive
> > I thought perhaps a few of
you Orca folks might have experience with this
> > sort of thing.
>
> Wow, if this is a novice question,
then what does that say about me?
> <smile> I've only used
accerciser a couple times and need to get
> started back up with it. Sorry,
that stuff you asked went sailing
> right over my pea brained head
for now so will have to defer to others
> on the list. But I hope I
can learn from the exchange here. When I
> built a package for accerciser
to run on my ArchLinux system last
> year, I got the feeling that it
wasn't being updated much. Is
> accerciser still being actively
supported? The latest version I got
> was from a git repo as the prod
or stable version was much older than
> that. I sure hope it is still
being maintained if this is going to be
> the tool for us to debug a11y issues.
---------------------------------------------
> On Thu, Oct 07, 2010 at 02:10:06PM
-0400, Carolyn MacLeod wrote:
Hi.
Sorry to ask a novice Accerciser/ipython
question on this list. I did not find an Accerciser mailing list, and the
IRC channel seems inactive
I thought perhaps a few of you Orca
folks might have experience with this sort of thing.
I need to test my handling of atk_editable_text_insert_text(AtkEditableText
*text, const gchar *string, gint length, gint *position) by sending insertText
to an object that implements EditableText.
The problem is that the pesky "position"
parameter wants a pointer to an integer.
I have tried all sorts of ways to get
Accerciser's iPython console to accept the last parameter, but I always
get: "TypeError: could not marshal arg 'position'."
At first, I tried just passing in an
integer variable (hoping it was "by reference"), then I tried
passing in a pointer to the variable using the id() function, then I tried
creating a single-value integer array and passing that in... no luck. I
also tried using the array() function, but apparently Accerciser's iPython
does not support that. I also tried various combinations of C-like syntax,
such as &pos and *pos, but the parser didn't like those either.
Has anyone ever tried to do this? If
so, how did you do it?
Here's a sample of the things I tried,
fyi:
In [1]: t=acc.queryEditableText()
In [2]: t.getText(0,45)
Out[2]: 'The quick brown fox jumps over
the lazy dog.\n'
In [3]: t.deleteText(10,15)
Out[3]: True
In [4]: t.getText(0,40)
Out[4]: 'The quick fox jumps over
the lazy dog.\n'
In [5]: pos=10
In [6]: t.insertText("brown",5,pos)
---------------------------------------------------------------------------
TypeError
Traceback (most recent call last)
/usr/lib/python2.6/dist-packages/pyatspi/__init__.pyc
in <module>()
----> 1
2
3
4
5
/usr/lib/python2.6/dist-packages/pyatspi/accessible.pyc
in _inner(self, *args, **kwargs)
230 try:
231
# try calling the original func
--> 232 return
func(self, *args, **kwargs)
233 except
ORBit.CORBA.NO_IMPLEMENT, e:
234
# raise Python exception
TypeError: could not marshal arg 'position'
In [7]: t.insertText("brown",5,id(pos))
---------------------------------------------------------------------------
TypeError
Traceback (most recent call last)
/usr/lib/python2.6/dist-packages/pyatspi/__init__.pyc
in <module>()
----> 1
2
3
4
5
/usr/lib/python2.6/dist-packages/pyatspi/accessible.pyc
in _inner(self, *args, **kwargs)
230 try:
231
# try calling the original func
--> 232 return
func(self, *args, **kwargs)
233 except
ORBit.CORBA.NO_IMPLEMENT, e:
234
# raise Python exception
TypeError: could not marshal arg 'position'
In [8]: pos=[10]
In [9]: t.insertText("brown",5,pos)
---------------------------------------------------------------------------
TypeError
Traceback (most recent call last)
/usr/lib/python2.6/dist-packages/pyatspi/__init__.pyc
in <module>()
----> 1
2
3
4
5
/usr/lib/python2.6/dist-packages/pyatspi/accessible.pyc
in _inner(self, *args, **kwargs)
230 try:
231
# try calling the original func
--> 232 return
func(self, *args, **kwargs)
233 except
ORBit.CORBA.NO_IMPLEMENT, e:
234
# raise Python exception
TypeError: could not marshal arg 'position'
In [7]: pos=array([10])
---------------------------------------------------------------------------
NameError
Traceback (most recent call last)
/usr/lib/python2.6/dist-packages/pyatspi/__init__.pyc
in <module>()
----> 1
2
3
4
5
NameError: name 'array' is not defined
Thanks,
Carolyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]