Subject: Flo Rida's light wave music technology

From: Next Big Thing in Music <[email-masked]>
Date: Fri, 23 May 2014 12:48:03 -0700

In Music News: 

First Dr. Dre now FLO RIDA has the hottest sound system. 
** The future of Interactive Music is Here **

- Play hundreds of different instruments and sound effects
- Create your own remixes or original music
- Record and share your performances

Try it without Buying it here: / http://www.removalsir.com/flo-rida/music/billboard.index 

As seen: extra | TheView | Billboard Music | http://www.removalsir.com/flo-rida/music/billboard.index

to modify message settings w/ Alert System Notifications
(write) 1107 Valeria Dr-Marion-TX-78124 or http://www.removalsir.com/klfj3.sfke

readlines() reads all lines at once i.e., it blocks until the subprocess exits (closes its end of the pipe). To read in real time (if there is no buffering issues) you could: for line in iter(p.stdout.readline, ''): print line,   J.F. Sebastian Nov 16 '12 at 14:12Could you elaborate on what you mean by "if there is no buffering issues"? If the process blocks definitely, the subprocess call also blocks. The same could happen with my original example as well. What else could happen with respect to buffering?   EmmEff Nov 17 '12 at 13:25
the child process may use block-buffering in non-interactive mode instead of line-buffering so p.stdout.readline() (note: no s at the end) won't see any data until the child fills its buffer. If the child doesn't produce much data then the output won't be in real time. See the second reason in Q: Why not just use a pipe (popen())?. Some workarounds are provided in this answer (pexpect, pty, stdbuf)   J.F. Sebastian Nov 17 '12 at 13:51thanks for the answer! i noticed a possible "quirk" with developing py2exe apps in pydev+eclipse. i was able to tell that the main script was not detached because eclipse's output window was not terminating; even if the script executes to completion it is still waiting for returns. but, when i tried compiling to a py2exe executable, the expected behavior occurs (runs the processes as detached, then quits). i am not sure, but the executable name is not in the process list anymore. this works for all approaches (os.system("start *"), os.spawnl with os.P_DE
 TACH, subprocs, etc.)   maranas Apr 9 '10 at 8:09@alexey-lebedev, I had no choice =) You are welcome!   newtover Apr 13 '12 at 19:57
