Re: [Tutor] Getting at sqlite schema info from within Python?

2007-06-25 Thread Terry Carroll
On Tue, 26 Jun 2007, John Fouhy wrote: > On 26/06/07, Terry Carroll <[EMAIL PROTECTED]> wrote: > > > > Is there any way of getting to the schema of an sqlite database from > > within Python? In particular, a list of tables in the DB. > > Try 'select * from sqlite_master'. You rock. Thanks. And

Re: [Tutor] Getting at sqlite schema info from within Python?

2007-06-25 Thread John Fouhy
On 26/06/07, Terry Carroll <[EMAIL PROTECTED]> wrote: > > Is there any way of getting to the schema of an sqlite database from > within Python? In particular, a list of tables in the DB. Try 'select * from sqlite_master'. -- John. ___ Tutor maillist -

[Tutor] Getting at sqlite schema info from within Python?

2007-06-25 Thread Terry Carroll
Is there any way of getting to the schema of an sqlite database from within Python? In particular, a list of tables in the DB. >From the sqlite command line, I can use the sqlite .tables command to get a list of tables in the database; and then the PRAGMA TABLE_INFO(tablename) to get the

Re: [Tutor] Bundle help!

2007-06-25 Thread Reed O'Brien
On Jun 25, 2007, at 9:56 PM, Sara Johnson wrote: I'm to use the bundle method to append some information to a list. I have no idea how to do that! I have Python for Dummies and I think I need Python for Complete Idiots because I am not seeing how to do this!! I have basic C+ knowledge a

Re: [Tutor] Bundle help!

2007-06-25 Thread Kent Johnson
Sara Johnson wrote: > I'm to use the bundle method to append some information to a list. I > have no idea how to do that! What is the bundle method? What have you tried so far? What are you trying to accomplish? Kent ___ Tutor maillist - Tutor@pyth

[Tutor] Bundle help!

2007-06-25 Thread Sara Johnson
I'm to use the bundle method to append some information to a list. I have no idea how to do that! I have Python for Dummies and I think I need Python for Complete Idiots because I am not seeing how to do this!! I have basic C+ knowledge and about 6 programs to write (in one month's time!) and

Re: [Tutor] Fastest way to iterate through a file

2007-06-25 Thread Kent Johnson
Robert Hicks wrote: > I have a script at work where I have a list of id numbers and I am doing a: > > for line in ehFile: That is fine > for id in line: I don't know what this is for - line is a string, iterating it will give you every character is the line. > > I am then going thr

[Tutor] Fastest way to iterate through a file

2007-06-25 Thread Robert Hicks
I have a script at work where I have a list of id numbers and I am doing a: for line in ehFile: for id in line: I am then going through that file and finding the line the id is on and printing the next line out. It takes a few seconds to see the output to the screen (the Perl versi

Re: [Tutor] python port scanner

2007-06-25 Thread János Juhász
Dear dos, >>hello i am looking into writing a simple python port scanner but i cant find >>any good tutorials online if anyone can help or knows of any tutorials that >>could help it would be great. this would be my first program like this so i >>might need a little extra help I just recommend

Re: [Tutor] python port scanner

2007-06-25 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well, take a look at the socket module and nonblocking mode. But truly, it's not a good "first" program, not for Python, not for C. Andreas max . wrote: > hello i am looking into writing a simple python port scanner but i cant > find > any good tuto

[Tutor] Python maintenance taks

2007-06-25 Thread Noufal Ibrahim
Hello everyone, I seem to recall that there was a site (on the python wiki IIRC) that listed relatively simple python bugs (in the actual C code inside the interpreter) that needed to be fixed. It was advertised as good starting point for novices. I can't seem to find it. Does anyone her