Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. """adodbapi - A python DB API 2.0 (PEP 249) interface to Microsoft ADO
  2. Copyright (C) 2002 Henrik Ekelund, version 2.1 by Vernon Cole
  3. * http://sourceforge.net/projects/adodbapi
  4. """
  5. import sys
  6. import time
  7. from .adodbapi import Connection, Cursor, __version__, connect, dateconverter
  8. from .apibase import (
  9. BINARY,
  10. DATETIME,
  11. NUMBER,
  12. ROWID,
  13. STRING,
  14. DatabaseError,
  15. DataError,
  16. Error,
  17. FetchFailedError,
  18. IntegrityError,
  19. InterfaceError,
  20. InternalError,
  21. NotSupportedError,
  22. OperationalError,
  23. ProgrammingError,
  24. Warning,
  25. apilevel,
  26. paramstyle,
  27. threadsafety,
  28. )
  29. def Binary(aString):
  30. """This function constructs an object capable of holding a binary (long) string value."""
  31. return bytes(aString)
  32. def Date(year, month, day):
  33. "This function constructs an object holding a date value."
  34. return dateconverter.Date(year, month, day)
  35. def Time(hour, minute, second):
  36. "This function constructs an object holding a time value."
  37. return dateconverter.Time(hour, minute, second)
  38. def Timestamp(year, month, day, hour, minute, second):
  39. "This function constructs an object holding a time stamp value."
  40. return dateconverter.Timestamp(year, month, day, hour, minute, second)
  41. def DateFromTicks(ticks):
  42. """This function constructs an object holding a date value from the given ticks value
  43. (number of seconds since the epoch; see the documentation of the standard Python time module for details).
  44. """
  45. return Date(*time.gmtime(ticks)[:3])
  46. def TimeFromTicks(ticks):
  47. """This function constructs an object holding a time value from the given ticks value
  48. (number of seconds since the epoch; see the documentation of the standard Python time module for details).
  49. """
  50. return Time(*time.gmtime(ticks)[3:6])
  51. def TimestampFromTicks(ticks):
  52. """This function constructs an object holding a time stamp value from the given
  53. ticks value (number of seconds since the epoch;
  54. see the documentation of the standard Python time module for details)."""
  55. return Timestamp(*time.gmtime(ticks)[:6])
  56. version = "adodbapi v" + __version__