But i want it to print the output all in one line. I want to be able to decide on whether i allow it to print the items on a new line, or to print them all on one line.
I have no idea what you are trying to do but your function is not called.
I guess you are trying to put that function in the interpreter namespace for other uses.
The function has a useless line and looks as though you want Python version 2.x.x and the print STATEMENT.
If you require version 3.x.x then you need the print FUNCTION and the end=" " _flag_.
OSX 10.13.4, default bash terminal calling python2.7.
Last edited by wisecracker; 05-27-2018 at 06:57 AM..
This User Gave Thanks to wisecracker For This Post:
I have no idea what you are trying to do but your function is not called.
I guess you are trying to put that function in the interpreter namespace for other uses.
The function has a useless line and looks as though you want Python version 2.x.x and the print STATEMENT.
If you require version 3.x.x then you need the print FUNCTION and the end=" " _flag_.
OSX 10.13.4, default bash terminal calling python2.7.
thank you. i intended to put the following in my original code:
but it looks like its not part of what i copied and pasted.
another problem im having is, before and after implementing your suggested change, i have been unable to put the output of the called function into a variable.
My original code:
when I run the script, even though Im not printing out the output of "functionOutput", i still see the output.
how can i keep the results of the printWithoutNewlines function in the "functionOutput" variable without it being outputted out to the screen?
and how can I do a replacement on the content of the functionOutput variable?
here is what i have tried:
# note that im removed the comma you recommended. i did that on purpose.
what I'm intending to do with the above code is to run the defined function, then, remove the new lines from the output of the function.
This site is the first to get this snippet.
It will capture an audio recording of any time length within the limits of OSX's QuickTime Player's capablility...
A shell script derivative of this will be used as a further capture for CygWin's AudioScope.sh.
Thoroughly read ALL the comments in... (0 Replies)
Cheers!
In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Hi,
i have the below script:
###############################SimpleEncryption################################
#Simple encryption implemented in python
#Author:pandeeswaran
###############################################################################
def Encrypt(input):
res=''
... (13 Replies)
I have the following problem, which I need done in Perl/ or Python using Unix/linux filters...
1. You have a very large file, named 'ColCheckMe', tab-delmited, that you are asked to process. You are told that each line in 'ColCheckMe' has 7 columns, and that the values... (1 Reply)
I have the following problem, which I need done in Perl/ or Python using Unix/linux filters...
1. You have a very large file, named 'ColCheckMe', tab-delmited, that you are asked to process. You are told that each line in 'ColCheckMe' has 7 columns, and that the values in the... (1 Reply)
Building software in most languages is a pain. Remember ant build.xml, maven2 pom files, and multi-level makefiles?
Python has a simple solution for building modules, applications, and extensions called distutils. Disutils comes as part of the Python distribution so there are no other packages... (0 Replies)