[wingide-users] autocomplete and stringio

Wingware Support support at wingware.com
Thu Aug 25 17:27:17 EDT 2005


On Thu, 25 Aug 2005, Jonathan Ellis wrote:
> from cStringIO import StringIO
> f = StringIO()
> f.[autocomplete]
> 
> Wing thinks f is a string, not a stringio ... ?

Indeed, our stdlib scraper is doing the wrong thing in this case.

A quick hack to fix this is to change cStringIO.pi in 
resources/builtin-pi-files/#.# (where #.# is your Python version 
number) inside your Wing installation so the last def is:

def StringIO(s=None):
  """ StringIO([s]) -- Return a StringIO-like stream for reading or writing """
  import StringIO
  return StringIO.StringIO()

(However, if you do stuff like this to your Wing installation please 
be sure to uninstall Wing and remove any remaining files before 
attempting an upgrade in the future; otherwise the upgrade may fail)

I'll look into why this is being generated wrong.

Thanks for the bug report.

Stephan Deibel

--
Wingware
Wing IDE for Python
Advancing Software Development

www.wingware.com


More information about the wingide-users mailing list