MoinMoin - Can't create new pages

2005-10-25 Thread ferg
I've checked all the FAQs and help - spent a couple of hours on this
now and it's really bugging me.

I've got Moin 1.3.5 installed on IIS 5.0.
I can view and edit pages without any problems, but cannot create new
pages - either trough the GUI, or by creating a new WikiName and
clicking on it.
I'm stumped as to whether this is a Moin ACL problem (played around a
lot with this, but to no avail) or perhaps an IIS config problem
(though the Web Account has full control to the data directory).
The Wiki is an internal intranet one for our development group, so I
don't really care if everyone is an admin, I just need to be able to
create new pages anyway.

Here is my wikiconfig.py

 FILE START 
# -*- coding: iso-8859-1 -*-
# IMPORTANT! This encoding (charset) setting MUST be correct! If you
live in a
# western country and you don't know that you use utf-8, you probably
want to
# use iso-8859-1 (or some other iso charset). If you use utf-8 (a
Unicode
# encoding) you MUST use: coding: utf-8
# That setting must match the encoding your editor uses when you modify
the
# settings below. If it does not, special non-ASCII chars will be
wrong.

"""
MoinMoin - Configuration for a single wiki

If you run a single wiki only, you can omit the farmconfig.py
config
file and just use wikiconfig.py - it will be used for every request
we get in that case.

Note that there are more config options than you'll find in
the version of this file that is installed by default; see
the module MoinMoin.multiconfig for a full list of names and their
default values.

Also, the URL http://moinmoin.wikiwikiweb.de/HelpOnConfiguration
has
a list of config options.

@copyright: 2000-2005 by Juergen Hermann <[EMAIL PROTECTED]>
@license: GNU GPL, see COPYING for details.
"""

from MoinMoin.multiconfig import DefaultConfig


class Config(DefaultConfig):

# Wiki identity


# Site name, used by default for wiki name-logo [Unicode]
sitename = u'ISS Wiki'

# Wiki logo. You can use an image, text or both. [Unicode]
# Example: u'My Wiki'
# For no logo or text, use ''
logo_string = sitename

# The interwiki name used in interwiki links
interwikiname = None


# Critical setup
---

# Misconfiguration here will render your wiki unusable. Check that
# all directories are accessible by the web server or moin server.

# If you encounter problems, try to set data_dir and
data_underlay_dir
# to absolute paths.

# Where your mutable wiki pages are. You want to make regular
# backups of this directory.
data_dir = './data/'

# Where read-only system and help page are. You might want to share
# this directory between several wikis. When you update MoinMoin,
# you can safely replace the underlay directory with a new one.
This
# directory is part of MoinMoin distribution, you don't have to
# backup it.
data_underlay_dir = './underlay/'

# This must be '/wiki' for twisted and standalone. For CGI, it
should
# match your Apache Alias setting.
url_prefix = '/wiki'


# Security
--

# Security critical actions (disabled by default)
# Uncomment to enable options you like.
#allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage']

# Enable acl (0 to disable)
acl_enabled = 1

# IMPORTANT: grant yourself admin rights! replace YourName with
# your user name. See HelpOnAccessControlLists for more help.
# All acl_rights_xxx options must use unicode [Unicode]
acl_rights_before =
u"arkprod\it_32564:read,write,delete,revert,admin"

# Link spam protection for public wikis (Uncomment to enable)
# Needs a reliable internet connection.
#from MoinMoin.util.antispam import SecurityPolicy



# Mail
--

# Configure to enable subscribing to pages (disabled by default)
# or sending forgotten passwords.

# SMTP server, e.g. "mail.provider.com" (empty or None to disable
mail)
mail_smarthost = ""

# The return address, e.g "My Wiki <[EMAIL PROTECTED]>"
mail_from = ""

# "user pwd" if you need to use SMTP AUTH
mail_login = ""


# User interface


