phystricks
Classes | Functions
phystricks.src.NoMathUtilities Namespace Reference

Classes

class  SubdirectoryFilenames
 

Functions

def text_to_hexdigest (text)
 This is part of the module phystricks. More...
 
def first_bracket (text)
 
def ensure_unicode (s)
 
def ensure_str (s)
 
def logging (text, pspict=None)
 

Function Documentation

def phystricks.src.NoMathUtilities.ensure_str (   s)
Return a 'str' object that represents 's'. 
No conversion if 's' is already str.

unicode->str (via s.encode("utf8"))
str->str (identity map)
def phystricks.src.NoMathUtilities.ensure_unicode (   s)
Return a 'unicode' object that represents 's'. 
No conversion if 's' is already unicode.

str->unicode (via s.decode("utf8"))
unicode->unicode (identity map)
def phystricks.src.NoMathUtilities.first_bracket (   text)
return the first bracket in the string 'text'  
def phystricks.src.NoMathUtilities.logging (   text,
  pspict = None 
)
def phystricks.src.NoMathUtilities.text_to_hexdigest (   text)

This is part of the module phystricks.

phystricks is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

phystricks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with phystricks.py. If not, see http://www.gnu.org/licenses/.

Return the sha1 hexdigest of a text.

The point of this function is to take care about the fact
that the hashlib wants 'str', not 'unicode'