Re: Moinmoin config

2005-08-19 Thread mbstevens
Mark wrote:
> The missing link under /var/www/html was exactly the problem.  Somehow
> missed this in the labyrinth of setup instructions.
> 
> I have another question, and as of yet, have not found another
> discussion group for moinmoin, so sorry, but here goes:
> 
> I have a table and would like the table borders to go away.  Although
> it doesn't talk about border widths explicitliy, the HelpOnTables seems
> to point to this :
> 
> 
> 
> But that does nothing to the border lines.  Adjusting width in the same
> line does work to change the size of the table, but it doesn't seem to
> understand 'border'.
> 
> Anyone know how to make the borders disappear?
> 
> Thanks
> Mark
> 
I would try a stylesheet forum or an (X)HTML forum for this 
question, but first look here,

http://lynx.fnal.gov/runjob/HelpOnConfiguration/CascadingStyleSheets

and then look here,

http://www.w3.org/TR/REC-CSS2/tables.html#borders

But, if the information you're putting in the table is not
true tabular data, consider more semantic markup.
--
mbstevens
http://www.mbstevens.com/cgi/mkatt.pl?name=python/Critique_Generator

-- 
http://mail.python.org/mailman/listinfo/python-list


python under earthlink hosting?

2006-08-01 Thread mbstevens
I keep chatting with the tech support people at Earthlink, asking where
the location of the Python interpreter is.  They don't seem to know where
it is.  They don't know if Python is running on my server, either.  I know
Perl is at /usr/local/bin/perl ...but when I use a similar address for
Python I get a 500 internal server error.

Has anyone succeeded in getting Python CGI scripts running on an earthlink
hosted site?


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python under earthlink hosting?

2006-08-02 Thread mbstevens
On Wed, 02 Aug 2006 14:40:48 +0200, Martin P. Hellwig wrote:

> Maybe they didn't symlink it, try /usr/local/bin/python2.4

Thanks, Martin.  
I went back to earthlink with this:

_
Me: 
"I understand that I am supposed to be 
able to write CGI
scripts in any scripting language. I can't seem to find the Python
interpreter on my server, and keep getting a 500 internal server error
with the following shebang lines:
#!/usr/local/bin/python
#!/usr/bin/python
#!/bin/python
#!usr/local/bin/python2.4
#!/usr/bin/python2.4
#!/bin/python2.4 

Is Python just not running on the
server that hosts my site? 
If it is running -- where is it?"
__

Daniel P: 
"I am sorry, EarthLink provides support only for CGI and Perl
scripting."
__

  
It seemed like such a simple couple of questions for their support staff
to answer.  


I'm beginning to think that if I want to write Python CGI scripts 
I'll have to move to a different service.






-- 
http://mail.python.org/mailman/listinfo/python-list


Re: RegEx conditional search and replace

2006-07-06 Thread mbstevens
On Thu, 06 Jul 2006 08:32:46 +0100, Martin Evans wrote:

> "Juho Schultz" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>> Martin Evans wrote:
>>> Sorry, yet another REGEX question.  I've been struggling with trying to 
>>> get
>>> a regular expression to do the following example in Python:
>>>
>>> Search and replace all instances of "sleeping" with "dead".
>>>
>>> This parrot is sleeping. Really, it is sleeping.
>>> to
>>> This parrot is dead. Really, it is dead.
>>>
>>>
>>> But not if part of a link or inside a link:
>>>
>>> This parrot is sleeping. Really, 
>>> it
>>> is sleeping.
>>> to
>>> This parrot is sleeping. Really, 
>>> it
>>> is dead.
>>>
>>>
>>> This is the full extent of the "html" that would be seen in the text, the
>>> rest of the page has already been processed. Luckily I can rely on the
>>> formating always being consistent with the above example (the url will
>>> normally by much longer in reality though). There may though be more than
>>> one link present.
>>>
>>> I'm hoping to use this to implement the automatic addition of links to 
>>> other
>>> areas of a website based on keywords found in the text.
>>>
>>> I'm guessing this is a bit too much to ask for regex. If this is the 
>>> case,
>>> I'll add some more manual Python parsing to the string, but was hoping to
>>> use it to learn more about regex.
>>>
>>> Any pointers would be appreciated.
>>>
>>> Martin
>>
>> What you want is:
>>
>> re.sub(regex, replacement, instring)
>> The replacement can be a function. So use a function.
>>
>> def sleeping_to_dead(inmatch):
>>  instr = inmatch.group(0)
>>  if needsfixing(instr):
>>return instr.replace('sleeping','dead')
>>  else:
>>return instr
>>
>> as for the regex, something like
>> (]*()?
>> could be a start. It is probaly better to use the regex to recognize
>> the links as you might have something like
>> sleeping.sleeping/sleeping/sleeping.html in your urls. Also you
>> probably want to do many fixes, so you can put them all within the same
>> replacer function.
> 
> ... My first 
> working attempt had been to use the regex to locate all links. I then looped 
> through replacing each with a numbered dummy entry. Then safely do the 
> find/replaces and then replace the dummy entries with the original links. It 
> just seems overly inefficient.

Someone may have made use of 
 multiline links:

_
This parrot 

is sleeping
. 
Really, it is sleeping.
_


In such a case you may need to make the page 
into one string to search if you don't want to use some complex
method of tracking state with variables as you move from
string to string.  You'll also have to make it possible
for non-printing characters to have been inserted in all sorts
of ways around the '>' and '<' and 'a' or 'A' 
characters using ' *' here and there in he regex.



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: all ip addresses of machines in the local network

2006-08-23 Thread mbstevens
On Wed, 23 Aug 2006 21:46:21 -0700, damacy wrote:

> hi, sandra.
> 
> no, it's not as complicated as that. all i want to do is to load a
> database onto different machines residing in the same network. i hope
> there is a way doing it. or perhaps i have a poor understanding of how
> networks work.

It would not be 'as complicated as that' if we knew the kind of
network you are on --  NFS, Samba, Windows, some hybred network, 
SSH, FTP, telnet, remote X, remote desktops?   Every service has its
own way of doing things.


-- 
http://mail.python.org/mailman/listinfo/python-list