Re: Installed 3.5.0 successfully on Windows 10, but where is DDLs, Doc, Lib, etc?

2015-10-15 Thread John S James
Thank you, this is very helpful. John On Wed, Oct 14, 2015 at 3:31 PM, Zachary Ware wrote: > On Wed, Oct 14, 2015 at 2:05 PM, John S. James > wrote: > > I installed 3.5.0 today and it's working fine -- either from the command > prompt, or running a .py script. > > &

Installed 3.5.0 successfully on Windows 10, but where is DDLs, Doc, Lib, etc?

2015-10-14 Thread John S. James
I installed 3.5.0 today and it's working fine -- either from the command prompt, or running a .py script. But the Python 3.4 that was previously installed on the computer had a Python34 folder, which contained DDLs, Doc, include, Lib, and various other folders and files. I haven't found a compa

Re: Problem installing 3.2.1 on a Linux server

2011-08-14 Thread John S James
could be deprecated -- and eventually removed by the ISPs, except for the few customers who choose to install it themselves. John S James www.replicounts.org -- Forwarded message -- From: Ned Deily To: python-list@python.org Date: Sat, 06 Aug 2011 15:09:39 -0700 Subject: Re: Pr

Problem installing 3.2.1 on a Linux server

2011-08-06 Thread John S James
eb forms. John -- John S. James www.RepliCounts.org -- http://mail.python.org/mailman/listinfo/python-list

Re: integer to binary 0-padded

2011-06-17 Thread John S
On Jun 15, 9:33 am, Olivier LEMAIRE wrote: > You're right, I use Python 2.6.6 This works great in 2.6.5 and later (and probably earlier). You just have to number your placeholders. The first set of braces formats i (your value), the second set specifies the field with (i.e., 8): >>> for i in xra

Re: Weird problem matching with REs

2011-05-29 Thread John S
On May 29, 12:16 pm, Andrew Berg wrote: > > I've been meaning to learn how to use parenthesis groups. > > Also, be sure to > > use a raw string when composing REs, so you don't run into backslash > > issues. > > How would I do that when grabbing strings from a config file (via the > configparser m

Re: Weird problem matching with REs

2011-05-29 Thread John S
On May 29, 10:35 am, Andrew Berg wrote: > On 2011.05.29 09:18 AM, Steven D'Aprano wrote:> >> What makes you think it > shouldn't match? > > > > AFAIK, dots aren't supposed to match carriage returns or any other > > > whitespace characters. > > I got things mixed up there (was thinking whitespace

Re: pattern matching

2011-02-24 Thread John S
On Feb 23, 9:11 pm, monkeys paw wrote: > if I have a string such as '01/12/2011' and i want > to reformat it as '20110112', how do i pull out the components > of the string and reformat them into a DDMM format? > > I have: > > import re > > test = re.compile('\d\d\/') > f = open('test.html')  

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-08 Thread John S
On Aug 8, 10:59 am, Thomas Jollans wrote: > On 08/08/2010 04:06 PM, Νίκος wrote: > > > > > > > On 8 Αύγ, 15:40, Thomas Jollans wrote: > >> On 08/08/2010 01:41 PM, Νίκος wrote: > > >>> I was so dizzy and confused yesterday that i forgot to metnion that > >>> not only i need removal of php openign

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-07 Thread John S
Even though I just replied above, in reading over the OP's message, I think the OP might be asking: "How can I use RE string replacement to find PHP tags and convert them to Django template tags?" Instead of saying source_contents = source_contents.replace(...) say this instead: import re de

Re: Replace and inserting strings within .txt files with the use of regex

2010-08-07 Thread John S
On Aug 7, 8:20 pm, Νίκος wrote: > Hello dear Pythoneers, > > I have over 500 .php web pages in various subfolders under 'data' > folder that i have to rename to .html and and ditch the '' > tages from within and also insert a very first line of > where id must be an identification unique number o

Re: How to insert string in each match using RegEx iterator

2009-06-13 Thread John S
On Jun 10, 12:13 am, "504cr...@gmail.com" <504cr...@gmail.com> wrote: > By what method would a string be inserted at each instance of a RegEx > match? > > For example: > > string = '123 abc 456 def 789 ghi' > newstring = ' INSERT 123 abc INSERT 456 def INSERT 789 ghi' > > Here's the code I started

Re: Lexical scope: converting Perl to Python

2009-06-13 Thread John S
On Jun 13, 8:29 am, Nick Craig-Wood wrote: > Andrew Savige wrote: > > >  I'd like to convert the following Perl code to Python: > > >   use strict; > >   { > >     my %private_hash = ( A=>42, B=>69 ); > >     sub public_fn { > >   my $param = shift; > >   return $private_hash{$param}; > >

Re: Need help in Python regular expression

2009-06-11 Thread John S
On Jun 11, 10:30 pm, meryl wrote: > Hi, > > I have this regular expression > blockRE = re.compile(".*RenderBlock {\w+}") > > it works if my source is "RenderBlock {CENTER}". > > But I want it to work with > 1. RenderTable {TABLE} > > So i change the regexp to re.compile(".*Render[Block|Table] {\w+

Re: finding out the number of rows in a CSV file [Resolved]

2008-08-27 Thread John S
[OP] Jon Clements wrote: > On Aug 27, 12:54 pm, SimonPalmer <[EMAIL PROTECTED]> wrote: >> after reading the file throughthe csv.reader for the length I cannot >> iterate over the rows. How do I reset the row iterator? A CSV file is just a text file. Don't use csv.reader for counting rows -- it's

Re: trying to match a string

2008-07-18 Thread John S
On Jul 18, 7:51 am, Andrew Freeman <[EMAIL PROTECTED]> wrote: > Andrew Freeman wrote: > > oj wrote: > >> On Jul 18, 12:10 pm, John Machin <[EMAIL PROTECTED]> wrote: > > >>> On Jul 18, 9:05 pm, oj <[EMAIL PROTECTED]> wrote: > > On Jul 18, 11:33 am, [EMAIL PROTECTED] wrote: > > > Hi, > >

Re: how to match whole word

2008-07-16 Thread John S
On Jul 16, 9:38 am, Peng Yu <[EMAIL PROTECTED]> wrote: > On Jul 15, 10:29 pm, Gary Herron <[EMAIL PROTECTED]> wrote: > > > > > Peng Yu wrote: > > > Hi, > > > > The following code snippet is from /usr/bin/rpl. I would like the it > > > to match a word, for example, "abc" in ":abc:". But the current

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread john s.
On Mar 25, 6:34 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > john s. wrote: > > #/usr/bin/enviro python > > > #Purpose - a dropped in useracct/pass file is on a new server to build > > #a cluster... Alas there are no home directories.. Let me rip through > > #

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread john s.
On Mar 24, 9:39 pm, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: > > On Behalf Of john s. > > import os, sys, string, copy, getopt, linecache > > from traceback import format_exception > > > #The file we read in... > > fileHandle = "/etc/

Breaking the barrier of a broken paradigm... part 1

2008-03-24 Thread john s.
Hi Everyone, I hope not to offend you with too many question.. I've been lurking a long time. I'm not keen on keeping e-mails or data stored in the public space so this is my first post to the group. That being said, I'm keen on refining my skills, I hope that I can prove that I've move on beyond