Re: A question about Cmd Class

2011-03-08 Thread Dog Walker
On Monday 2011 March 07 18:41, yuan zheng wrote:
> Hello, everyone:
>
> I encouter a question when implementing a commmand line(shell).
> I have implemented some commands, such as "start", "stop", "quit",
> they are easily implemented by "do_start", "do_stop" and "do_quit".
> there are no troubles.
>  But I want to implement some commands like these "list-modules",
> "show-info". There is a character "-" among the string. So I can't easily
> use "do_list-modules", because the name is invalid. I attempt another
> ways, add a sentense in function "cmd.onecmd":
> ---
>def onecmd(self, line):
> line = line.replace("-", "_") # I add
> ...
> ---
> Then, I can use "do_list_modules" to mach "list-modules" command. But in
> this way, completion cannot work correctly. If I input "list-", and then
> "tab",
> it would not complete.
>

That is because the readline module uses '-' as one of its stop characters. 
You can try this code I used:

# PyPI package names can contain hyphens.
# readline interprets a hyphen as a word boundary.
# We need to remove the hyphen from readline's
# word boundary delimiters so that our findpkg
# command can complete on package name.
import readline
delims = readline.get_completer_delims(  )
delims = delims.replace('-', '')
readline.set_completer_delims(delims)
del delims

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


Re: beginners python mail list

2014-06-21 Thread Dog Walker
On Sat, Jun 21, 2014 at 8:43 AM, Noah  wrote:

> Is there a beginners python mail list?
>

​Tutor maillist  -  tu...@python.org​



-- 
I have seen the future and I'm not in it!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: .py and running in Windows:

2006-06-13 Thread Dog Walker
On Tuesday 13 June 2006 07:04, Michael Yanowitz wrote:
> Thanks.
> 
>XP looks to be the same as 2000.
> Works as expected now. Thank You.
> 
> Not sure what this 'thread' issue is.
> I never specified a thread. I think perhaps though because I did
> open another message in this mailing list (to get the correct
> email address to send to), but I deleted all its contents i put
> it under that other thread, however there is no indication of a
> thread in Outlook email. I am sorry if it came up in another
> thread that was not my intention.
> 

To start a  new thread use a new email: even though you deleted the contents,
In-Reply-To: and References: headers remain in the email, and when they are
present, they determine the thread rather than the Subject: header.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf
> Of Iain King
> Sent: Tuesday, June 13, 2006 9:48 AM
> To: python-list@python.org
> Subject: Re: .py and running in Windows:
> 
> 
> 
> Andrew Gwozdziewycz wrote:
> > You'll have better results posting this to it's own thread.
> >

[...]


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


ctypes shared object FILE*

2008-11-08 Thread Dog Walker
I need to call a function in a shared object with this signature:
init_dialog(FILE *input, FILE *output)
The FILE*'s are to stdin and stdout.

The call from python is libdialog.init_dialog( x, y)
I need to define x and y so that they will have the structure of
sys.stdin and sys.stdout; the called function (init_dialog) is using a
(std?) function fileno to extract the fileno from the FILE* describing
stdin and stdout.
How can I do this?

-- 
I have seen the future and I'm not in it!
--
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: yolk 0.4.1

2008-08-11 Thread Dog Walker
On Mon, Aug 11, 2008 at 11:55 AM, Rob Cakebread <[EMAIL PROTECTED]> wrote:
>
> yolk 0.4.1 has been released. This is mainly a bugfix release.
>
> Changes:
>
>  * Added HTTP proxy support for XML-RPC
>  * -f is now case-insensitive
>  * -S does not return the entire PyPI index if a package doesn't exist (this 
> was fixed upstream in PyPI)
>  * Check for integer with -L
>
> What is yolk?
> =
>
> yolk is a command-line client and library for querying installed Python 
> packages on your system and packages in The Python Package Index (PyPI).
>
> http://tools.assembla.com/yolk
>
> Features:
>
>  * List installed Python packages (all, active, non-active, develpment mode)
>  * Show which installed packages have updates available on PyPI
>  * Show all metadata for a package or individual fields, installed or via PyPI
>  * Show just URLs for source, egg or repository (SVN etc.)
>  * Show setuptools entrypoints for a module
>  * All commands available through PyPI's XML-RPC interface
>
> yolk uses a setuptools-based plugin system.
>
> Third-party plugins
> ===
>
>  * yolk-portage - Shows which packages were installed via Gentoo Linux's 
> package manager and which were installed directly via setuptools/distutils.
>
> Applications based on yolklib
> =
>
>  * g-pypi - Creates ebuilds for Gentoo Linux by querying PyPI
>  * qyolk - GUI for yolk in QT
>
>
> --
> http://mail.python.org/mailman/listinfo/python-announce-list
>
>   Support the Python Software Foundation:
>   http://www.python.org/psf/donations.html

I tried to download yolk using PyPi Browser and received a 4KB tarball
with only readme files and a setup.py, and Ark stated the archive was
"crap", formatwise. My visit to yolk's web didn't yield a link for
downloading.

--
I have seen the future and I'm not in it!
--
http://mail.python.org/mailman/listinfo/python-list


Re: ANN: 'tsearchpath' Path Search Module, Version 1.08 Released

2010-06-25 Thread Dog Walker
On Fri, Jun 25, 2010 at 10:44 AM, Tim Daneliuk  wrote:
> 'tsearchpath' Version 1.108 is now released and available for download at:
>
>         http://www.tundraware.com/Software/tsearchpath
>
> -
>
> What's New In This Release?
> ---
>
> This is the initial public release.
>
> A FreeBSD port has also been submitted.
>
>
> What Is 'tsearchpath'?
> ---
>
> 'tsearchpath' is a Python module for searching a list of paths for a
> particular file system 'filename'.  This can be the name of a
> directory, file, or any other entity in the file system.  This makes
> it easy to add things like include- or configuration file paths to
> your own programs.
>
> There is no fee for using 'tsearchpath' so long as the licensing terms
> found in 'tsearchpath-license.txt' are observed.  Please take a moment
> to review this document.
>
> 
> Tim Daneliuk     tun...@tundraware.com
> PGP Key:         http://www.tundraware.com/PGP/
>
>
> --
> http://mail.python.org/mailman/listinfo/python-announce-list
>
>        Support the Python Software Foundation:
>        http://www.python.org/psf/donations/
>


i have no moment!
-- 
I have seen the future and I'm not in it!
-- 
http://mail.python.org/mailman/listinfo/python-list