It's all there:
http://docs.python.org/lib/module-sqlite3.html
Thomas
--
sinature: http://nospam.nowire.org/signature_usenet.png
--
http://mail.python.org/mailman/listinfo/python-list
Tina I schrieb:
> Now, this works but of course it catches every IOError, and I can not
> figure out how to restrict it to only catch the "[Errno 2]"?
There's an example that uses the error number:
http://docs.python.org/tut/node10.html#SECTION001030
Thomas
--
sinature: http://
[EMAIL PROTECTED]:
> Any suggestions on a different approach or fix?
Check your commandline! The second command is wrong, -C is not valid as
the only option, a command is missing.
If you just want to archive files in a tarball try: "tar -c * > dst.tar"
or take a look at Python's tarfile lib.
Thom
desktop schrieb:
> I have found a code example with this loop.
>
> for k in range(10, 25):
> n = 1 << k;
>
>
> I have never read Python before but is it correct that 1 get multiplied
> with the numbers 10,11,12,12,...,25 assuming that 1 << k means "1 shift
> left by k" which is the same as
adima schrieb:
> str = DoTestTime(EachFile)
^^^
> print type(str)
> for s in str:
> print s
> out.write(str(s))
^^^
> Where is the problem here?
> Thanks in advan
Dag schrieb:
> I have a problem which is probaly very simple to solve, but I can't
> find a nice solution.
> I have the following code
>
> class Test:
> def __init__(self):
> self.a=[1,2,3,4]
> self.b=self.a
> def swap(self):
> self.a[0],self.a[3]=self.a[3],self.a[
DE schrieb:
> Hello,
>
> Here is what I do in C++ and can not right now in python :
>
> pushMatrix()
> {
> drawStuff();
>
> pushMatrix();
> {
> drawSomeOtherStuff()
> }
> popMatrix();
> }
> popMatrix();
>
> The curly brackets have no functional meaning but i
Eric Price schrieb:
> up = os.system("uptime")
> How do I assign the output of "uptime" to the variable "up"?
| >>> print os.system.__doc__
| system(command) -> exit_status
|
| Execute the command (a string) in a subshell.
os.system returns the exitcode of the given command. To get the output
try
Rehceb Rotkiv schrieb:
> can I sort a multidimensional array in Python by multiple sort keys? A
> litte code sample would be nice!
You can pass a function as argument to the sort method of a list.
The function should take two arguments and return -1, 0 or 1 as
comparison result. Just like the cmp
Alex Martelli schrieb:
> Thomas Krüger <[EMAIL PROTECTED]> wrote:
>> def sorter(a, b):
>> return cmp(a.id, b.id)
>>
>> obj_lst.sort(sorter)
>
> A MUCH better way to obtain exactly the same semantics would be:
>
> def getid(a):
> return a.id
Ben schrieb:
> I'm looking for a web application framework with a good interface to
> PostgreSQL.
You may check out Django: http://www.djangoproject.com/
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
Steve schrieb:
> I've created a Python program that a user enteres one line of text which
> will then create an acronym from that text.
>
> What I want to add to the program is the abilty to rerun this process
> (where the user enteres another line of text) until the user has had
> enough and ente
Chris Lasher schrieb:
> why should we NOT be
> placing classes in their own separate files?
>
> Thoughts, comments, and insight much appreciated,
At first: if he really like it he can place every class in a single
file. But there are some reasons why Python "allows" you to place many
classes in o
Lorenzo Mainardi schrieb:
> I bought a very small embedded card, with a MIPS processor, running
> Linux. So, I would to use Python on that; I checked on python.org, but I
> did'nt find any release for this architecture. Could you help me?
How about compiling it from source?
Thomas
--
http://mail
Christoph Krammer schrieb:
> for image in images:
> if (image[0:3] == 'GIF'):
> (si, so, se) = os.popen3('giftopnm -image=all', 'b')
> si.write(image)
> frame = so.readlines()
>
> But with this code the script just hangs. When I interrupt the script,
> I get the following er
[EMAIL PROTECTED] schrieb:
> html.LoadPage("
> http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html";)
Quickshot: There's a space at the start of your URI.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
Jimmy E Touma schrieb:
> I need some advise on doing the following. I have a Linux application
> that allows users to access it via a code (password). At the end of the
> day, I gather a log of activities of the users and zip the file and
> would like to encrypt it so that the users can not access
人言落日是天涯,望极天涯不见家 schrieb:
> Is there a simple function to generate a list like ['a', 'b', 'c', ...
> 'z']? The range() just can generate the numeric list.
There is:
[ chr(i) for i in range(97, 123) ]
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
Godzilla schrieb:
> I have been using the queue module for a multithreaded environment and
> things seem to work well... until we had a requirement for the
> application to be able to time sync to the server. With the time sync,
> it actually disorientated the timeout in the queue's get() method...
[EMAIL PROTECTED] schrieb:
> while (True):
> pass
> Does anyone know how to run this without consuming all CPU.
Your while loop is taking all the CPU time.
Thomas
--
sinature: http://nospam.nowire.org/signature_usenet.png
--
http://mail.python.org/mailman/listinfo/python-list
Chaz Ginger schrieb:
> I am writing a distributed server system using Python. I need to support
> authentication and was wondering what approaches are available under
> Python and what are the best practices.
Well, there are many ways of client authentication. To narrow it down it
would be nice if
Thomas Krüger schrieb:
> Many protocols support an additional SSL/TLS-Layers (e.g. HTTP ->
> HTTPS). There you can use SSL certificate authentication. It may
> berequired to set up a small CA, but done right it is pretty secure.
I missed the best:
The Twisted framework has SSL au
22 matches
Mail list logo