John Gordon wrote:
> Looks like you need a comma after 'stdout=filename'.
Sigh, yesterday was a terrible day (yes, it lacks a comma)...
Anyway, when it is possible, is recommended to use the drivers for
communicate with databases, because subprocess (or os.*open*) is more
expensive compared to
Chris Angelico wrote:
> It's also worth noting that the ~/ notation is a shell feature. You
> may or may not be able to use it in config.read().
The latter. Combined with
"""
read(self, filenames) method of ConfigParser.ConfigParser instance
Read and parse a filename or a list of filenames.
On 06/05/2013 23:40, MMZ wrote:
On Monday, May 6, 2013 6:12:28 PM UTC-4, Chris Angelico wrote:
On Tue, May 7, 2013 at 5:01 AM, MMZ wrote:
> username = config.get('client', 'mmz')
> password = config.get('client', 'pass1')
> hostname = config.get('client', 'localhost')
Are 'mmz', 'pass1',
On Tue, May 7, 2013 at 8:40 AM, MMZ wrote:
> Thanks Chris. you are right.
> So I used them directly and removed configParser. The new error is:
>
> Traceback (most recent call last):
> File "./bbk.py", line 11, in ?
> for database in os.popen(database_list_command).readlines():
> NameError:
On Monday, May 6, 2013 6:12:28 PM UTC-4, Chris Angelico wrote:
> On Tue, May 7, 2013 at 5:01 AM, MMZ wrote:
>
> > username = config.get('client', 'mmz')
>
> > password = config.get('client', 'pass1')
>
> > hostname = config.get('client', 'localhost')
>
>
>
> Are 'mmz', 'pass1', and 'localhos
On 06/05/2013 23:12, m...@socialassets.org wrote:
On Monday, May 6, 2013 5:48:44 PM UTC-4, Enrico 'Henryx' Bianchi wrote:
Enrico 'Henryx' Bianchi wrote:
> cmd2 = subprocess.Popen(['gzip' '-c'],
> shell=False,
> stdout=filename)
Doh, my fault:
cmd2 = subprocess.Popen(['gzip' '-c'],
In <36d2b7cf-2537-46a6-b984-9fce7ddd3...@googlegroups.com>
m...@socialassets.org writes:
> > cmd2 = subprocess.Popen(['gzip' '-c'],
> >
> > shell=False,
> >
> > stdout=filename
> >
> > stdin=cmd1.stdout)
> Thank you Enric
stdin=cmd1.stdout)
^
SyntaxError: invalid syntax
On Monday, May 6, 2013 5:48:44 PM UTC-4, Enrico 'Henryx' Bianchi wrote:
> Enrico 'Henryx' Bianchi wrote:
>
>
>
> > cmd2 = subprocess.Popen(['gzip' '-c'],
>
> > shell=False,
>
> > stdout=filename)
>
>
>
> Doh, my fault:
>
>
>
>
On Monday, May 6, 2013 5:48:44 PM UTC-4, Enrico 'Henryx' Bianchi wrote:
> Enrico 'Henryx' Bianchi wrote:
>
>
>
> > cmd2 = subprocess.Popen(['gzip' '-c'],
>
> > shell=False,
>
> > stdout=filename)
>
>
>
> Doh, my fault:
>
>
>
> cmd2 = subprocess.Popen(['gzip' '-c'],
>
>
On Tue, May 7, 2013 at 5:01 AM, MMZ wrote:
> username = config.get('client', 'mmz')
> password = config.get('client', 'pass1')
> hostname = config.get('client', 'localhost')
Are 'mmz', 'pass1', and 'localhost' the actual values you want for
username, password, and hostname? If so, don't pass them
Enrico 'Henryx' Bianchi wrote:
> cmd2 = subprocess.Popen(['gzip' '-c'],
> shell=False,
> stdout=filename)
Doh, my fault:
cmd2 = subprocess.Popen(['gzip' '-c'],
shell=False,
stdout=filename
stdin=cmd1.stdout)
Enrico
--
htt
MMZ wrote:
> config.read("~/my.cnf")
> username = config.get('client', 'mmz')
> password = config.get('client', 'pass1')
> hostname = config.get('client', 'localhost')
### A simple config file ###
[client]
user = mmz
password = pass1
host = localhost
### EOF ###
#!/usr/bin/env python
import Conf
Why do you have to use that file? Why can't you copy its contents into a
new file in your working directory and make whatever changes necessary?
Example of the changes your code makes me think you want:
# The following options will be passed to all MySQL clients
[client
Thanks Matt.
my.cnf is a readonly file and cannot be changed or modified but do you know of
a file that stores similar information on CentOS?I think I'm not reading from a
right file maybe.
On Monday, May 6, 2013 3:46:04 PM UTC-4, Matt Jones wrote:
> I've never used ConfigParser either, but sho
I've never used ConfigParser either, but shouldn't the "[client]" section
have the options "mmz", "pass1", or "localhost" somewhere? Do you need to
add them to that file?
*Matt Jones*
On Mon, May 6, 2013 at 2:20 PM, MMZ wrote:
> On Monday, May 6, 2013 3:11:33 PM UTC-4, Jerry Hill wrote:
> > O
On Monday, May 6, 2013 3:11:33 PM UTC-4, Jerry Hill wrote:
> On Mon, May 6, 2013 at 3:01 PM, MMZ wrote:
>
>
>
> I am trying to backup database on CentOS linux server,I'm getting error when
> running the following script. anyone can help?
>
>
>
>
> Traceback (most recent call last):
>
>
On Mon, May 6, 2013 at 3:01 PM, MMZ wrote:
> I am trying to backup database on CentOS linux server,I'm getting error
> when running the following script. anyone can help?
>
> Traceback (most recent call last):
> File "./backup.py", line 8, in ?
> username = config.get('client', 'mmz')
> F
I am trying to backup database on CentOS linux server,I'm getting error when
running the following script. anyone can help?
#!/usr/bin/env python
import ConfigParser
import os
import time
config = ConfigParser.ConfigParser()
config.read("~/my.cnf")
username = config.get('client', 'mmz')
passwor
On 2006-09-07, John Purser <[EMAIL PROTECTED]> wrote:
> Windows itself (2000+) comes with it's own backup solution that
> might even support burning to disk. I haven't used MS in a
> year or so but it might be worth looking at.
That worked OK for me until the backup solution bundled with XP
turne
Windows itself (2000+) comes with it's own backup solution that might
even support burning to disk. I haven't used MS in a year or so but it
might be worth looking at.
John Purser
On Wed, 2006-09-06 at 22:55 -0500, Ryan Krauss wrote:
> Something like burn4free could work if there was a way to wr
Something like burn4free could work if there was a way to write an
input script for it. I am trying to avoid manually adding different
folders to the backup each time. I want a script that does it all for
me.
On 9/6/06, Steve Holden <[EMAIL PROTECTED]> wrote:
> Ryan Krauss wrote:
> > I would lik
Ryan Krauss wrote:
> I would like to write a python script to backup my wife's important
> stuff to a CD or DVD. She is running windows. Is there an easy way
> to create as iso image file using python or some other way to use
> python to create (and burn?) a cd? I am open to other free cd backup
I would like to write a python script to backup my wife's important
stuff to a CD or DVD. She is running windows. Is there an easy way
to create as iso image file using python or some other way to use
python to create (and burn?) a cd? I am open to other free cd backup
tools that work in windows
23 matches
Mail list logo