Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    dba 0.5.1

    Download button

    No screenshots available
    Downloads: 132  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Olligobber | More programs
    Creative Commons Att... / FREE
    September 4th, 2012, 13:39 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    dba description

    For dealing with Decimal, Binary and Ascii

    dba is a Python module used for simple tasks to do with Deciaml, Binary and Ascii data. This module was created by Olligobber, at http://sirolligobbervii.zxq.net/ It is not to be modified, and may only be used when attributed to its creator. For more information on the license visit http://sirolligobbervii.zxq.net/Programming/dba/

    Installation

    Please ensure you are running Python 2.7 or better. Ensure you have extravted the files from the .tar.gz file.

    Run the standard command: python setup.py install

    To do this, open terminal, cmd, or your nearest equivalent. Navigate using cd to the location of the extracted files. Run the command above.

    If you are runnng on windows, and the above does not work, try: setup.py install

    Use

    This module comes with 12 functions, and each one is used slightly differently.

    Some functions require an Ascii.txt file, which can be downloaded from http://sirolligobbervii.zxq.net/Programming/Ascii/

    < isb > This function detects whether an input is a binary number or not.

    It is called as follows: dba.isb(bin, [fraction])

    The function returns nothing, but will raise various errors. The input must be convertable into a string, and contain only '0's, '1's and '.'s, and no more than one '.'.

    The fraction part of the input is by default true, but when set false will not allow and '.'s to be inputed, thus rejecting fractional inputs.

    < isd > This function detects whether an input is decimal or not.

    It is called as follows: dba.isd(dec, [fraction])

    The function returns nothing, but will raise various errors. The input must be convertable into a float, or will raise an error.

    The fraction part of the input is by default true, but when set false will attempt to convert the input into an integer, thus rejecting fractional inputs.

    < ar > This function returns a string value of each Ascii character used, in order from 0 to 255.

    It is called as follows: dba.ar()

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    < isa > This function detects whether an input is made entirely of Ascii characters.

    It is called as follows: dba.isa(asc, [limit])

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    The function returns nothing, but will raise various errors. The input must be convertable into a string value, and must only contain the Ascii characters in Ascii.txt.

    The limit part of the input is used to limit inputs, and is by default false. However, when set to an integer, it will raise an error is the input has more characters than the limit.

    < bd > This function converts a binary input into a decimal output.

    It is called as follows: dba.bd(bin)

    The input is checked with the isb module, and supports fractional inputs, and extra zeros on the start and end.

    The output is a float value.

    < db > This function converts a decimal input into a binary output.

    It is called as follows: dba.db(dec, [minlen])

    The input is checked using isd, and supports fractional inputs, and extra zeroes on the start and end.

    The output is a string value.

    The minlen part of the input is used to set a minimum length of outputs, so if the output is shorter than the minlen, additional zeroes are added to the front.

    < da > This function converts a decimal input into a single Ascii character.

    It is called as follows: dba.da(dec)

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    The input is checked using isd, and must be an integer between 0 and 255 inclusive.

    The output is a single Ascii character in string format.

    < ad > This function converts a single Ascii character into a decimal number.

    It is called as follows: dba.ad(asc)

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    The input is checked using isa, and must be exactly one character.

    Output is a decimal number in integer form.

    < ba > This function converts a binary input into Ascii characters.

    It is called as follows: dba.ba(bin)

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    The input is checked using isb, and may not be a fraction, but may be any length.

    The output is Ascii characters in string format.

    < ab > This function converts an Ascii input into binary.

    It is called as follows: dba.ab(asc)

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    Input is checked using isa, and may be any length.

    Output is binary in string format.

    < dda > This function converts any decimal number into Ascii characters.

    It is calles as follows: dba.dda(dec)

    The input is checked using isd, and may not be a fraction, but may be any integer.

    The output is Ascii characters in string format.

    < add > This function converts Ascii characters into a decimal number.

    It is called as follows: dba.add(asc)

    This function requires any program using it to have the Ascii.txt file mentioned above to be in the same directory as the top program.

    Input is checked using isa, and may not be longer than 6 characters, otherwise the output will be rounded.

    The output is a decimal number in float format.

    Suggestions

    Suggestions may be submitted on http://sirolligobbervii.zxq.net/


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Fixed a bug with dba.ba(bin)

      


    TAGS:

    Deciaml tasks | Ascii data | Python library | Decimal | Binary | Ascii

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM