Difference between revisions of "Python -c"

From wikieduonline
Jump to navigation Jump to search
(Created page with " python -c 'import foo; print foo.hello()' == See also == * {{Python}} Category:Python")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lowercase}}
  
  python -c 'import foo; print foo.hello()'
+
  [[python]] -c '[[import (Python)|import]] your_function; print your_function.hello()'
  
 +
-c [[cmd]] : program passed in as string (terminates option list)
 +
 +
== Related ==
 +
* <code>[[SyntaxError: invalid syntax]]</code>
 +
* <code>[[ModuleNotFoundError: No module named (Python)]]</code>
 +
 +
== Activities ==
 +
* Read https://stackoverflow.com/questions/3987041/run-function-from-the-command-line
  
 
== See also ==
 
== See also ==

Latest revision as of 18:45, 11 April 2022

Advertising: