Hello
I'm using the APSW wrapper to SQLite, and I'm stuck at how to pass
data from a dictionary to the database which expects an integer:
#array filled by reading a two-column text file as input
for (isbn,carton) in data.items():
#TypeError: int argument required
sql = INSERT
On Thu, 23 Oct 2008 09:19:07 +0200, Gilles Ganault [EMAIL PROTECTED]
wrote:
I'm using the APSW wrapper to SQLite, and I'm stuck at how to pass
data from a dictionary to the database which expects an integer:
Found it: Apparently, this wrapper uses a different placeholder and
takes care of
Hi all, Another problem, with the same error (error: invalid literal for
int())
code:
mynums = 423.523.674.324.342.122.943.421.762.158.830
mynumArray = string.split(mynums,.)
x = 0
for nums in mynumArray:
if nums.isalnum() == true:
x = x + int(nums)
else:
print Error,
Am Sonntag 14 Mai 2006 22:23 schrieb Ognjen Bezanov:
mynums = 423.523.674.324.342.122.943.421.762.158.830
mynumArray = string.split(mynums,.)
This is the old way of using string functions using the module string. You
should only write this as:
mynumArray = mynums.split(.)
(using the string
Hi all, Another problem, with the same error (error: invalid literal for
int())
Having the actual code would be helpful...
code:
mynums = 423.523.674.324.342.122.943.421.762.158.830
mynumArray = string.split(mynums,.)
x = 0
for nums in mynumArray:
if nums.isalnum() == true: