self.txt = wx.TextCtrl(panel1, id=wx.ID_ANY)
self.txt.
When entering the "." after txt on the second line I like to see
variables, methods for wx.TextCtrl.
I have not enabled something or ...?
Werner
Werner
P.S.
Thanks also for the explanation on the Ctrl-f context menu option for
Find All - just great!!!!
Here is a different script which gives me problems with AutoCompletion.
I see this in the log window:
[15:48:20][pycomp][err] local exec name 'proportion' is not defined
[flag = wx.EXPAND , proportion]
Do you see the same error if you try to do a completion for e.g.
"wx.RED" just after the import statement for wx?
Werner
Werner
On Fri, Jul 15, 2011 at 8:55 AM, werner <wbr...@free.fr> wrote:
> On 07/15/2011 03:50 PM, werner wrote:
>>
>> Hi Cody,
>>
>> Here is a different script which gives me problems with AutoCompletion.
>>
>> I see this in the log window:
>> [15:48:20][pycomp][err] local exec name 'proportion' is not defined [flag
>> = wx.EXPAND , proportion]
>>
I see this as well. I think that the parser is failing for some reason
when it hits the 'wx.' in the parens of the method call, but it is not
so important as we don't need to provided completions for the
'proportion' object as its scope is only valid within the parens.
>> Do you see the same error if you try to do a completion for e.g. "wx.RED"
>> just after the import statement for wx?
>
Shows up just fine on my system (wx 2.8.12 / py2.7 / windows xp SP3)
> If I switch flag and proportion around then the error goes away but "wx.RED"
> is still not found by the completion.
>
Can you go into 'src/autocomp/pycomp.py' and in the 'evalsource'
method at around line 195 there is a block of commented out text. If
you uncomment that text and then start Editra and repeat the action
where the completion failed it will dump the generated source code to
a file that can be used to try and analyze the problem on your system.
Cody
On 07/15/2011 06:37 PM, Cody Precord wrote:
>> If I switch flag and proportion around then the error goes away but "wx.RED"
>> is still not found by the completion.
>>
> Can you go into 'src/autocomp/pycomp.py' and in the 'evalsource'
> method at around line 195 there is a block of commented out text. If
> you uncomment that text and then start Editra and repeat the action
> where the completion failed it will dump the generated source code to
> a file that can be used to try and analyze the problem on your system.
>
Tests are on Ubuntu 10.10, Python 2.6.6 and wxPython 2.8.12.0
Did this but no file seems to get generated. The log output I get:
[11:18:18][pycomp][info] parseassignment: app = wx.PySimpleApp
[11:18:18][pycomp][info] parseassignment: f = wx.Frame
[11:18:18][pycomp][info] parseassignment: ps = wx.ScrolledWindow
[11:18:18][pycomp][info] parseassignment: ps.Sizer = wx.BoxSizer
[11:18:18][pycomp][info] parseassignment: ps.MinSize = 300
[11:18:18][pycomp][info] parseassignment: sz = wx.BoxSizer
[11:18:18][pycomp][info] parseassignment: proportion = 1
[11:18:18][pycomp][info] parseassignment: flag = wx.EXPAND
[11:18:18][pycomp][info] parseassignment: p = wx.Window
[11:18:18][pycomp][info] parseassignment: flag = wx.GROW
[11:18:18][pycomp][info] parseassignment: pin = wx.Panel
[11:18:18][pycomp][info] parseassignment: orient = wx.VERTICAL
[11:18:18][pycomp][info] parseassignment: proportion = 1
[11:18:18][pycomp][info] parseassignment: flag = wx.EXPAND
[11:18:18][pycomp][info] Generated source: """"""
[11:18:18][pycomp][info]try:
[11:18:18][pycomp][info] import wx
[11:18:18][pycomp][info]except ImportError:
[11:18:18][pycomp][info] pass
[11:18:18][pycomp][info]class _PyCmplNoType:
[11:18:18][pycomp][info] def __getattr__(self,name):
[11:18:18][pycomp][info] return None
[11:18:18][pycomp][info]app = wx.PySimpleApp
[11:18:18][pycomp][info]f = wx.Frame
[11:18:18][pycomp][info]ps = wx.ScrolledWindow
[11:18:18][pycomp][info]sz = wx.BoxSizer
[11:18:18][pycomp][info]def add(w,red):
[11:18:18][pycomp][info] pass
[11:18:18][pycomp][info]pin = wx.Panel
[11:18:18][pycomp][info]orient = wx.VERTICAL
[11:18:18][pycomp][info]proportion = 1
[11:18:18][pycomp][info]flag = wx.EXPAND
[11:18:18][pycomp][info] Successfully executed source code
[11:18:18][pycomp][info] Successfully executed: import wx
[11:18:18][pycomp][info] Successfully executed: app = wx.PySimpleApp
[11:18:18][pycomp][info] Successfully executed: f = wx.Frame
[11:18:18][pycomp][info] Successfully executed: ps = wx.ScrolledWindow
[11:18:18][pycomp][info] Successfully executed: sz = wx.BoxSizer
[11:18:18][pycomp][info] Successfully executed: pin = wx.Panel
[11:18:18][pycomp][info] Successfully executed: orient = wx.VERTICAL
[11:18:18][pycomp][info] Successfully executed: proportion = 1
[11:18:18][pycomp][info] Successfully executed: flag = wx.EXPAND
[11:18:18][pycomp][info] Completion eval time: 0.037756
[11:18:18][pycomp][info] get_completions('wx.','')
[11:18:18][pycomp][info] completing: stmt:wx
[11:18:18][codebrowser][info] Syncing tree for position 4
[11:18:19][codebrowser][info] Syncing tree for position 4
[11:18:26][codebrowser][info] Syncing tree for position 4
[11:18:26][codebrowser][info] Syncing tree for position 4
[11:18:26][codebrowser][info] Syncing tree for position 4
[11:19:19][ed_pages][evt] Control Changing from Page: 0 to Page: 1
[11:19:19][ed_pages][evt] Control Changing from Page: 0 to Page: 1
[11:19:19][Launch][info] Found commands [u'pylint', u'pylinterr', u'python']
[11:19:19][ed_pages][evt] Page Changed to 1
[11:19:19][ed_editv][info] Tab has file:
/home/wbruhin/devTools/Editra/src/autocomp/pycomp.py
[11:19:20][codebrowser][info] Syncing tree for position 198
[11:19:20][codebrowser][info] Syncing tree for position 198
Doing it on my VirtualBox Win7 install I see this:
[11:50:15][pycomp][err] _GetCompletionInfo: <type 'exceptions.IOError'>,
[Errno 13] Permission denied: 'pycompout.py'
And if I run as admin I see:
[11:52:19][pycomp][info] Generated source: """"""
All this is with latest SVN copy of Editra (i.e. 68295)
Werner
On Sun, Jul 17, 2011 at 4:54 AM, werner <wbr...@free.fr> wrote:
> Cody,
>
> On 07/15/2011 06:37 PM, Cody Precord wrote:
>
>>> If I switch flag and proportion around then the error goes away but
>>> "wx.RED"
>>> is still not found by the completion.
>>>
>> Can you go into 'src/autocomp/pycomp.py' and in the 'evalsource'
>> method at around line 195 there is a block of commented out text. If
>> you uncomment that text and then start Editra and repeat the action
>> where the completion failed it will dump the generated source code to
>> a file that can be used to try and analyze the problem on your system.
>>
> Tests are on Ubuntu 10.10, Python 2.6.6 and wxPython 2.8.12.0
>
> Did this but no file seems to get generated. The log output I get:
>
see below
>
> Doing it on my VirtualBox Win7 install I see this:
>
> [11:50:15][pycomp][err] _GetCompletionInfo: <type 'exceptions.IOError'>,
> [Errno 13] Permission denied: 'pycompout.py'
You may need to modify the code you uncommented as it just does
'open('pycompout.py')' which will write to the same directory as the
pycomp file. As the error shows you don't have write permissions in
that directory it would seem. So you can just change the path to write
to your desktop or somewhere that you do.
Cody
On 07/17/2011 08:46 PM, Cody Precord wrote:
...
> Doing it on my VirtualBox Win7 install I see this:
>> [11:50:15][pycomp][err] _GetCompletionInfo:<type 'exceptions.IOError'>,
>> [Errno 13] Permission denied: 'pycompout.py'
> You may need to modify the code you uncommented as it just does
> 'open('pycompout.py')' which will write to the same directory as the
> pycomp file. As the error shows you don't have write permissions in
> that directory it would seem. So you can just change the path to write
> to your desktop or somewhere that you do.
>
Didn't notice that I only had access rights.
Changed it to write to /tmp and attached is the file it generates and
what it shows for completion.
Werner
Looks like that is on some version of Linux. What version of wxPython
is Editra running on on that machine?
If you type 'wx.' in PyShell does RED show up in the list?
Can't reproduce on my Windows machine but will double check on my
Linux setup when I get a chance though I wouldn't suspect any
different behavior in this feature.
Cody
Another question with regards to AutoCompletion.
I am working in module "a" which imports "b". When I add e.g. a new
method in "b" that is often not available when I go back to "a".
Is there a way to refresh "a" that AutoCompletion sees the new stuff (or
renamed/refactored) in "b"?
This is on my Ubuntu machine, haven't tried it on Windows.
Werner
On Tue, Jul 19, 2011 at 10:05 AM, werner <wbr...@free.fr> wrote:
> Cody,
>
> Another question with regards to AutoCompletion.
>
> I am working in module "a" which imports "b". When I add e.g. a new method
> in "b" that is often not available when I go back to "a".
>
> Is there a way to refresh "a" that AutoCompletion sees the new stuff (or
> renamed/refactored) in "b"?
There isn't really a safe way to do it under the current design, since
the completions are evaluated in process. The only way would be to
force a module reload for modules already in sys.modules during the
eval.
Regards,
Cody
Any chance that something like this will make it into one of the next
updates?
Werner
I have noted another issue with code completion in my code, will try and
narrow it down and open a ticket so it doesn't get overlooked whenever
you rework the completer interface.
Werner