A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ipython/ipython/issues/1632/ below:

Win32 shell interactivity apparently broke qtconsole "cd" magic · Issue #1632 · ipython/ipython · GitHub

PR #1424, Win32 shell interactivity, was accepted as not enhancing qtconsole, but was not thought to break it. It seems to have. This was reproduced on several different systems. Located the breakage by bisection at 4953f2d

@mwiebe, @minrk could you have a look?

On a Win7-64 native box, with no recent history of running "ipython kernel", the following commands immediately after qtconsole startup

reliably caused the following traceback, followed by general odd behavior, apparent corruption, until restart qtconsole.

TypeError                                 Traceback (most recent call last)
c:\Users\jmarch\<ipython-input-2-56af63bcfcf6> in <module>()
----> 1 get_ipython().magic(u'cd ..')

c:\users\jmarch\ipython\IPython\core\interactiveshell.pyc in magic(self, arg_s, next_input)
   2034                 self._magic_locals = sys._getframe(1).f_locals
   2035             with self.builtin_trap:
-> 2036                 result = fn(magic_args)
   2037             # Ensure we're not keeping object references around:
   2038             self._magic_locals = {}

c:\users\jmarch\ipython\IPython\core\magic.pyc in magic_cd(self, parameter_s)
   2953             # for c:\windows\directory\names\
   2954             parameter_s = re.sub(r'\\(?! )','/', parameter_s)
-> 2955             opts,ps = self.parse_options(parameter_s,'qb',mode='string')
   2956         # jump to previous
   2957         if ps == '-':

c:\users\jmarch\ipython\IPython\core\magic.pyc in parse_options(self, arg_str, opt_str, *long_opts, **kw)
    279             # If the list of inputs only has 0 or 1 thing in it, there's no
    280             # need to look for options
--> 281             argv = arg_split(arg_str, posix, strict)
    282             # Do regular option processing
    283             try:

c:\users\jmarch\ipython\IPython\utils\_process_win32.pyc in arg_split(commandline, posix, strict)
    178         result_pointer = CommandLineToArgvW(py3compat.cast_unicode(commandline.lstrip()), ctypes.byref(argvn))
    179         result_array_type = LPCWSTR * argvn.value
--> 180         result = [arg for arg in result_array_type.from_address(result_pointer)]
    181         retval = LocalFree(result_pointer)
    182         return result

TypeError: integer expected

After running "ipython kernel" to test this on a 2-process terminal, I was unable to again reproduce the problem on this system even in a simple qtconsole. Have not yet rebooted.

Easiest short-term workaround may be to revert to previous behavior in _process_win32.system when running qtconsole?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4