Re: Best Practice Question

2013-02-06 Thread Jean-Michel Pichavant
- Original Message - [...] By the way, did someone ever notice that r'\' fails ? I'm sure there's a reason for that... (python 2.5) Anyone knows ? r'\' SyntaxError: EOL while scanning single-quoted string Even in a raw string, string quotes can be escaped with a

Re: Best Practice Question

2013-02-05 Thread Dave Angel
On 02/04/2013 11:23 PM, Anthony Correia wrote: Just started learning Python. I just wrote a simple copy files script. I use Powershell now as my main scripting language but I wanted to extend into the linux platform as well. Is this the best way to do it? import os objdir =

Re: Best Practice Question

2013-02-05 Thread Jean-Michel Pichavant
- Original Message - On 02/04/2013 11:23 PM, Anthony Correia wrote: Just started learning Python. I just wrote a simple copy files script. I use Powershell now as my main scripting language but I wanted to extend into the linux platform as well. Is this the best way to do it?

Re: Best Practice Question

2013-02-05 Thread Albert Hopkins
[...] By the way, did someone ever notice that r'\' fails ? I'm sure there's a reason for that... (python 2.5) Anyone knows ? r'\' SyntaxError: EOL while scanning single-quoted string Even in a raw string, string quotes can be escaped with a backslash, but the backslash remains in the

Re: Best Practice Question

2013-02-05 Thread python . list
On Tue, 5 Feb 2013 15:32:32 +0100 (CET), Jean-Michel Pichavant wrote: By the way, did someone ever notice that r'\' fails ? I'm sure there's a reason for that... (python 2.5) Anyone knows ? r'\' SyntaxError: EOL while scanning single-quoted string I hit this all the time with Vim's

Re: Best Practice Question

2013-02-05 Thread Anthony Correia
On Tuesday, February 5, 2013 10:17:54 AM UTC-5, pytho...@tim.thechases.com wrote: On Tue, 5 Feb 2013 15:32:32 +0100 (CET), Jean-Michel Pichavant wrote: By the way, did someone ever notice that r'\' fails ? I'm sure there's a reason for that... (python 2.5) Anyone knows ? r'\'

Re: Best Practice Question

2013-02-05 Thread Joel Goldstick
On Tue, Feb 5, 2013 at 11:40 AM, Anthony Correia akcorr...@gmail.comwrote: On Tuesday, February 5, 2013 10:17:54 AM UTC-5, pytho...@tim.thechases.comwrote: On Tue, 5 Feb 2013 15:32:32 +0100 (CET), Jean-Michel Pichavant wrote: By the way, did someone ever notice that r'\' fails ? I'm

Re: Best Practice Question

2013-02-05 Thread Dave Angel
On 02/05/2013 11:53 AM, Joel Goldstick wrote: On Tue, Feb 5, 2013 at 11:40 AM, Anthony Correia akcorr...@gmail.comwrote: On Tuesday, February 5, 2013 10:17:54 AM UTC-5, pytho...@tim.thechases.comwrote: On Tue, 5 Feb 2013 15:32:32 +0100 (CET), Jean-Michel Pichavant wrote: By the way, did

Best Practice Question

2013-02-04 Thread Anthony Correia
Just started learning Python. I just wrote a simple copy files script. I use Powershell now as my main scripting language but I wanted to extend into the linux platform as well. Is this the best way to do it? import os objdir = (C:\\temp2) colDir = os.listdir(objdir) for f in

Re: XML-schema 'best practice' question

2008-09-20 Thread Frank Millman
On Sep 18, 8:28 am, Frank Millman [EMAIL PROTECTED] wrote: Hi all This is not strictly a Python question, but as I am writing in Python, and as I know there are some XML gurus on this list, I hope it is appropriate here. XML-schemas are used to define the structure of an xml document, and

Re: XML-schema 'best practice' question

2008-09-20 Thread Lorenzo Gatti
On 20 Set, 07:59, Frank Millman [EMAIL PROTECTED] wrote: I want to introduce an element of workflow management (aka Business Process Management) into the business/accounting system I am developing. I used google to try to find out what the current state of the art is. After several months of

Re: XML-schema 'best practice' question

2008-09-20 Thread Lorenzo Gatti
Sorry for pressing the send button too fast. On 20 Set, 07:59, Frank Millman [EMAIL PROTECTED] wrote: I want to introduce an element of workflow management (aka Business Process Management) into the business/accounting system I am developing. I used google to try to find out what the current

XML-schema 'best practice' question

2008-09-18 Thread Frank Millman
Hi all This is not strictly a Python question, but as I am writing in Python, and as I know there are some XML gurus on this list, I hope it is appropriate here. XML-schemas are used to define the structure of an xml document, and to validate that a particular document conforms to the schema.

Re: XML-schema 'best practice' question

2008-09-18 Thread Lorenzo Gatti
On 18 Set, 08:28, Frank Millman [EMAIL PROTECTED] wrote: I am thinking of adding a check to see if a document has changed since it was last validated, and if not, skip the validation step. However, I then do not get the default values filled in. I can think of two possible solutions. I just

Re: XML-schema 'best practice' question

2008-09-18 Thread skip
Frank 1. Don't use default values - create the document with all values Frank filled in. Frank 2. Use python to check for missing values and fill in the defaults Frank when processing the document. Frank Or maybe the best practice is to *always* validate a document Frank