Difference between revisions of "From (Python)"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
* https://www.w3schools.com/python/ref_keyword_from.asp
 
* https://www.w3schools.com/python/ref_keyword_from.asp
 +
* https://docs.python.org/3/reference/import.html
  
  
Line 8: Line 9:
  
 
  from [[logging.handlers]] import TimedRotatingFileHandler
 
  from [[logging.handlers]] import TimedRotatingFileHandler
 +
 +
* [[from dashing]]
  
 
  from datetime import *
 
  from datetime import *
 
  #Not recommended according to https://stackoverflow.com/a/710603
 
  #Not recommended according to https://stackoverflow.com/a/710603
  
  from os import open as open_
+
  from [[os]] import open as open_
 
  # lets you use os.open without destroying the  
 
  # lets you use os.open without destroying the  
 
  # built in open() which returns [[file handles]].
 
  # built in open() which returns [[file handles]].
 
  # https://stackoverflow.com/a/9439518
 
  # https://stackoverflow.com/a/9439518
 +
 +
== Errors ==
 +
* <code>[[ImportError: attempted relative import with no known parent package]]</code>
  
 
== Related terms ==
 
== Related terms ==
Line 22: Line 28:
 
* [[Method]]
 
* [[Method]]
 
* <code>[[from .]]XXXXX</code>
 
* <code>[[from .]]XXXXX</code>
* <code>[[ImportError: attempted relative import with no known parent package]]</code>
 
  
 
== Activities ==
 
== Activities ==
Line 28: Line 33:
  
 
== See also ==
 
== See also ==
 +
* {{from}}
 +
* {{import}}
 
* {{Python}}
 
* {{Python}}
  
 
[[Category:Python]]
 
[[Category:Python]]

Latest revision as of 17:31, 11 April 2024

Advertising: