Hi
I am trying to execute some MySQL commands using
some python scripts
I want to do a mysqldump of my database john to
a file backup.date.sql
the normal command to take a dump is
mysqldump john> backup.sql
I tried python , by importing
import os
--- nephish <[EMAIL PROTECTED]> wrote:
> ooh ooh, i know this one, i have python do this for
> me every day !
>
> target_dir = '/path/to/where/you/want/to/dump'
>
> os.system("mysqldump --add-drop-table -c -u user
> -ppassword database
> table > "+target_dir+"/table.bak.sql")
>
> dont forget t
Hi
I am trying out learning python , using the book
Python Programming for the absolute beginner by
Michael Dawson
I get
File "page114.py", line 12
inventory = ("Sword","Armor","Shield","Healing
Potion")
^
SyntaxError: invalid syntax
when I run the program
--- Brian van den Broek <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> sometimes the syntax error indicator isn't quite
> pointing to the
> problem. In your case, the place it points was where
> Python worked out
> there was a problem, but the difficulty with your
> code is several
> lines up (I've
Hi All
I am trying to write a program in which I enter
the no of students and then for the students I enter
the marks and later on Display the marks
The script which I wrote is given below , when I run
the program I get error
TypeError: object doesn't support item assignment ,
my aim in
Hi All
Thanks to Shantanoo,Brian,Alan,Owen
Now I am able to enter the marks for each
students , and display the results the frequency of
marks in histogram
Even though I am able to display the
histogram of the marks with students , I would like
to modify it further as I learn m
Hi
I am trying to write a program in which it ask for
entries for the list , But if I press Enter it should
exit the while loop without giving errors ,I have
problem in making it work , right now if I press enter
to exit , the program terminates showing error
I am added my script wh
Hi All
I was able to exit the while loop , using sys
module
also I was able to find the maximum no of marks
entered , I am adding my code , for comments and
suggestions
Thanks for the support
Joseph John
*
Hi All
I am trying to find out the duplicates in a list
, as for beginning I wanted to compare the adjacent
elements in list , for this purpose I wrote a script
for checking the adjacent elements in a list, if same
, it prints the result that , the adjacent numbers are
same , it not it wi
--- Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Look at this:
> >>> i=[1,2,3]
> >>> i[len(i)]
> Traceback (most recent call last):
>File "", line 1, in ?
> IndexError: list index out of range
>
>
> This means that I have tried to access an element
> that is out o
d Hat 3.4.2-6.fc3)] on linux2
THANKS
Joseph John
--- Brian van den Broek <[EMAIL PROTECTED]> wrote:
> John Joseph said unto the world upon 08/01/06 06:36
We no longer need the continue clause, as converting
to set ensures we
won't ev
--- Chris Andrew <[EMAIL PROTECTED]> wrote:
> Hi, all.
>
> I wonder whether you can help. I've just subscribed
> to the list, so look
> forward to participating. I have been using GNU/
> Linux since about 1999,
> but am a complete newbie when it comes to
> programming.
>
> I bought the O'Rei
--- Danny Yoo <[EMAIL PROTECTED]> wrote:
> >I get the error for set
> > >>> set((1,1,1,2,2,2,2,2,3,4,4,5))
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > NameError: name 'set' is not defined
>
> Hi John,
>
> For Python 2.3.4, you'll need to add the line:
>
Hi
I am trying to use while loop , here I want
while loop to check for two conditions , I am not
getting an idea how to use while loop for checking
two conditions
I used "&" condition , but it is not
giving me the expected results
I used in this way
Hi
I wanted to try out python with MySQL databases
, I would like to get info about the link to sites ,
which gives you examples on how to do python
programming by using MySQL database
Please guide
Thanks
Joseph John
Hi
I tried out my first Pyhton program with MySQL
I was trying to get the some result , eg
describe table, select * from table
but my program does not give the expected results ,
nor it gives any error
I am adding my code in this mail
P
Hi
Thanks to Allan,Danny,Pujo
I did my simple python script for MySQL , the
scripts add the data , and search for the data and
display
I have problem in searching email id ,ie
If search for the [EMAIL PROTECTED] , I will not get any
result , Guidance and advice needed
rint s
entry.execute('''SELECT * FROM contact WHERE email_id
like %s''', (s_email,))
s = entry.fetchall()
print s
~
~
--- "ZIYAD A. M. AL-BATLY" <[EMAIL PROTECTED]> wrote:
> On Sun, 2006-01-22 at 12:43 +, John Joseph
> wrote:
> &
2
Enter the Email to be searched loan
()
U want to search the contacts by
0 - Quit
1 - Name
2 - email_id
3 - phone
4 - fax
Choice :
--- Danny Yoo <[EMAIL PROTECTED]> wrote:
>
> Hi John,
>
> Ok; because the question you're asking looks a
> little homework-y, we have
> to be a little bit more cautious in our answers.
> What part are you
> getting stuck on?
>
>
> Do you understand how SQL wildcards work? There's a
> good n
--- Danny Yoo <[EMAIL PROTECTED]> wrote:
> > the email id which starts with j is
> > select * from contact where email_id like 'j%';
>
> Hi John,
>
> Ok, looks good so far. So in a Python program, we
> might try something
> like this:
>
>
##
Hi
I am trying to execute .py scripts from my
apache web server , but it is not giving the results
as how I run php files , it just displays the
contents of the script , I am able to run and get
results of PHP from the same loaction
my sample-test.py file is as follows
import cgi
reshtm
22 matches
Mail list logo