Classes for Board Files (.brd)¶
These classes are used only within Eagle board files (.brd).
BoardFile¶
-
class
Swoop.
BoardFile
[source]¶ Bases:
Swoop.Swoop.EagleFile
Class representing the contents of a <eagle> tag in Eagle files.
Attributes:
version
Collections:
grid
: SingletonGrid
object.description
: SingletonDescription
object.designrules
: SingletonDesignrules
object.compatibility
: SingletonCompatibility
object.setting
: List ofSetting
objects.plain_element
: List ofPolygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
andHole
objects.approved
: List ofApproved
objects.layer
: Map ofLayer
objects indexed by theirnumber
.library
: Map ofLibrary
objects indexed by theirname
.attribute
: Map ofAttribute
objects indexed by theirname
.variantdef
: Map ofVariantdef
objects indexed by theirname
.class
: Map ofClass
objects indexed by theirname
.pass
: Map ofPass
objects indexed by theirname
.element
: Map ofElement
objects indexed by theirname
.signal
: Map ofSignal
objects indexed by theirname
.
-
add_approved
(s)[source]¶ Add a
Approved
to theapproved_errors
of thisBoardFile
.Parameters: s – The Approved
to add.Return type: self
-
add_attribute
(s)[source]¶ Add a
Attribute
to theattributes
of thisBoardFile
.Parameters: s – The Attribute
to add.Return type: self
-
add_class
(s)[source]¶ Add a
Class
to theclasses
of thisBoardFile
.Parameters: s – The Class
to add.Return type: self
-
add_element
(s)[source]¶ Add a
Element
to theelements
of thisBoardFile
.Parameters: s – The Element
to add.Return type: self
-
add_library
(s)[source]¶ Add a
Library
to thelibraries
of thisBoardFile
.Parameters: s – The Library
to add.Return type: self
-
add_pass
(s)[source]¶ Add a
Pass
to theautorouter_passes
of thisBoardFile
.Parameters: s – The Pass
to add.Return type: self
-
add_plain_element
(s)[source]¶ Add a
Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
to theplain_elements
of thisBoardFile
.Parameters: s – The Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
to add.Return type: self
-
add_setting
(s)[source]¶ Add a
Setting
to thesettings
of thisBoardFile
.Parameters: s – The Setting
to add.Return type: self
-
add_signal
(s)[source]¶ Add a
Signal
to thesignals
of thisBoardFile
.Parameters: s – The Signal
to add.Return type: self
-
add_variantdef
(s)[source]¶ Add a
Variantdef
to thevariantdefs
of thisBoardFile
.Parameters: s – The Variantdef
to add.Return type: self
-
clear_approved_errors
()[source]¶ Remove all the
Approved
objects from theapproved_errors
of thisBoardFile
.Return type: self
-
clear_attributes
()[source]¶ Remove all the
Attribute
objects from theattributes
of thisBoardFile
.Return type: self
-
clear_autorouter_passes
()[source]¶ Remove all the
Pass
objects from theautorouter_passes
of thisBoardFile
.Return type: self
-
clear_classes
()[source]¶ Remove all the
Class
objects from theclasses
of thisBoardFile
.Return type: self
-
clear_elements
()[source]¶ Remove all the
Element
objects from theelements
of thisBoardFile
.Return type: self
-
clear_libraries
()[source]¶ Remove all the
Library
objects from thelibraries
of thisBoardFile
.Return type: self
-
clear_plain_elements
()[source]¶ Remove all the
Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
andHole
objects from theplain_elements
of thisBoardFile
.Return type: self
-
clear_settings
()[source]¶ Remove all the
Setting
objects from thesettings
of thisBoardFile
.Return type: self
-
clear_signals
()[source]¶ Remove all the
Signal
objects from thesignals
of thisBoardFile
.Return type: self
-
clear_variantdefs
()[source]¶ Remove all the
Variantdef
objects from thevariantdefs
of thisBoardFile
.Return type: self
-
clone
()[source]¶ Recursively clone this
BoardFile
. It will be identical to the original, but it’s parent will beNone
.Return type: BoardFile
-
dump
(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indent
on recursive invocations.
Return type: None
-
get_approved_errors
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
approved_errors
list ofApproved
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Approved
objectsReturn type: List of
Approved
objects
-
get_attribute
(key)[source]¶ Lookup and return a
Attribute
from theattributes
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theAttribute
objects.Return type: A Attribute
object orNone
, if there is no such item.
-
get_attributes
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
attributes
map ofAttribute
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Attribute
objectsReturn type: List of
Attribute
objects
-
get_autorouter_passes
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
autorouter_passes
map ofPass
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Pass
objectsReturn type: List of
Pass
objects
-
get_children
()[source]¶ Get all the children of this
EagleFilePart
.Return type: List of EagleFilePart
objects
-
get_class
(key)[source]¶ Lookup and return a
Class
from theclasses
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theClass
objects.Return type: A Class
object orNone
, if there is no such item.
-
get_classes
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
classes
map ofClass
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Class
objectsReturn type: List of
Class
objects
-
get_compatibility
()[source]¶ Get the compatibility from this
BoardFile
.Return type: Compatibility
object
-
get_description
()[source]¶ Get the description from this
BoardFile
.Return type: Description
object
-
get_designrules
()[source]¶ Get the designrules from this
BoardFile
.Return type: Designrules
object
-
get_element
(key)[source]¶ Lookup and return a
Element
from theelements
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theElement
objects.Return type: A Element
object orNone
, if there is no such item.
-
get_elements
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
elements
map ofElement
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Element
objectsReturn type: List of
Element
objects
-
get_libraries
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
libraries
map ofLibrary
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Library
objectsReturn type: List of
Library
objects
-
get_library
(key)[source]¶ Lookup and return a
Library
from thelibraries
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theLibrary
objects.Return type: A Library
object orNone
, if there is no such item.
-
get_nth_approved
(n)[source]¶ get then nth
Approved
object from theapproved_errors
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Approved
object
-
get_nth_attribute
(n)[source]¶ get then nth
Attribute
object from theattributes
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Attribute
object
-
get_nth_class
(n)[source]¶ get then nth
Class
object from theclasses
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Class
object
-
get_nth_element
(n)[source]¶ get then nth
Element
object from theelements
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Element
object
-
get_nth_library
(n)[source]¶ get then nth
Library
object from thelibraries
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Library
object
-
get_nth_pass
(n)[source]¶ get then nth
Pass
object from theautorouter_passes
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Pass
object
-
get_nth_plain_element
(n)[source]¶ get then nth
Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
object from theplain_elements
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
object
-
get_nth_setting
(n)[source]¶ get then nth
Setting
object from thesettings
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Setting
object
-
get_nth_signal
(n)[source]¶ get then nth
Signal
object from thesignals
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Signal
object
-
get_nth_variantdef
(n)[source]¶ get then nth
Variantdef
object from thevariantdefs
of thisBoardFile
.Parameters: n – Index of the item to return. Return type: Variantdef
object
-
get_pass
(key)[source]¶ Lookup and return a
Pass
from theautorouter_passes
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of thePass
objects.Return type: A Pass
object orNone
, if there is no such item.
-
get_plain_elements
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
plain_elements
list ofPolygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
andHole
objectsReturn type: List of
Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
andHole
objects
-
get_settings
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
settings
list ofSetting
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Setting
objectsReturn type: List of
Setting
objects
-
get_signal
(key)[source]¶ Lookup and return a
Signal
from thesignals
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theSignal
objects.Return type: A Signal
object orNone
, if there is no such item.
-
get_signals
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
signals
map ofSignal
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Signal
objectsReturn type: List of
Signal
objects
-
get_variantdef
(key)[source]¶ Lookup and return a
Variantdef
from thevariantdefs
of thisBoardFile
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theVariantdef
objects.Return type: A Variantdef
object orNone
, if there is no such item.
-
get_variantdefs
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
variantdefs
map ofVariantdef
objects for thisBoardFile
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Variantdef
objectsReturn type: List of
Variantdef
objects
-
get_version
()[source]¶ Return the value of
version
for thisBoardFile
. This corresponds to theversion
attribute of a<eagle>
in an Eagle file.Return type: str
-
remove_approved
(efp)[source]¶ Remove a
Approved
from theapproved_errors
of thisBoardFile
.Parameters: efp – The Approved
object to remove.Return type: self
-
remove_attribute
(efp)[source]¶ Remove a
Attribute
from theattributes
of thisBoardFile
.Parameters: efp – The Attribute
object to remove.Return type: self
-
remove_child
(efp)[source]¶ Remove a child
EagleFilePart
object.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
remove_class
(efp)[source]¶ Remove a
Class
from theclasses
of thisBoardFile
.Parameters: efp – The Class
object to remove.Return type: self
-
remove_element
(efp)[source]¶ Remove a
Element
from theelements
of thisBoardFile
.Parameters: efp – The Element
object to remove.Return type: self
-
remove_library
(efp)[source]¶ Remove a
Library
from thelibraries
of thisBoardFile
.Parameters: efp – The Library
object to remove.Return type: self
-
remove_pass
(efp)[source]¶ Remove a
Pass
from theautorouter_passes
of thisBoardFile
.Parameters: efp – The Pass
object to remove.Return type: self
-
remove_plain_element
(efp)[source]¶ Remove a
Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
from theplain_elements
of thisBoardFile
.Parameters: efp – The Polygon
,Wire
,Text
,Dimension
,Circle
,Rectangle
,Frame
orHole
object to remove.Return type: self
-
remove_setting
(efp)[source]¶ Remove a
Setting
from thesettings
of thisBoardFile
.Parameters: efp – The Setting
object to remove.Return type: self
-
remove_signal
(efp)[source]¶ Remove a
Signal
from thesignals
of thisBoardFile
.Parameters: efp – The Signal
object to remove.Return type: self
-
remove_variantdef
(efp)[source]¶ Remove a
Variantdef
from thevariantdefs
of thisBoardFile
.Parameters: efp – The Variantdef
object to remove.Return type: self
-
set_compatibility
(s)[source]¶ Set the
Compatibility
for thisBoardFile
.Parameters: s – Compatibility
to set.Return type: self
-
set_description
(s)[source]¶ Set the
Description
for thisBoardFile
.Parameters: s – Description
to set.Return type: self
-
set_designrules
(s)[source]¶ Set the
Designrules
for thisBoardFile
.Parameters: s – Designrules
to set.Return type: self
-
set_version
(v)[source]¶ Set the value of
version
for thisBoardFile
. This corresponds to theversion
attribute of a<eagle>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
with_version
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofversion
. For use in combination withFrom
objects.Return
self
if one of the following is true:version
equalsv
v
is callable andv(self.get_version()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
Element¶
-
class
Swoop.
Element
[source]¶ Bases:
Swoop.Swoop.EagleFilePart
Class representing the contents of a <element> tag in Eagle files.
Attributes:
name
library
package
value
x
y
locked
populate
smashed
rot
Collections:
attribute
: Map ofAttribute
objects indexed by theirname
.
-
add_attribute
(s)[source]¶ Add a
Attribute
to theattributes
of thisElement
.Parameters: s – The Attribute
to add.Return type: self
-
clear_attributes
()[source]¶ Remove all the
Attribute
objects from theattributes
of thisElement
.Return type: self
-
clone
()[source]¶ Recursively clone this
Element
. It will be identical to the original, but it’s parent will beNone
.Return type: Element
-
dump
(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indent
on recursive invocations.
Return type: None
-
find_library
()[source]¶ Find the
Library
object refered to by thelibrary
attribute of this object. This is likeget_library()
, except it returns theLibrary
object instead of its name.Returns: The object Return type: Library
-
find_package
()[source]¶ Find the
Package
object refered to by thepackage
attribute of this object. This is likeget_package()
, except it returns thePackage
object instead of its name.Returns: The object Return type: Package
-
get_attribute
(key)[source]¶ Lookup and return a
Attribute
from theattributes
of thisElement
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theAttribute
objects.Return type: A Attribute
object orNone
, if there is no such item.
-
get_attributes
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
attributes
map ofAttribute
objects for thisElement
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Attribute
objectsReturn type: List of
Attribute
objects
-
get_children
()[source]¶ Get all the children of this
EagleFilePart
.Return type: List of EagleFilePart
objects
-
get_library
()[source]¶ Return the value of
library
for thisElement
. This corresponds to thelibrary
attribute of a<element>
in an Eagle file.Return type: str
-
get_locked
()[source]¶ Return the value of
locked
for thisElement
. This corresponds to thelocked
attribute of a<element>
in an Eagle file.Return type: bool
-
get_name
()[source]¶ Return the value of
name
for thisElement
. This corresponds to thename
attribute of a<element>
in an Eagle file.Return type: str
-
get_nth_attribute
(n)[source]¶ get then nth
Attribute
object from theattributes
of thisElement
.Parameters: n – Index of the item to return. Return type: Attribute
object
-
get_package
()[source]¶ Return the value of
package
for thisElement
. This corresponds to thepackage
attribute of a<element>
in an Eagle file.Return type: str
-
get_populate
()[source]¶ Return the value of
populate
for thisElement
. This corresponds to thepopulate
attribute of a<element>
in an Eagle file.Return type: bool
-
get_rot
()[source]¶ Return the value of
rot
for thisElement
. This corresponds to therot
attribute of a<element>
in an Eagle file.Return type: str
-
get_smashed
()[source]¶ Return the value of
smashed
for thisElement
. This corresponds to thesmashed
attribute of a<element>
in an Eagle file.Return type: str
-
get_value
()[source]¶ Return the value of
value
for thisElement
. This corresponds to thevalue
attribute of a<element>
in an Eagle file.Return type: str
-
get_x
()[source]¶ Return the value of
x
for thisElement
. This corresponds to thex
attribute of a<element>
in an Eagle file.Return type: float
-
get_y
()[source]¶ Return the value of
y
for thisElement
. This corresponds to they
attribute of a<element>
in an Eagle file.Return type: float
-
remove_attribute
(efp)[source]¶ Remove a
Attribute
from theattributes
of thisElement
.Parameters: efp – The Attribute
object to remove.Return type: self
-
remove_child
(efp)[source]¶ Remove a child
EagleFilePart
object.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
set_library
(v)[source]¶ Set the value of
library
for thisElement
. This corresponds to thelibrary
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_locked
(v)[source]¶ Set the value of
locked
for thisElement
. This corresponds to thelocked
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_name
(v)[source]¶ Set the value of
name
for thisElement
. This corresponds to thename
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_package
(v)[source]¶ Set the value of
package
for thisElement
. This corresponds to thepackage
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_populate
(v)[source]¶ Set the value of
populate
for thisElement
. This corresponds to thepopulate
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_rot
(v)[source]¶ Set the value of
rot
for thisElement
. This corresponds to therot
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_smashed
(v)[source]¶ Set the value of
smashed
for thisElement
. This corresponds to thesmashed
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_value
(v)[source]¶ Set the value of
value
for thisElement
. This corresponds to thevalue
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_x
(v)[source]¶ Set the value of
x
for thisElement
. This corresponds to thex
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_y
(v)[source]¶ Set the value of
y
for thisElement
. This corresponds to they
attribute of a<element>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
with_library
(v)[source]¶ Filter this
EagleFilePart
object based on the value oflibrary
. For use in combination withFrom
objects.Return
self
if one of the following is true:library
equalsv
v
is callable andv(self.get_library()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_locked
(v)[source]¶ Filter this
EagleFilePart
object based on the value oflocked
. For use in combination withFrom
objects.Return
self
if one of the following is true:locked
equalsv
v
is callable andv(self.get_locked()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_name
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofname
. For use in combination withFrom
objects.Return
self
if one of the following is true:name
equalsv
v
is callable andv(self.get_name()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_package
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofpackage
. For use in combination withFrom
objects.Return
self
if one of the following is true:package
equalsv
v
is callable andv(self.get_package()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_populate
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofpopulate
. For use in combination withFrom
objects.Return
self
if one of the following is true:populate
equalsv
v
is callable andv(self.get_populate()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_rot
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofrot
. For use in combination withFrom
objects.Return
self
if one of the following is true:rot
equalsv
v
is callable andv(self.get_rot()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_smashed
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofsmashed
. For use in combination withFrom
objects.Return
self
if one of the following is true:smashed
equalsv
v
is callable andv(self.get_smashed()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_value
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofvalue
. For use in combination withFrom
objects.Return
self
if one of the following is true:value
equalsv
v
is callable andv(self.get_value()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_x
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofx
. For use in combination withFrom
objects.Return
self
if one of the following is true:x
equalsv
v
is callable andv(self.get_x()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_y
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofy
. For use in combination withFrom
objects.Return
self
if one of the following is true:y
equalsv
v
is callable andv(self.get_y()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
Contactref¶
-
class
Swoop.
Contactref
[source]¶ Bases:
Swoop.Swoop.EagleFilePart
Class representing the contents of a <contactref> tag in Eagle files.
Attributes:
element
pad
route
routetag
-
clone
()[source]¶ Recursively clone this
Contactref
. It will be identical to the original, but it’s parent will beNone
.Return type: Contactref
-
dump
(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indent
on recursive invocations.
Return type: None
-
find_element
()[source]¶ Find the
Element
object refered to by theelement
attribute of this object. This is likeget_element()
, except it returns theElement
object instead of its name.Returns: The object Return type: Element
-
find_pad
()[source]¶ Find the
Pad
object refered to by thepad
attribute of this object. This is likeget_pad()
, except it returns thePad
object instead of its name.Returns: The object Return type: Pad
-
get_children
()[source]¶ Get all the children of this
EagleFilePart
.Return type: List of EagleFilePart
objects
-
get_element
()[source]¶ Return the value of
element
for thisContactref
. This corresponds to theelement
attribute of a<contactref>
in an Eagle file.Return type: str
-
get_et
()[source]¶ Generate a <contactref> element tree for a
Contactref
.Return type: ElementTree
.
-
get_pad
()[source]¶ Return the value of
pad
for thisContactref
. This corresponds to thepad
attribute of a<contactref>
in an Eagle file.Return type: str
-
get_route
()[source]¶ Return the value of
route
for thisContactref
. This corresponds to theroute
attribute of a<contactref>
in an Eagle file.Return type: str
-
get_routetag
()[source]¶ Return the value of
routetag
for thisContactref
. This corresponds to theroutetag
attribute of a<contactref>
in an Eagle file.Return type: str
-
remove_child
(efp)[source]¶ Remove a child
EagleFilePart
object.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
set_element
(v)[source]¶ Set the value of
element
for thisContactref
. This corresponds to theelement
attribute of a<contactref>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_pad
(v)[source]¶ Set the value of
pad
for thisContactref
. This corresponds to thepad
attribute of a<contactref>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_route
(v)[source]¶ Set the value of
route
for thisContactref
. This corresponds to theroute
attribute of a<contactref>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_routetag
(v)[source]¶ Set the value of
routetag
for thisContactref
. This corresponds to theroutetag
attribute of a<contactref>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
with_element
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofelement
. For use in combination withFrom
objects.Return
self
if one of the following is true:element
equalsv
v
is callable andv(self.get_element()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_pad
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofpad
. For use in combination withFrom
objects.Return
self
if one of the following is true:pad
equalsv
v
is callable andv(self.get_pad()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_route
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofroute
. For use in combination withFrom
objects.Return
self
if one of the following is true:route
equalsv
v
is callable andv(self.get_route()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_routetag
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofroutetag
. For use in combination withFrom
objects.Return
self
if one of the following is true:routetag
equalsv
v
is callable andv(self.get_routetag()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
Pass¶
-
class
Swoop.
Pass
[source]¶ Bases:
Swoop.Swoop.EagleFilePart
Class representing the contents of a <pass> tag in Eagle files.
Attributes:
name
refer
active
Collections:
param
: Map ofParam
objects indexed by theirname
.
-
add_param
(s)[source]¶ Add a
Param
to theparams
of thisPass
.Parameters: s – The Param
to add.Return type: self
-
clone
()[source]¶ Recursively clone this
Pass
. It will be identical to the original, but it’s parent will beNone
.Return type: Pass
-
dump
(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indent
on recursive invocations.
Return type: None
-
get_active
()[source]¶ Return the value of
active
for thisPass
. This corresponds to theactive
attribute of a<pass>
in an Eagle file.Return type: str
-
get_children
()[source]¶ Get all the children of this
EagleFilePart
.Return type: List of EagleFilePart
objects
-
get_name
()[source]¶ Return the value of
name
for thisPass
. This corresponds to thename
attribute of a<pass>
in an Eagle file.Return type: str
-
get_nth_param
(n)[source]¶ get then nth
Param
object from theparams
of thisPass
.Parameters: n – Index of the item to return. Return type: Param
object
-
get_param
(key)[source]¶ Lookup and return a
Param
from theparams
of thisPass
.Parameters: key – A str
to use for the lookup. The lookup uses thename
of theParam
objects.Return type: A Param
object orNone
, if there is no such item.
-
get_params
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
params
map ofParam
objects for thisPass
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Param
objectsReturn type: List of
Param
objects
-
get_refer
()[source]¶ Return the value of
refer
for thisPass
. This corresponds to therefer
attribute of a<pass>
in an Eagle file.Return type: str
-
remove_child
(efp)[source]¶ Remove a child
EagleFilePart
object.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
remove_param
(efp)[source]¶ Remove a
Param
from theparams
of thisPass
.Parameters: efp – The Param
object to remove.Return type: self
-
set_active
(v)[source]¶ Set the value of
active
for thisPass
. This corresponds to theactive
attribute of a<pass>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_name
(v)[source]¶ Set the value of
name
for thisPass
. This corresponds to thename
attribute of a<pass>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_refer
(v)[source]¶ Set the value of
refer
for thisPass
. This corresponds to therefer
attribute of a<pass>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
with_active
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofactive
. For use in combination withFrom
objects.Return
self
if one of the following is true:active
equalsv
v
is callable andv(self.get_active()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_name
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofname
. For use in combination withFrom
objects.Return
self
if one of the following is true:name
equalsv
v
is callable andv(self.get_name()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_refer
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofrefer
. For use in combination withFrom
objects.Return
self
if one of the following is true:refer
equalsv
v
is callable andv(self.get_refer()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
Signal¶
-
class
Swoop.
Signal
[source]¶ Bases:
Swoop.Swoop.EagleFilePart
Class representing the contents of a <signal> tag in Eagle files.
Attributes:
name
class
airwireshidden
Collections:
contactref
: List ofContactref
objects.polygon
: List ofPolygon
objects.wire
: List ofWire
objects.via
: List ofVia
objects.
-
add_contactref
(s)[source]¶ Add a
Contactref
to thecontactrefs
of thisSignal
.Parameters: s – The Contactref
to add.Return type: self
-
add_polygon
(s)[source]¶ Add a
Polygon
to thepolygons
of thisSignal
.Parameters: s – The Polygon
to add.Return type: self
-
add_via
(s)[source]¶ Add a
Via
to thevias
of thisSignal
.Parameters: s – The Via
to add.Return type: self
-
add_wire
(s)[source]¶ Add a
Wire
to thewires
of thisSignal
.Parameters: s – The Wire
to add.Return type: self
-
clear_contactrefs
()[source]¶ Remove all the
Contactref
objects from thecontactrefs
of thisSignal
.Return type: self
-
clear_polygons
()[source]¶ Remove all the
Polygon
objects from thepolygons
of thisSignal
.Return type: self
-
clone
()[source]¶ Recursively clone this
Signal
. It will be identical to the original, but it’s parent will beNone
.Return type: Signal
-
dump
(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indent
on recursive invocations.
Return type: None
-
find_class
()[source]¶ Find the
Class
object refered to by thenetclass
attribute of this object. This is likeget_netclass()
, except it returns theClass
object instead of its name.Returns: The object Return type: Class
Return the value of
airwireshidden
for thisSignal
. This corresponds to theairwireshidden
attribute of a<signal>
in an Eagle file.Return type: bool
-
get_children
()[source]¶ Get all the children of this
EagleFilePart
.Return type: List of EagleFilePart
objects
-
get_class
()[source]¶ Return the value of
netclass
for thisSignal
. This corresponds to thenetclass
attribute of a<signal>
in an Eagle file.Return type: str
-
get_contactrefs
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
contactrefs
list ofContactref
objects for thisSignal
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Contactref
objectsReturn type: List of
Contactref
objects
-
get_name
()[source]¶ Return the value of
name
for thisSignal
. This corresponds to thename
attribute of a<signal>
in an Eagle file.Return type: str
-
get_nth_contactref
(n)[source]¶ get then nth
Contactref
object from thecontactrefs
of thisSignal
.Parameters: n – Index of the item to return. Return type: Contactref
object
-
get_nth_polygon
(n)[source]¶ get then nth
Polygon
object from thepolygons
of thisSignal
.Parameters: n – Index of the item to return. Return type: Polygon
object
-
get_nth_via
(n)[source]¶ get then nth
Via
object from thevias
of thisSignal
.Parameters: n – Index of the item to return. Return type: Via
object
-
get_nth_wire
(n)[source]¶ get then nth
Wire
object from thewires
of thisSignal
.Parameters: n – Index of the item to return. Return type: Wire
object
-
get_polygons
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
polygons
list ofPolygon
objects for thisSignal
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Polygon
objectsReturn type: List of
Polygon
objects
-
get_vias
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
vias
list ofVia
objects for thisSignal
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Via
objectsReturn type: List of
Via
objects
-
get_wires
(attrs=None, type=None)[source]¶ Return (and possibly filter) items in the the
wires
list ofWire
objects for thisSignal
.This functions provides a mechanism for filtering the items as well. The keys in
attrs
are taken as attributes names and the values are requested values. Items in the list that have all the requested values for the corresponding attributes will be returned.A if
type
is notNone
, the item will match if it is an instance of the type provided.Parameters: - attrs – A set of key-value pairs that represent a filter to apply to the item’s attributes.
- type – A type to filter on. Only items that are an instance of this type will be returned.
Returns: A List of
Wire
objectsReturn type: List of
Wire
objects
-
remove_child
(efp)[source]¶ Remove a child
EagleFilePart
object.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
remove_contactref
(efp)[source]¶ Remove a
Contactref
from thecontactrefs
of thisSignal
.Parameters: efp – The Contactref
object to remove.Return type: self
-
remove_polygon
(efp)[source]¶ Remove a
Polygon
from thepolygons
of thisSignal
.Parameters: efp – The Polygon
object to remove.Return type: self
-
remove_via
(efp)[source]¶ Remove a
Via
from thevias
of thisSignal
.Parameters: efp – The Via
object to remove.Return type: self
-
remove_wire
(efp)[source]¶ Remove a
Wire
from thewires
of thisSignal
.Parameters: efp – The Wire
object to remove.Return type: self
Set the value of
airwireshidden
for thisSignal
. This corresponds to theairwireshidden
attribute of a<signal>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_class
(v)[source]¶ Set the value of
netclass
for thisSignal
. This corresponds to thenetclass
attribute of a<signal>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_name
(v)[source]¶ Set the value of
name
for thisSignal
. This corresponds to thename
attribute of a<signal>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
Filter this
EagleFilePart
object based on the value ofairwireshidden
. For use in combination withFrom
objects.Return
self
if one of the following is true:airwireshidden
equalsv
v
is callable andv(self.get_airwireshidden()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_class
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofnetclass
. For use in combination withFrom
objects.Return
self
if one of the following is true:netclass
equalsv
v
is callable andv(self.get_class()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_name
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofname
. For use in combination withFrom
objects.Return
self
if one of the following is true:name
equalsv
v
is callable andv(self.get_name()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
Via¶
-
class
Swoop.
Via
[source]¶ Bases:
Swoop.Swoop.EagleFilePart
Class representing the contents of a <via> tag in Eagle files.
Attributes:
x
y
extent
drill
diameter
shape
alwaysstop
-
clone
()[source]¶ Recursively clone this
Via
. It will be identical to the original, but it’s parent will beNone
.Return type: Via
-
dump
(indent='', increment=' ')[source]¶ Recursive debug dump.
Parameters: - indent – Indentation string. The output will be indented by this much.
- increment – This will be appendeded to
indent
on recursive invocations.
Return type: None
-
get_alwaysstop
()[source]¶ Return the value of
alwaysstop
for thisVia
. This corresponds to thealwaysstop
attribute of a<via>
in an Eagle file.Return type: bool
-
get_children
()[source]¶ Get all the children of this
EagleFilePart
.Return type: List of EagleFilePart
objects
-
get_diameter
()[source]¶ Return the value of
diameter
for thisVia
. This corresponds to thediameter
attribute of a<via>
in an Eagle file.Return type: float
-
get_drill
()[source]¶ Return the value of
drill
for thisVia
. This corresponds to thedrill
attribute of a<via>
in an Eagle file.Return type: float
-
get_extent
()[source]¶ Return the value of
extent
for thisVia
. This corresponds to theextent
attribute of a<via>
in an Eagle file.Return type: str
-
get_shape
()[source]¶ Return the value of
shape
for thisVia
. This corresponds to theshape
attribute of a<via>
in an Eagle file.Return type: str
-
get_x
()[source]¶ Return the value of
x
for thisVia
. This corresponds to thex
attribute of a<via>
in an Eagle file.Return type: float
-
get_y
()[source]¶ Return the value of
y
for thisVia
. This corresponds to they
attribute of a<via>
in an Eagle file.Return type: float
-
remove_child
(efp)[source]¶ Remove a child
EagleFilePart
object.Parameters: efp – the class:EagleFilePart object to remove. Returns: Nothing
-
set_alwaysstop
(v)[source]¶ Set the value of
alwaysstop
for thisVia
. This corresponds to thealwaysstop
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_diameter
(v)[source]¶ Set the value of
diameter
for thisVia
. This corresponds to thediameter
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_drill
(v)[source]¶ Set the value of
drill
for thisVia
. This corresponds to thedrill
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_extent
(v)[source]¶ Set the value of
extent
for thisVia
. This corresponds to theextent
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_shape
(v)[source]¶ Set the value of
shape
for thisVia
. This corresponds to theshape
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_x
(v)[source]¶ Set the value of
x
for thisVia
. This corresponds to thex
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
set_y
(v)[source]¶ Set the value of
y
for thisVia
. This corresponds to they
attribute of a<via>
in an Eagle file.Parameters: v – EagleFilePart
to set.Return type: self
-
with_alwaysstop
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofalwaysstop
. For use in combination withFrom
objects.Return
self
if one of the following is true:alwaysstop
equalsv
v
is callable andv(self.get_alwaysstop()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_diameter
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofdiameter
. For use in combination withFrom
objects.Return
self
if one of the following is true:diameter
equalsv
v
is callable andv(self.get_diameter()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_drill
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofdrill
. For use in combination withFrom
objects.Return
self
if one of the following is true:drill
equalsv
v
is callable andv(self.get_drill()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_extent
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofextent
. For use in combination withFrom
objects.Return
self
if one of the following is true:extent
equalsv
v
is callable andv(self.get_extent()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_shape
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofshape
. For use in combination withFrom
objects.Return
self
if one of the following is true:shape
equalsv
v
is callable andv(self.get_shape()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_x
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofx
. For use in combination withFrom
objects.Return
self
if one of the following is true:x
equalsv
v
is callable andv(self.get_x()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone
-
with_y
(v)[source]¶ Filter this
EagleFilePart
object based on the value ofy
. For use in combination withFrom
objects.Return
self
if one of the following is true:y
equalsv
v
is callable andv(self.get_y()
isTrue
This is useful in combination with
From
object.Parameters: t – The value to check for or a callable object. Returns: self
if the criteria above are met andNone
otherwise.Return type: EagelFilePart
orNone