Windows gotcha: even though I spawned process with DETACHED_PROCESS, when I killed my Python daemon all ports opened by it wouldn't free until all spawned processes terminate. WScript.Shell solved all my problethe buffering issue only matters if you want output in real time and doesn't apply to your code that doesn't print anything until all data is received   J.F. Sebastian Nov 17 '12 at 13:53
@J.F.Sebastian tried your method, however every time a command is entered teh result of the previous command is printed out.   Paul Apr 10 '13 at 15:13@Paul: If your code produces unexpected results then you could create a complete minimal code example that reproduces the problem and post it as a new question. Mention what do you expect to happen and what happens instead. arr2=($IN) creates a real array. So you should iterate over it with for i in "${arr2[@]}"; do ... ; done instead, when using the arr2=($IN) syntax :) That's why you only got the first string with the other method (like for i in $arr2; do ...; done). Note that you can print out items of an array too. Say you want to print the second item (mail addy), you would do echo "${arr2[1]}" . index "@" stands for "expand each item in the array to a separate word".   Johannes Schaub - litb May 28 '09 at 3:22
So "${arr2[@]}" with arr2 containing mails [email-masked] and [email-masked], expands to "[email-masked]" "[email-masked]" :) Note that you can then also restore IFS already before the for-loop starts (when using this array method). now, since "for x in $arr2" only works because IFS is still ";" (the string is seen by "for" as separate words, since IFS split them at that time), currently you have to have IFS set to ";" throughout the whole loop, which may cause subtle problems when you don't think of it :) I found bash has some evil pitfalls. Maybe we should start making up a "bash pitfalls" question on SO? :)   Johannes Schaub - litb May 28 '09 at 3:26
 This is probably the best way. How long will IFS persist in it's current value, can it mess up my code by being set when it shouldn't be, and how can I reset it when now after the fix applied, only within the duration of the read command :)   Johannes Schaub - litb May 28 '09 at 3:04 I knew there was a way with arrays, just couldn't remember what it was. I like setting the IFS but am not sure with the redirect from $IN and go through read just to populate array. Isn't just restoring IFS easier? Anyway +1 fro IFS suggestion, thanks.   stefanB May 28 '09 at 3:11I didn't like this saved="$IFS"; IFS=';'; ADDR=($IN); IFS="$saved" mess. :)   Johannes Schaub - litb May 28 '09 at 3:14 You can read everything at once without using a while loop: read -r -d '' -a addr <<< "$in" # The -d '' is key here, it tells read not to stop at the first newline (which is the default -d) but to continue until EOF or a NULL byte (which only occur in binary data).   lhunath May 28 '09 at 6:14 lhunath, ah nice
  idea :) However when i say "-d ''", then it always adds a linefeed as last element to the array. I don't know why that is :(   Johannes Schaub - litb May 28 '09 at 15:23 Seems to me the natural solution to the problem of splitting a line in bash with a custom word delimiter in a safe manner. Help me a lot.   Eduardo Lago Aguilar Sep 8 '11 at 15:33  Why not do it the way I suggested? Am I missing something?   James Andino Sep 25 '11 at 1:11 +1 Only a side note: shouldn't it be recommendable to keep the old IFS and then restore it? (as shown by stefanB in his edit3) people landing here (sometimes just copying and pasting a solution) might not think about this.   Luca Borrione Sep 3 '12 at 9:23 
 -1, you're obviously not aware of wordsplitting, because it's introducing two bugs in your code. one is when you don't quote $IN and the other is when you pretend a newline is the only delimiter used in wordsplitting. You are iterating over every WORD in IN, not every line, and DEFINATELY not every element delimited by a semicolon, though it may appear to have the side-effect of looking like it works.   lhunath May 28 '09 at 6:12
  I would listen to you closer, Ihunath, and understand that you're right, if you weren't being as much of a jerk about it. While this is certainly not perfect (and I know that - I've seen wordsplitting before), if you know you're working with a list of semicolon-separated email addresses, good-enough is often better than technically correct. I upvoted the IFS answer (and even recommended that it be undeleted) because it's a better answer, but for the OP's problem this was good enough. There's a reason for the phrase "good enough."   Chris Lutz May 28 '09 at 13:54You could change it to echo "$IN" | tr ';' '\n' | while read -r ADDY; do # process "$ADDY"; done to make him lucky, i think :) Note that this will fork, and you can't change outer variables from within the loop (that's why i used the <<< "$IN" syntax) then   Johannes Schaub - litb May 28 '09 at 17:00 @Chris: People being satisfied with "good enough" is the reason why 99.9% of all bash scripts in existance are a danger to any
 one using them because of race conditions, bugs and security issues. "Good enough" is not good enough; and definitely not recommended (and any advice given is a recommendation to the one asking).   lhunath May 28 '09 at 17:09I think that, while asking a new question, an OP try to insert a more specific part only to be clearer, while asking something more generic. You can see it crearly in this question: the OP started with the generic question How do I split a string based on a delimiter in Bash? and then he inserted his specific case to be clearer. After this question has been cast, people landing here want to know exactly how to split a generic string based on a delimiter and might not been fully satisfied in knowing how to solve the OP specific case. So lhunath is 100% correct imho   Luca Borrione Sep 3 '12 at 10:46 	  	
 Thanks, for I did not know <<< syntax till now! :-)   anishsane Oct 26 '12 at 10:45
 @LucaBorrione Setting IFS on the same line as the read with no semicolon or other separator, as opposed to in a separate command, scopes it to that command -- so it's always "restored"; you don't need to do anything manually.   Charles Duffy Jul 6 '13 at 14:39  I noticed that parentheses are needed around $IN. Otherwise the whole string gets put into ADDR[0]. Why is this the case? 	  	
@JohannesSchaub-litb +1 for the "Bash pitfalls" question   jmendeth Mar 16 '12 at 18:44 
With regards to your "Edit2": You can simply "unset IFS" and it will return to the default state. There's no need to save and restore it explicitly unless you have some reason to expect that it's already been set to a non-default value. Moreover, if you're doing this inside a function (and, if you aren't, why not?), you can set IFS as a local variable and it will return to its previous value once you exit the function.   Brooks Moses May 1 '12 at 1:26 @BrooksMoses: (a) +1 for using local IFS=... where possible; (b) -1 for unset IFS, this doesn't exactly reset IFS to its default value, though I believe an unset IFS behaves the same as the default value of IFS ($' \t\n'), however it seems bad practice to be assuming blindly that your code will never be invoked with IFS set to a custom value; (c) another idea is to invoke a subshell: (IFS=$custom; ...) when the subshell exits IFS will return to whatever it was originally