EOL is not working and uncheck or unsafe operation Programming Software Development by Covinus … ); else if ( parser.ttype == StreamTokenizer.TT_EOL ) System.out.println( "EOL" ); else System.out.println( "Other: " + (char) …parser.ttype ); } } } [/code] the EOL is not reconize??? Althought i have a \n in my… EOL problem Programming Software Development by gh0st0 … supposed to open a file (postscript with UNIX LF-only EOL characters), look for and change a line, then write the… I can't dissuade Python from writing CRLF as the EOL character, and the onward system that's taking it as… read it with CRLF. I've tried to strip the EOL completely and explicitly write '/n', but it always adds the… Re: Stripping EOL character from a string Programming Software Development by mattgwilson EOL though is actually decimal 10 or 13 or a combination … Stripping EOL character from a string Programming Software Development by mattgwilson …to beyond any possible answer, then search for the EOL character... some of the following code has been …string to work with if ⌂ in extractb #if the EOL character is in the string end = extractb.find(⌂) #…end is given the index of the EOL character extractb = lineb[found:end:1] #final string to… Re: Stripping EOL character from a string Programming Software Development by mattgwilson … several of the ⌂ characters which in some programs signifies a EOL. I know where to start reading from, BUT I do… the case. The string end is currently marked with the EOL character "⌂" which is hex 7F. I need the… Re: Stripping EOL character from a string Programming Software Development by TrustyTony Character must be in quotes to make string (in Python characters are just short strings) [CODE] if '⌂' in extractb #if the EOL character is in the string [/CODE] Better even to use the hex value of the ascii with \x prefix. Re: Stripping EOL character from a string Programming Software Development by mattgwilson … are just short strings) [CODE] if '⌂' in extractb #if the EOL character is in the string [/CODE] Better even to use… Re: Stripping EOL character from a string Programming Software Development by mattgwilson …] print extractb[/CODE] Here is the current output (NOTE the EOL character is not displayed here, as it is being treated… Re: Stripping EOL character from a string Programming Software Development by woooee …:"): print data[ctr].strip(), data[ctr+1].strip() [/code]EOL though is actually decimal 10 or 13 or a combination… istream iterators, std::string and reading to the EOL. Programming Software Development by gerard4143 … question about istream iterators and reading the input to the EOL. How do you do it? I tried the following but…] - this is the third The code now reads to the EOL and pushes the results onto the vector the_words. Does anyone… Import EOL Programming Software Development by bnn678 ….py and some others. The error returned is that "EOL while scanning string literal" Any tips or ideas? Re: EOL is not working and uncheck or unsafe operation Programming Software Development by jwenting [quote] StreamTokenizer(InputStream is) Deprecated. As of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example: Reader r = new BufferedReader(new InputStreamReader(is)); StreamTokenizer st = new StreamTokenizer(r); [/quote] Why are you using a deprecated … Re: EOL is not working and uncheck or unsafe operation Programming Software Development by Covinus sorry for the late reply. got busy. anyway i just started learning a few IO stuff on java. The first code was actually taken from the internet. I was searching for lessons bout tokenizers. so it means the site was teaching wrong stuff. [quote]That's not an error, it's a warning. You're compiling against a 1.5 compiler using code that … Re: EOL is not working and uncheck or unsafe operation Programming Software Development by jwenting not necessarilly wrong so much as heavily outdated. Re: EOL problem Programming Software Development by vegaseat Since you are using Python3, this should solve your problem: [url]http://www.daniweb.com/forums/showthread.php?p=1317527#post1317527[/url] Re: EOL problem Programming Software Development by gh0st0 [QUOTE=vegaseat;1317530]Since you are using Python3, this should solve your problem: [url]http://www.daniweb.com/forums/post1317527.html#post1317527[/url][/QUOTE] Awesomely good skills, thanks. Re: Stripping EOL character from a string Programming Software Development by TrustyTony I do not know what character you are after (not in ascii chart: [url]http://bluesock.org/~willg/dev/ascii.html[/url]) and we have no sample of your input file (because you did not attach one), what you want I do not also know so well. Are you sure that simple .split() does not do the job? Re: Stripping EOL character from a string Programming Software Development by mattgwilson [QUOTE=pyTony;1709434]I do not know what character you are after (not in ascii chart: [url]http://bluesock.org/~willg/dev/ascii.html[/url]) and we have no sample of your input file (because you did not attach one), what you want I do not also know so well. Are you sure that simple .split() does not do the job?[/QUOTE] Hi Tony, I've retried what… Re: Stripping EOL character from a string Programming Software Development by TrustyTony I do not know what is your issue post exact copy pasted data later. [CODE]Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import string >>> data = '\x7F'.join(string.ascii_letters) >>> data… Re: Stripping EOL character from a string Programming Software Development by woooee Note the split on "DATE:" that I added to the above post, which may work better. And Hex 7f = decimal 127 so you should be able to replace it. Re: Stripping EOL character from a string Programming Software Development by TrustyTony You could also try memoryview or bytes instead of string. Re: Stripping EOL character from a string Programming Software Development by mattgwilson > I think I'll just read backwards from the following line and use that as "end" then end=end-2 to give me the correct index. This will not work on some of the lines, but it's a start. Sigh. while x == "1": path = r"C:\\TEST" entries = [join(path, entry) for entry in listdir(path)]… Re: Stripping EOL character from a string Programming Software Development by TrustyTony I do not like the coding style, but to keep things short, why would you not use simple rsplit(ret) and print first element of the result in matching line? You are also leaving your files open, use obfuscating variables a,b,c... And even more useless lineb synonym for line... Re: istream iterators, std::string and reading to the EOL. Programming Software Development by gerard4143 Odd I thought someone would have some comments on this code. I guess the second attempt 'the hack' is acceptable code. Re: Import EOL Programming Software Development by TrustyTony You do not use full path name nor the .py extension. The file must be at system search path or path pointed by PYTHONPATH environment variable. Re: Import EOL Programming Software Development by woooee Add the directory to your path then use import program_name. To add it permanently add export PYTHONPATH=$PYTHONPATH:/new/directory/name to your .bash.rc file. To add it for this program sys.path.append("/add/this/directory") See this tutorial [Click Here](http://www.tutorialspoint.com/python/python_modules.htm) Re: Import EOL Programming Software Development by bnn678 Ahh, problem was elsewhere. Not a problem with path :) Re: How To Add a Count Value to a Foreach Statement? Programming Web Development by JBLDW …// +-- print '<tr class="' . $trclass . '">' . $eol . $eol; // +-- // | Print the tds and their content. // +-- $prodname = $…add_ok) { print '<td class="' . $tdclass . '">' . $eol . $eol; print '<label for="' . $formid . '--' . $prodid . '--quantity… Re: How To Add a Count Value to a Foreach Statement? Programming Web Development by JBLDW … +-- // print '<tr class="' . $trclass . '">' . $eol . $eol; // +-- // | Print the tds and their content. // +-- $prodname = $this…) { print '<td class="' . $tdclass . '">' . $eol . $eol; print '<label for="' . $formid . '--' . $prodid . '--quantity… Re: How To Add a Count Value to a Foreach Statement? Programming Web Development by JBLDW … { print '<td class="' . $tdclass . '">' . $eol . $eol; print '<label for="' . $formid . '--' . $prodid . '--…statement. print '</td>' . $eol . $eol; // +-- // | Close the table row. // +-- //print '</tr>' . $eol . $eol; if ($counter == 2) { // +--…