<s> import subprocess <EOL> try : <EOL> from urllib . parse import quote <EOL> except ImportError : <EOL> from urllib import quote <EOL> from plyer . facades import Email <EOL> from plyer . utils import whereis_exe <EOL> class MacOSXEmail ( Email ) : <EOL> def _send ( self , ** kwargs ) : <EOL> recipient = kwargs . get ( '<STR_LIT>' ) <EOL> subject = kwargs . get ( '<STR_LIT>' ) <EOL> text = kwargs . get ( '<STR_LIT:text>' ) <EOL> uri = "<STR_LIT>" <EOL> if recipient : <EOL> uri += str ( recipient ) <EOL> if subject : <EOL> uri += "<STR_LIT:?>" if not "<STR_LIT:?>" in uri else "<STR_LIT:&>" <EOL> uri += "<STR_LIT>" <EOL> uri += quote ( str ( subject ) ) <EOL> if text : <EOL> uri += "<STR_LIT:?>" if not "<STR_LIT:?>" in uri else "<STR_LIT:&>" <EOL> uri += "<STR_LIT>" <EOL> uri += quote ( str ( text ) ) <EOL> subprocess . Popen ( [ "<STR_LIT>" , uri ] ) <EOL> def instance ( ) : <EOL> import sys <EOL> if whereis_exe ( '<STR_LIT>' ) : <EOL> return MacOSXEmail ( ) <EOL> sys . stderr . write ( "<STR_LIT>" ) <EOL> return Email ( ) </s>
