Search Results

Search found 990 results on 40 pages for 'readline'.

Page 1/40 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Cannot easy_install readline for Python 2.7.3 on Mac Os Lion

    - by user11170
    I am trying to install readline for python 2.7.3 installed via homebrew. If I type easy_install readline I get Downloading http://pypi.python.org/packages/source/r/readline/readline-6.2.2.tar.gz#md5=ad9d4a5a3af37d31daf36ea917b08c77 Processing readline-6.2.2.tar.gz Writing /var/folders/44/dhrdb5sx53s243j4w03063vh0000gn/T/easy_install-64FbG8/readline-6.2.2/setup.cfg Running readline-6.2.2/setup.py -q bdist_egg --dist-dir /var/folders/44/dhrdb5sx53s243j4w03063vh0000gn/T/easy_install-64FbG8/readline-6.2.2/egg-dist-tmp-NOmStB clang: error: no such file or directory: 'readline/libreadline.a' clang: error: no such file or directory: 'readline/libhistory.a' error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1 Any ideas about how I could fix this ? Thanks

    Read the article

  • Control-Backspace (unix-kill-rubout) for readline?

    - by Xepoch
    In readline(3) I should be able to map Control-Backspace to the same function as Control-W (unix-kill-rubout). Regardless of what I put in ~/.inputrc I'm unable to get this to be recognized. \C-\b: unix-kill-rubout ...for instance does not work. Can I map Control-Backspace to the unix-kill-rubout in readline?

    Read the article

  • force exit from readline() function.

    - by Sasun Hambardzumyan
    I am writing program in c++ which runs GNU readline in separate thread. When main thread is exited I need to finish the thread in which readline() function is called. The readline() function is returned only when standart input came (enter pressed). Is there any way to send input to application or explicitly return from readline function? Thanks in advance.

    Read the article

  • What is the right way to stop an infinite while-loop with a Term::ReadLine-readline?

    - by sid_com
    What is the right way to stop an endless while-loop with a Term::ReadLine::readline? This way I can not read in a single 0 #!/usr/bin/env perl use warnings; use strict; use 5.010; use Term::ReadLine; my $term = Term::ReadLine->new( 'Text' ); my $content; while ( 1 ) { my $con = $term->readline( 'input: ' ); last if not $con; $content .= "$con\n"; } say $content; and with last if not defined $con; the loop does never end.

    Read the article

  • C# FileStream position is off after calling ReadLine()

    - by Cristi Diaconescu
    I'm trying to read a (small-ish) file in chunks of a few lines at a time, and I need to return to the beginning of particular chunks. The problem is, after the very first call to streamReader.ReadLine(); the streamReader.BaseStream.Position property is set to the end of the file! Now I assume some caching is done in the backstage, but I was expecting this property to reflect the number of bytes that I used from that file. For instance, calling ReadLine() again will (naturally) return the next line in the file, which does not start at the position previously reported by streamReader.BaseStream.Position. My question is, how can I find the actual position where the 1st line ends, so I can return there later? I can only think of manually doing the bookkeeping, by adding the lengths of the strings returned by ReadLine(), but even here there are a couple of caveats: ReadLine() strips the new-line character(s) which may have a variable length (is is '\n' ? is it "\r\n" ? etc) I'm not sure if this would work ok with variable-length characters ...so right now it seems like my only option is to rethink how I parse the file, so I don't have to rewind. If it helps, I open my file like this: using (var reader = new StreamReader( new FileStream(m_path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))) {...} Any suggestions?

    Read the article

  • Is there a simple alternative to Readline?

    - by Justin Poliey
    On a project I'm working on, I'm trying to make it accept user commands and provide history with the up arrow. I'm aiming to keep this project free of dependencies, and I don't want to have to require people to also install the readline development files just to compile my project. Does anyone know of a simple drop-in replacement for GNU Readline that provides only simple functionality?

    Read the article

  • How can I enable readline for PHP 5.4 on Ubuntu 11.10?

    - by dotweb
    I installed PHP 5.4 on my Ubuntu 11.10 PC like this: $ sudo add-apt-repository ppa:ondrej/php5 $ sudo apt-get update $ sudo apt-get install php5 It's working fine but I don't have the readline function anymore that I need for my PHP CLI scripts. libreadline-dev is installed and readline was working perfectly in 5.3. I also tried to compile 5.4 with readline: $ wget http://de2.php.net/get/php-5.4.0.tar.gz/from/de.php.net/mirror $ tar xzvf mirror $ cd php-5.4.0/ $ ./configure --with-readline $ make test But the last command echoed this error after compiling for some minutes: FAILED TEST SUMMARY Test 7: DTD tests [ext/dom/tests/dom007.phpt] You may have found a problem in PHP. I appreciate any help on how to get readline working!

    Read the article

  • C# StreamReader.ReadLine() - Need to pick up line terminators

    - by Tony Trozzo
    I wrote a C# program to read an Excel .xls/.xlsx file and output to CSV and Unicode text. I wrote a separate program to remove blank records. This is accomplished by reading each line with StreamReader.ReadLine(), and then going character by character through the string and not writing the line to output if it contains all commas (for the CSV) or all tabs (for the Unicode text). The problem occurs when the Excel file contains embedded newlines (\x0A) inside the cells. I changed my XLS to CSV converter to find these new lines (since it goes cell by cell) and write them as \x0A, and normal lines just use StreamWriter.WriteLine(). The problem occurs in the separate program to remove blank records. When I read in with StreamReader.ReadLine(), by definition it only returns the string with the line, not the terminator. Since the embedded newlines show up as two separate lines, I can't tell which is a full record and which is an embedded newline for when I write them to the final file. I'm not even sure I can read in the \x0A because everything on the input registers as '\n'. I could go character by character, but this destroys my logic to remove blank lines. Any ideas would be greatly appreciated.

    Read the article

  • How to solve Fatal error: Call to undefined function readline()? readline library not found?

    - by SirBT
    I have an Ubuntu 12.04 LTS. And XAMPP for linux 1.7.7. When I code in php with and call the readline function I get this error message? "Fatal error: Call to undefined function readline()" I recently found the below thread which pointed out the name of the package that contained the desired readline: How to solve configure: error: readline library not found? I went ahead and installed # apt-get install libreadline6. But this didnt seem to make a difference. I still get the same error message: "Fatal error: Call to undefined function readline()". Was the thread missing further steps? Can anyone help me? I am new to Ubuntu. <?php echo "Simple menu \n" ; echo "1. Play Sports \n"; echo "2. Play Strategy games \n"; $userInput = readline('Enter something here: '); ?>

    Read the article

  • Readline, the Input Record Separator and Ruby

    - by JustSmith
    In Ruby I'm looking to read data until I reach a delimiter or end of file. I found this is possible by redefining $/ or the $INPUT_RECORD_SEPARATOR to my delimiter. However with all the "features" in the Ruby language it seems hokey to change the value of a global to do this. Also, readline used to consume the delimiter while not it is included in what is returned. Is there any other way to "read until" while consuming the delimiter that doesn't involve getting the values char by char in a loop?

    Read the article

  • How do I count the number of bytes read by TextReader.ReadLine()?

    - by Steve Guidi
    I am parsing a very large file of records (one per line, each of varying length), and I'd like to keep track of the number of bytes I've read in the file so that I may recover in the event of a failure. I wrote the following: string record = myTextReader.ReadLine(); bytesRead += record.Length; ParseRecord(record); However this doesn't work since ReadLine() strips any CR/LF characters in the line. Furthermore, a line may be terminated by either CR, LF, or CRLF characters, which means I can't just add 1 to bytesRead. Is there an easy way to get the actual line length, or do I write my own ReadLine() method in terms of the granular Read() operations?

    Read the article

  • Installing Fabric On Windows (Error No Module Called Readline)

    - by Jon
    I'm trying to use the Fabric 0.1.1 deploy tool (http://docs.fabfile.org/) on Windows and we're running into an issue with the readline module. I've been through various threads but can't seem to solve the issue. It's important because we can't deploy applications from Windows based machines. C:\Documents and Settings\dev\Desktop\deploy>fab Traceback (most recent call last): File "C:\python\Scripts\fab-script.py", line 8, in <module> load_entry_point('fabric==0.1.1', 'console_scripts', 'fab')() File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py" , line 277, in load_entry_point File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py" , line 2180, in load_entry_point File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py" , line 1913, in load File "build\bdist.win32\egg\fabric.py", line 25, in <module> **ImportError: No module named readline** Installing the module results in: **easy_install readline** Searching for readline Reading http://pypi.python.org/simple/readline/ Reading http://www.python.org/ Best match: readline 2.6.4 Downloading http://pypi.python.org/packages/source/r/readline/readline-2.6.4.tar .gz#md5=7568e8b78f383443ba57c9afec6f4285 Processing readline-2.6.4.tar.gz Running readline-2.6.4\setup.py -q bdist_egg --dist-dir c:\docume~1\ji81b9~1.che \locals~1\temp\easy_install-pzkz1a\readline-2.6.4\egg-dist-tmp-szs2ps Traceback (most recent call last): File "C:\python\Scripts\easy_install-script.py", line 8, in <module> load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')() File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 1671, in main File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 1659, in with_ei_usage File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 1675, in <lambda> File "c:\python\lib\distutils\core.py", line 152, in setup dist.run_commands() File "c:\python\lib\distutils\dist.py", line 975, in run_commands self.run_command(cmd) File "c:\python\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 211, in run File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 446, in easy_install File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 476, in install_item File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 655, in install_eggs File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 930, in build_and_install File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman d\easy_install.py", line 919, in run_setup File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo x.py", line 27, in run_setup File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo x.py", line 63, in run File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo x.py", line 29, in <lambda> File "setup.py", line 93, in <module> AttributeError: 'module' object has no attribute 'symlink' Has anybody solved this issue or can anybody suggest a workaround?

    Read the article

  • Is there a C# (.net) library similar to GNU readline?

    - by paul.moore.name
    I'm considering writing a console application in C# and I want to incorporate history, completion and command line editing features something like GNU readline (but not necessarily as extensive as that!) Is there an existing library for .net which provides this type of functionality? I guess one option would be to use interop services to call GNU readline. But is there a native option? Paul.

    Read the article

  • Is there a .Net library similar to GNU readline?

    - by paul.moore.name
    I'm considering writing a console application in C# and I want to incorporate history, completion and command line editing features something like GNU readline (but not necessarily as extensive as that!) Is there an existing library for .net which provides this type of functionality? I guess one option would be to use interop services to call GNU readline. But is there a native option?

    Read the article

  • Unable to configure Ruby with readline

    - by Liam Berg
    1) ./configure --prefix=$HOME/.packages --with-readline-dir=$HOME/.packages 2) configure: WARNING: unrecognized options: --with-readline-dir I am trying to setup the most up-to-date version of Ruby on my webhost (I do not have sudo access). Line 1 is the configure command I used for Ruby and Line 2 is the first printed line after executing 'configure'. I've googled this issue and found other people with the same problem but there aren't any real solutions. There are no warnings or errors when configuring/compiling readline-6.1. I am pretty stumped, any help/insight would be greatly appreciated. Thanks ahead of time.

    Read the article

  • Unable to configure Rails with readline

    - by Liam Berg
    1) ./configure --prefix=$HOME/.packages --with-readline-dir=$HOME/.packages 2) configure: WARNING: unrecognized options: --with-readline-dir I am trying to setup the most up-to-date version of Rails on my webhost (I do not have sudo access). Line 1 is the configure command I used for Ruby and Line 2 is the first printed line after executing 'configure'. I've googled this issue and found other people with the same problem but there aren't any real solutions. There are no warnings or errors when configuring/compiling readline-6.1. I am pretty stumped, any help/insight would be greatly appreciated. Thanks ahead of time.

    Read the article

  • BufferedReader.readLine() gives error java.net.SocketException: Software caused connection abort: re

    - by javatcp
    I am trying to code my program such that until the buffered reader gets something in readLine() from my tcp client it should keep running in the while loop checking but I get this error as soon as the program executes Mar 31, 2010 11:03:36 PM deswash.DESWashView$5 run SEVERE: null java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at java.io.BufferedReader.readLine(BufferedReader.java:299) at java.io.BufferedReader.readLine(BufferedReader.java:362) at deswash.DESWashView$5.run(DESWashView.java:448) the second line in the following code throws the error while(running){ String temp = in.readLine(); if(!(temp.equals(null))){ int inid = Integer.parseInt(temp); stationList.add(inid); } }

    Read the article

  • Java: what are IOEXceptions in BufferedReader's readLine() for?

    - by HH
    I can "fix" the below exception with a try-catch loop but I cannot understand the reason. Why does the part "in.readLine()" continuosly ignite IOExceptions? What is really the purpose of throwing such exceptions, the goal probably not just more side effects? Code and IOExceptions $ javac ReadLineTest.java ReadLineTest.java:9: unreported exception java.io.IOException; must be caught or declared to be thrown while((s=in.readLine())!=null){ ^ 1 error $ cat ReadLineTest.java import java.io.*; import java.util.*; public class ReadLineTest { public static void main(String[] args) { String s; BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); // WHY IOException here? while((s=in.readLine())!=null){ System.out.println(s); } } }

    Read the article

  • deprecated readLine() What to change?

    - by user1681751
    I'm trying to get this to work in the eclipse, but the "readLine" is striked through and a notice says it is depreciated, the code works, albeit not the "while ((var2 = var5.readLine()) != null) {" bit.. So I'm wondering how to fix it, a java beginner. String var2 = ""; HttpURLConnection var3 = null; DataOutputStream var4 = null; DataInputStream var5 = null; ...more code here.... try { var5 = new DataInputStream(var3.getInputStream()); while ((var2 = var5.readLine()) != null) { System.out.println("Server Response " + var2); ScreenShotHelper.mc.thePlayer.addChatMessage("\u00a7aSuccessfully uploaded screenshot! Direct link:"); ScreenShotHelper.mc.thePlayer.addChatMessage("\u00a7a" + var2); } var5.close(); }

    Read the article

  • Text piped to PowerShell.exe isn't recieved when using [Console]::ReadLine()

    - by crtracy
    I'm getting itermittent data loss when calling .NET [Console]::ReadLine() to read piped input to PowerShell.exe: >ping localhost | powershell -NonInteractive -NoProfile -C "do {$line = [Console]::ReadLine(); ('' + (Get-Date -f 'HH:mm :ss') + $line) | Write-Host; } while ($line -ne $null)" 23:56:45time<1ms 23:56:45 23:56:46time<1ms 23:56:46 23:56:47time<1ms 23:56:47 23:56:47 Normally 'ping localhost' from Vista64 looks like this, so there is a lot of data missing from the output above: Pinging WORLNTEC02.bnysecurities.corp.local [::1] from ::1 with 32 bytes of data: Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Ping statistics for ::1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms But using the same API from C# recieves all the data sent to the process (excluding some newline differences). Code: namespace ConOutTime { class Program { static void Main (string[] args) { string s; while ((s = Console.ReadLine ()) != null) { if (s.Length > 0) // don't write time for empty lines Console.WriteLine("{0:HH:mm:ss} {1}", DateTime.Now, s); } } } } Output: 00:44:30 Pinging WORLNTEC02.bnysecurities.corp.local [::1] from ::1 with 32 bytes of data: 00:44:30 Reply from ::1: time<1ms 00:44:31 Reply from ::1: time<1ms 00:44:32 Reply from ::1: time<1ms 00:44:33 Reply from ::1: time<1ms 00:44:33 Ping statistics for ::1: 00:44:33 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), 00:44:33 Approximate round trip times in milli-seconds: 00:44:33 Minimum = 0ms, Maximum = 0ms, Average = 0ms So, if calling the same API from PowerShell instead of C# many parts of StdIn get 'eaten'. Is the PowerShell host reading string from StdIn even though I didn't use 'PowerShell.exe -Command -'?

    Read the article

  • Java: Efficiency of the readLine method of the BufferedReader and possible alternatives

    - by Luhar
    We are working to reduce the latency and increase the performance of a process written in Java that consumes data (xml strings) from a socket via the readLine() method of the BufferedReader class. The data is delimited by the end of line separater (\n), and each line can be of a variable length (6KBits - 32KBits). Our code looks like: Socket sock = connection; InputStream in = sock.getInputStream(); BufferedReader inputReader = new BufferedReader(new InputStreamReader(in)); ... do { String input = inputReader.readLine(); // Executor call to parse the input thread in a seperate thread }while(true) So I have a couple of questions: Will the inputReader.readLine() method return as soon as it hits the \n character or will it wait till the buffer is full? Is there a faster of picking up data from the socket than using a BufferedReader? What happens when the size of the input string is smaller than the size of the Socket's receive buffer? What happens when the size of the input string is bigger than the size of the Socket's receive buffer? I am getting to grips (slowly) with Java's IO libraries, so any pointers are much appreciated. Thank you!

    Read the article

  • Skipping the BufferedReader readLine() method in java

    - by DDP
    Is there a easy way to skip the readLine() method in java if it takes longer than, say, 2 seconds? Here's the context in which I'm asking this question: public void run() { boolean looping = true; while(looping) { for(int x = 0; x<clientList.size(); x++) { try { Comm s = clientList.get(x); String str = s.recieve(); // code that does something based on the string in the line above } // other stuff like catch methods } } } Comm is a class I wrote, and the receive method, which contains a BufferedReader called "in", is this: public String recieve() { try { if(active) return in.readLine(); } catch(Exception e) { System.out.println("Comm Error 2: "+e); } return ""; } I've noticed that the program stops and waits for the input stream to have something to read before continuing. Which is bad, because I need the program to keep looping (as it loops, it goes to all the other clients and asks for input). Is there a way to skip the readLine() process if there's nothing to read? I'm also pretty sure that I'm not explaining this well, so please ask me questions if I'm being confusing.

    Read the article

  • Getting readline to block on a FIFO

    - by Dan
    I create a fifo: mkfifo tofetch I run this python code: fetchlistfile = file("tofetch", "r") while 1: nextfetch = fetchlistfile.readline() print nextfetch It stalls on readline, as I would hope. I run: echo "test" > tofetch And my program doesn't stall anymore. It reads the line, and then continues looping forever. Why won't it stall again when there's no new data? I also tried looking on "not fetchlistfile.closed", I wouldn't mind reopening it after every write, but Python thinks the fifo is still open.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >