[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Michael Hoffman


Michael Hoffman  added the comment:

`getcwd()` in many ways serves the purpose that a `lget_current_dir_name()` 
might.

--

___
Python tracker 
<https://bugs.python.org/issue1154351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Michael Hoffman


Michael Hoffman  added the comment:

> * For some libc functions we add options to existing functions rather of 
> duplicating the number of names in the os module. For example the dir_fd  
> option instead of *at() functions. Wouldn't be better to add a buulean 
> parameter (with platform-depending default) to getcwd()?

I agree, adding an option to `getcwd()` would probably be a better approach and 
reduce some of the other potential confusion.

--

___
Python tracker 
<https://bugs.python.org/issue1154351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread Michael Hoffman


Michael Hoffman  added the comment:

glibc `getcwd()` and `get_current_dir_name()` are not the same. glibc
`get_current_dir_name()` does, in fact, check the `PWD` environment
variable.

https://www.gnu.org/software/libc/manual/html_node/Working-Directory.html

The get_current_dir_name function is basically equivalent to
getcwd (NULL, 0), except the value of the PWD environment variable is first
examined, and if it does in fact correspond to the current directory, that
value is returned. This is a subtle difference which is visible if the path
described by the value in PWD is using one or more symbolic links, in which
case the value returned by getcwd would resolve the symbolic links and
therefore yield a different result.

On Sun, Oct 28, 2018 at 5:27 PM Braden Groom report-at-bugs.python.org
|Python/Example Allow| <16snny1crx82...@sneakemail.com> wrote:

>
> Braden Groom  added the comment:
>
> Victor, FWIW I don't need this functionality and your suggestion on the PR
> seems reasonable to me. I only picked up this issue as a way to become
> familiar with contributing to the project. I'm okay with closing both the
> PR and the ticket.
>
> --
> nosy: +bradengroom
>
> ___
> Python tracker 
> <https://bugs.python.org/issue1154351>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue1154351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2010-11-13 Thread Michael Hoffman

Changes by Michael Hoffman qq9jsuv...@snkmail.com:


--
nosy: +hoffman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False

2010-11-13 Thread Michael Hoffman

Michael Hoffman qq9jsuv...@snkmail.com added the comment:

As always, it seems a bit more complicated than I originally expected. Since 
it's too late for a Python 2.x feature addition, I'll wait until I upgrade to 
3.x to work on that.

You are correct, technically this is not a docs bug but I think the clarity of 
the docs would be greatly improved if you would add the text from the cmd 
module docs to the pdb docs:

If you want a given stdin to be used, make sure to set the instance’s 
use_rawinput attribute to False, otherwise stdin will be ignored.

I hope you will agree that this is unexpected behavior that doesn't really fit 
into the zen of Python.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10396
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False

2010-11-12 Thread Michael Hoffman

New submission from Michael Hoffman qq9jsuv...@snkmail.com:

If you create a Pdb instance with an stdin argument, the default behavior is 
for commands to be retrieved using raw_input(), which uses sys.stdin instead, 
thereby causing the stdin argument to be without effect.

You can work around this by setting the use_rawinput attribute of the instance 
to False, but this should be done whenever an stdin argument is given to the 
constructor.

--
components: Library (Lib)
files: testcase.py
messages: 121050
nosy: hoffman
priority: normal
severity: normal
status: open
title: stdin argument to pdb.Pdb doesn't work unless you also set 
Pdb.use_rawinput = False
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file19580/testcase.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10396
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False

2010-11-12 Thread Michael Hoffman

Changes by Michael Hoffman qq9jsuv...@snkmail.com:


Added file: http://bugs.python.org/file19581/expected_behavior.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10396
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2155] optparse.OptionGroup with_statement context handling

2008-12-11 Thread Michael Hoffman

Michael Hoffman michaelfilter.57405...@bloglines.com added the comment:

Is there anything I can do to get this feature request considered
earlier? I can generate a real patch, but I figured that wouldn't
necessary for something so simple. This has the advantage that it can
probably be cut/pasted into any version of the code.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2155
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4245] threading documentation: reorder sections

2008-10-31 Thread Michael Hoffman

New submission from Michael Hoffman [EMAIL PROTECTED]:

It is somewhat confusing that the meat of the threading module, the
Thread object itself, is so far down in the documentation. It should be
the first  section after the module functions and objects.

http://docs.python.org/library/threading.html

--
assignee: georg.brandl
components: Documentation
messages: 75422
nosy: georg.brandl, hoffman
severity: normal
status: open
title: threading documentation: reorder sections

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4245
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-03-19 Thread Michael Hoffman

Michael Hoffman [EMAIL PROTECTED] added the comment:

That is up to you of course, and being able to ignore is better than
nothing. But creating a new account is not really an option for
everyone. On the system I would like to use this feature the most, I am
not a system administrator, so I cannot create new user accounts. I
maintain a directory for production use of people in my workgroup. I
also maintain my own for testing and development.

Thanks for your work on this patch. At least being able to use
--no-user-cfg will be very helpful.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1180
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2155] optparse.OptionGroup with_statement context handling

2008-02-21 Thread Michael Hoffman

New submission from Michael Hoffman:

Adding these four lines to optparse.OptionGroup makes using option
groups vastly easier:

def __enter__(self):
return self

def __exit__(self, *exc_info):
self.parser.add_option_group(self)

You can then do things like:

with OptionGroup(parser, Group name) as group:
group.add_option(...)

--
components: Library (Lib)
messages: 62625
nosy: hoffman
severity: normal
status: open
title: optparse.OptionGroup with_statement context handling
type: feature request

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2155
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2130] [feature-request] Please add bool data type to optparse module

2008-02-21 Thread Michael Hoffman

Michael Hoffman added the comment:

As gpolo points out, this facility already exists. This RFE should be
closed.

--
nosy: +hoffman

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2130
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Michael Hoffman

Michael Hoffman added the comment:

At the very least could you change the -- to be the verbatim class
that shows up properly beneath? There has to be another solution that
would result in the docs at least being correct even if we can't get
LaTeX to do exactly what we want.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1186
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Michael Hoffman

Michael Hoffman added the comment:

Also, see http://bugs.python.org/issue798006 which shows how to fix a
similar problem elsewhere in the docs.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1186
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-21 Thread Michael Hoffman

New submission from Michael Hoffman:

See http://docs.python.org/lib/optparse-callback-example-6.html where
it says 'either - or - can be option arguments'. One of these should
be --. The same error occurs several times on the same page.

Not a problem in the Optik docs at
http://optik.sourceforge.net/doc/1.5/callbacks.html.

--
components: Documentation
messages: 56074
nosy: gward, hoffman
severity: normal
status: open
title: optparse documentation: -- being collapsed to - in HTML
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1186
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore ~/.pydistutils.cfg

2007-09-19 Thread Michael Hoffman

Changes by Michael Hoffman:


--
components: Distutils
severity: normal
status: open
title: Option to ignore ~/.pydistutils.cfg
type: rfe
versions: Python 2.6

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1180
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2007-09-19 Thread Michael Hoffman

Changes by Michael Hoffman:


--
title: Option to ignore ~/.pydistutils.cfg - Option to ignore or substitute 
~/.pydistutils.cfg

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1180
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1643369] function breakpoints in pdb

2007-09-19 Thread Michael Hoffman

Michael Hoffman added the comment:

Agree with isandler. This is not a bug.

--
nosy: +hoffman

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1643369
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore ~/.pydistutils.cfg

2007-09-19 Thread Michael Hoffman

New submission from Michael Hoffman:

It would be useful if setup.py instances had an option to ignore
~/.pydistutils.cfg or substitute it with another file. For example, this
would be highly useful to people who maintain a system site-packages
directory along with one in their own home directory.

--
nosy: +hoffman

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1180
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com