# Add your wikis important pages at the end. It is not recommended
to
# remove the default links.  Leave room for user links - don't use
# more than 6 short items.
# You MUST use Unicode strings here, but you need not use localized
# page names for system and help pages, those will be used
automatically
# according to the user selected language. [Unicode]
navi_bar = [
# Will use page_front_page, (default FrontPage)
u'%(page_front_page)s',
u'RecentChanges',
u'FindPage',
u'HelpC

Re: MoinMoin - Can't create new pages

2005-10-25 Thread ferg
I should have mentioned that the error message I keep getting is the ol
HTTP 404 - "The page cannot be found"

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


Re: MoinMoin - Can't create new pages

2005-10-25 Thread ferg
Newsflash:
I've tried the [[NewPage]] macro and that works, but still no joy with
the WikiName links. Well that's a work around for now, but it'd still
be great to know why the other methods don't work...

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


EasyGui now supports Python 3.0

2009-03-19 Thread Steve Ferg
Just a follow-up:

I've just uploaded a version of Easygui that works with Python 2.x and
3.x.
http://easygui.sourceforge.net/current_version/index.html

I blog a bit about it at
http://pythonconquerstheuniverse.blogspot.com/2009/03/moving-to-python-30-part3.html
--
http://mail.python.org/mailman/listinfo/python-list


Re: Smalltalk-like Python IDE ?

2009-03-20 Thread Steve Ferg
I'd suggest looking at Komodo IDE
--
http://mail.python.org/mailman/listinfo/python-list


Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-17 Thread Steve Ferg
A few years ago someone, somewhere on the Web, posted a blog in which
he observed that developers, by general temperament, seem to fall into
two groups.

On the one hand, there are developers who love big IDEs with lots of
features (code generation, error checking, etc.), and rely on them to
provide the high level of support needed to be reasonably productive
in heavy-weight languages (e.g. Java).

On the other hand there are developers who much prefer to keep things
light-weight and simple.  They like clean high-level languages (e.g.
Python) which are compact enough that you can keep the whole language
in your head, and require only a good text editor to be used
effectively.

The author wasn't saying that one was better than the other: only that
there seemed to be this recognizable difference in preferences.

I periodically think of that blog, usually in circumstances that make
me also think "Boy, that guy really got it right".  But despite
repeated and prolonged bouts of googling I haven't been able to find
the article again.  I must be using the wrong search terms or
something.

Does anybody have a link to this article?

Thanks VERY MUCH in advance,
-- Steve Ferg
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-19 Thread Steve Ferg
Thanks.  Your observations would make good comments on the original
blog message that I'm seeking.  Do you have a link to that blog?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-20 Thread Steve Ferg
> I think you mean this clbuttic post:
> http://osteele.com/archives/2004/11/ides

That's it!  Thanks very much, Marco!!

It is good to read it again.  It is like visiting a place where you
grew up years ago, and finding that it is completely different than
the way you remember it.  It is surprising how much better it is than
my rather crude memory of it.

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


Re: Code Generator written in python

2010-01-14 Thread Steve Ferg
http://nedbatchelder.com/code/cog/

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


Re: Difference Between Two datetimes

2010-01-14 Thread Steve Ferg

> I'd like to start with two dates as strings, as
> "1961/06/16 04:35:25" and "1973/01/18 03:45:50"
> How do I get the strings into a shape that will accommodate a difference?

Pyfdate  http://www.ferg.org/pyfdate/index.html
has a numsplit function that should do the trick:
http://www.ferg.org/pyfdate/tutorial.html#contents_item_14

It splits a string into its numeric parts and return a list containing
the numeric parts converted to ints.

>>> from pyfdate import *
>>> numsplit("2007_10_09")
[2007, 10, 9]
>>> numsplit("2007-10-09T23:45:59")
[2007, 10, 9, 23, 45, 59]
>>> numsplit("2007/10/09 23.45.59")
[2007, 10, 9, 23, 45, 59]




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


Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-16 Thread Steve Ferg
This is a question for the language mavens that I know hang out here.
It is not Python related, except that recent comparisons of Python to
Google's new Go language brought it to mind.

NOTE that this is *not* a suggestion to change Python.  I like Python
just the way it is.  I'm just curious about language design.

For a long time I've wondered why languages still use blocks
(delimited by do/end, begin/end, { } , etc.) in ifThenElse statements.

I've often thought that a language with this kind of block-free syntax
would be nice and intuitive:

if  then
do stuff
elif  then
do stuff
else
do stuff
endif

Note that you do not need block delimiters.

Obviously, you could make a more Pythonesque syntax by using a colon
rather then "then" for the condition terminator.  You could make it
more PL/I-like by using "do", etc.

You can write shell scripts using if ... fi, but other than that I
don't recall a language with this kind of syntax.

Does anybody know a language with this kind of syntax for
ifThenElseEndif?

Is there any particular reason why this might be a *bad* language-
design idea?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python terminology on classes

2010-08-04 Thread Steve Ferg
> Seriously, we can't keep doing your thinking for you.  The answers
> to all your questions are section 9 of the tutorial.

This is is just the kind of newbie-hostile smart-ass reply that we do
not want to see on comp.lang.python.

Let's try again:

I think that the answers to all your questions are section 9 of the
tutorial.
http://docs.python.org/py3k/tutorial/index.html

Why don't you take a look at it, and then come back again if you still
have questions.



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


question about pdb assignment statements

2010-08-16 Thread Steve Ferg
In this little script:

 
 import pdb
 pdb.set_trace()
 def main():
 xm = 123
 print("Hello,world!")
 main()
 

When I run this, I use pdb to step through it until I reach the point
in main() where the xm variable has been initialized, and then I try
to use pdb to reset the value of xm, and I can't.

Does anybody know why?

As I understand the documentation,  http://docs.python.org/library/pdb.html
I *should* be able to do this.

 [!]statement
 Execute the (one-line) statement in the context of the current stack
frame.

Is there something about "in the context of the current stack frame"
that I don't understand?  Or is it a bug (or a limitation) in pdb?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: question about pdb assignment statements

2010-08-17 Thread Steve Ferg
Thanks mucho!!
-- 
http://mail.python.org/mailman/listinfo/python-list


Help please! strange Tkinter behavior has me totally baffled.

2010-08-24 Thread Steve Ferg
I have a short Python script that uses Tkinter to display an image.
Here is the script

===
import sys, os
from   Tkinter import *
root = Tk()  # A: create a global variable named "root"

def showPicture(imageFilename):
# global root   #C: make root global
root = Tk()  # B: create a local variable named "root"

imageFrame = Frame(root)
imageFrame.pack()

imageObject = PhotoImage(file=imageFilename)

label = Label(imageFrame,image=imageObject)
label.pack()

root.mainloop()

showPicture("python_and_check_logo.gif")
===

The strange thing is that it crashes with this traceback...

===

Traceback (most recent call last):
  File "easygui_test3.py", line 19, in 
showPicture("python_and_check_logo.gif")
  File "easygui_test3.py", line 14, in showPicture
label = Label(imageFrame,image=imageObject)
  File "L:\FergLabstatPublic\Python26\lib\lib-tk\Tkinter.py", line
2474, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
  File "L:\FergLabstatPublic\Python26\lib\lib-tk\Tkinter.py", line
1940, in __init__
(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: image "pyimage1" doesn't exist

===

If I comment out either line A or line B, the script works fine.

What I don't understand is why creating a global "root" variable and a
local "root" variable causes the script to crash.

Even more puzzling... if I uncomment line C, so that "root" in line B
refers to a global "root" variable, the script still crashes.

I'm totally baffled.  Does anybody know what is going on here?

-- Steve Ferg
(I'm running Python 2.6 under Windows, but  I get the same behavior
under Solaris.)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Questions, newbies, and community (was: python terminology on classes)

2010-08-24 Thread Steve Ferg
I stand corrected.  I didn't know the background.  Thanks for
supplying the larger picture. :-)

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


Re: Help please! strange Tkinter behavior has me totally baffled.

2010-08-25 Thread Steve Ferg
Thanks mucho!  That was it!
-- Steve Ferg
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: easiest way to check python version?

2009-06-22 Thread Steve Ferg
Here is what I use in easygui:

#--
# check python version and take appropriate action
#--
"""
>From the python documentation:

sys.hexversion contains the version number encoded as a single
integer. This is
guaranteed to increase with each version, including proper support for
non-
production releases. For example, to test that the Python interpreter
is at
least version 1.5.2, use:

if sys.hexversion >= 0x010502F0:
# use some advanced feature
...
else:
# use an alternative implementation or warn the user
...
"""
if sys.hexversion >= 0x020600F0: runningPython26 = True
else: runningPython26 = False

if sys.hexversion >= 0x03F0: runningPython3 = True
else: runningPython3 = False

if runningPython3:
from tkinter import *
import tkinter.filedialog as tk_FileDialog
from io import StringIO
else:
from Tkinter import *
import tkFileDialog as tk_FileDialog
from StringIO import StringIO



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


Re: Good books in computer science?

2009-06-22 Thread Steve Ferg
If you are looking for *classics*, then you can't beat Michael
Jackson's "Principles of Program Design" and "System Development".
They are pre-ObjectOriented, but if you really want to understand what
application programming is all about, this is where you should
start.

I also recommend Eric S. Roberts "Thinking Recursively".  I don't know
if it can be considered a classic, but a good programmer needs to be
able to understand and do recursion, and I found this book a very
readable introduction.

It may also help if you bring a tighter focus to your search.  The
domain of programming can be divided up into large subdomains, each
with its own specialized types of problems, techniques and classics.
Here are some subdomains that I can think of off the top of my head:

system programming -- dealing with interacting with the computer at
the bits and bytes level
scientific programming -- dealing with algorithms
business programming -- dealing with data structures and the events
that change them
embedded & real-time programming -- dealing with controlling machines

... and there are probably others, such as writing compilers/
interpreters, and robotics programming.





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


Re: How to increment date by week?

2013-06-04 Thread steve . ferg . bitbucket
pyfdate -- http://www.ferg.org/pyfdate/

from pyfdate import Time 
w = Time(2013,1,2) # start with January 2, 2013, just for example

# print the ISO weeknumber and date for 52 weeks
# date looks like this: October 31, 2005
for i in range(52):
w = w.plus(weeks=1)
print (w.weeknumber, w.d)


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


Re: Python Boolean Logic

2017-09-22 Thread steve . ferg . bitbucket
You have a lot of assignment statements, but nothing that produces output.  Try 
adding statements like this at appropriate places...

print ("bool_one = ", bool_one)
-- 
https://mail.python.org/mailman/listinfo/python-list


Looking for tips on running Python version 2.6 and 3.0 together on same *WINDOWS* machine

2009-02-24 Thread steve . ferg . bitbucket
I'm looking for tips on installing and running Python version 2.6 and
version 3.0 together on same Windows machine.

I'd like to install both 2.6 and 3.0 together on the same Windows
(Vista) machine, so I can test programs under both versions.

Is it possible to install both versions on the same Windows machine in
such a way that they are both asily available and don't interfere with
one another?  I'm concerned, for example, that if I install both, the
second installation will over-write some Python entry in the registry.

I'd like something fairly simple -- I will be sharing this information
with others in my workgroup for whom  virtualenv is not an option.

I googled around, but couldn't find anything that seemed to address
this specific question.  If anybody knows of a URL with this
information (a "2 to 3 Conversion FAQs"?) that would be great.

Any help would be greatly appreciated.

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


problem with pydoc under python 2.6.1

2009-03-05 Thread steve . ferg . bitbucket
Has anybody encountered problems running pydoc with version 2.6.1?
I'm getting an error message that pydoc cannot import namedtuple
(details below).
(I'm running under 64-bit Windows Vista, although that probably is not
important.)

Here's my batch file, pydoc_test.bat:
 =
 @echo on
 set pyver=python25
 python c:\%pyver%\Lib\pydoc.py -w easygui

 set pyver=python26
 python c:\%pyver%\Lib\pydoc.py -w easygui
 =

Here's what I get:
 =
 c:\pydev\easygui\v086>pydoc_test.bat

 c:\pydev\easygui\v086>set pyver=python25

 c:\pydev\easygui\v086>python c:\python25\Lib\pydoc.py -w easygui
 wrote easygui.html

 c:\pydev\easygui\v086>set pyver=python26

 c:\pydev\easygui\v086>python c:\python26\Lib\pydoc.py -w easygui
 Traceback (most recent call last):
   File "c:\python26\Lib\pydoc.py", line 55, in 
 import sys, imp, os, re, types, inspect, __builtin__, pkgutil
   File "c:\python26\Lib\inspect.py", line 42, in 
 from collections import namedtuple
 ImportError: cannot import name namedtuple
 

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


Re: problem with pydoc under python 2.6.1

2009-03-05 Thread steve . ferg . bitbucket
Problem solved

Yinon's messages prompted me to take another look at my own code
(below).  I realized that in the batch file I am looking for pydoc.py
in different locations for Python25 and Python26, but I am executing
python.exe without changing the path.  Which means that I am executing
the same version of Python in both cases.

 =
 @echo on
 set pyver=python25
 python c:\%pyver%\Lib\pydoc.py -w easygui

 set pyver=python26
 python c:\%pyver%\Lib\pydoc.py -w easygui
 =

The path was pointing to Python25, so when I ran against the 2.5
version of Pydoc it worked fine; when I ran against the 2.6 version of
Pydoc, I got an error.

I modified my batch file to also reset the PATH after pyver was set,
and then Pydoc worked fine in both cases.

Maybe somebody out there will find this an instructive mistake.  My
thanks to Yinon; certainly for me his mistake was an instructive one.
--
http://mail.python.org/mailman/listinfo/python-list