Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4813557 By: ndlarsen
Hello. I found a pice of code on the web which for some reason runs as intended in a terminal but not in eclipse with pydev. Here's the code: #! /usr/bin/python import fcntl, struct, sys, termios def get_terminal_dimensions(): fd_stdout = sys.stdout.fileno() r = fcntl.ioctl(fd_stdout, termios.TIOCGWINSZ, struct.pack("HHHH", 0, 0, 0, 0)) rows, cols, x_pixels, y_pixels = struct.unpack("HHHH", r) return cols print get_terminal_dimensions() When running it through pydev the console output is this: Traceback (most recent call last): File "/home/x/workspace/pyprogs/src/functions/getTtySize.py", line 6, in <module> r = fcntl.ioctl(fd_stdout, termios.TIOCGWINSZ, struct.pack("HHHH", 0, 0, 0, 0)) IOError: [Errno 22] Invalid argument Now, I am not entirely sure if it is caused by misconfiguration in eclipse/pydev, a bug or something else. I'm just wondering if anyone could help me out on this. I'm running Eclipse 3.3.1.1 Build id: M20071023-1652 with Pydev 1.3.13 on Linux 2.6.24.1. Thank you. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=293649 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users