Code Monkey home page Code Monkey logo

anyprint's People

Contributors

aisk avatar alenthomas avatar harkonenbade avatar janpipek avatar kragniz avatar lamby avatar mplewis avatar nimaje avatar zhuowei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anyprint's Issues

Powershell Write-Output support

It would be really useful to add windows powershell syntax support for "Write-Output" cmdlet.

Here is an example:

Write-Output This is a test

output:

This
is
a
test

๐Ÿ˜œ

Clojure

You forgot the greatest language of all, Clojure!

(println "Hello from Clojure!")

Add symbols usually associated with print/debug/log statements

When using C/C++, whenever I use something like printf, I usually use symbols such as __LINE__ or __FUNC__.

It would be nice to define such symbols.

What is nice is that abusing the __str__ and/or __repr__ logic, it can be done easily: (disclaimer : code is not very tested):


import sys

def func_name(_):
	return sys._getframe(1).f_code.co_name

def line_number(_):
	return str(sys._getframe(1).f_lineno)

def file_name(_):
	return sys._getframe(1).f_code.co_filename

class FunctionNameObject():
	__str__ = func_name
	__repr__ = func_name 

class LineNumberObject():
	__str__ = line_number
	__repr__ = line_number

class FilenameObject():
	__str__ = file_name
	__repr__ = file_name 


__FUNC__ = FunctionNameObject()
__LINE__ = LineNumberObject()
__FILE__ = FilenameObject()

class Titi():
	def __init__(self):
		print(__FILE__, __FUNC__, __LINE__)

def toto():
	def tutu():
		print(__FILE__, __FUNC__, __LINE__)
	tutu()
	print(__FILE__, __FUNC__, __LINE__)

toto()
Titi()
print(__FILE__, __FUNC__, __LINE__)

Rust support

Hi,

The Rust idiom to write something on the console is:

println!("format {} arguments", "some");

the ! denotes a macro.

Any idea how this could be done in Python?

Add support for prefixed `std::` in C++

As well all know, if you write using namespace std;, you're a plebe.

Please add support for idiomatic C++ in Python.

std::cout << "Hello, C++ pedant!\n";

Ruby support

Ruby is a popular language, it's on top 20 of TOBIE Index and even get top 1 at 2006.

So anyprint should support least one of Ruby's print methods:

puts "Ruby"
print "๐Ÿ’Ž"
p "โค"

Wrong name

The name says anyprint, yet it does not support prints like CMake or Elixir.
I propose to rename this module "partialprint"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.