Hobs added the comment:
It is a limitation of f-strings, though. We're not allowed to use
backslashes within the f-string expression in curly braces. So to do what
you want you have to create another variable containing the quote character:
```
>>> blah = '"hi
Hobs added the comment:
Not a bug. If you use quotes inside an f-string (or any other kind of
string) they need to be escaped.
--Hobson
On Wed, Oct 23, 2019 at 12:09 PM Ying Wang wrote:
>
> New submission from Ying Wang :
>
> Hey,
>
> I encountered an interesting bug
Hobs added the comment:
I'd suggest using Anaconda to install python and all python packages that
you need. Once you have Anaconda installed you can type `conda install
django` and that should work. Also I'd suggest sticking with the lastest
version of python (3.7) that installs wit
Hobs added the comment:
Just noticed the other entries for not. Not a bug.
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
New submission from Hobs:
Shouldn't the [operator precedence
table](https://docs.python.org/3.4/reference/expressions.html#operator-precedence),
5th row, 1st column, just say "`not`" rather than "`not` x"? The other rows
are identified by the keyword for the opera
New submission from Hobs:
New-style and old-style class expalanation in the datamodel section has minor
grammatical errors and one minor ambiguity that could be improved.
http://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes
* "independently of" should
Hobs added the comment:
Seems like a great idea. `foo(**dict(args))` is very useful.
I tested `foo(**dict(iter(o.__dict__.items(` on python 2.7 Mac OSX for my
foo and it worked well.
--
nosy: +Hobson.Lane
___
Python tracker
<h
Hobs added the comment:
shutil.whatever with os.startfile(..., 'edit').
That's why I thought an 'auto' option might be useful--to allow the caller
to indicate that they want to respect the OS settings for open/run, if
possible.
--
_
Hobs added the comment:
Then they or we can add Konqueror, etc to the options that are 'try'ed for
the 'view' option. Worst case they get a terminal cat of the file instead
of an error message or unintended action (like running a script). What
exactly are you proposing t
Hobs added the comment:
In Linux we could `try` nautilus then Mozilla
(file://.../containing_folder) then fall back to a shell `cd && ls` if no
browser is available, raising NotImplemented if all else fails... until
someone implements for that user's platform particulars. Likewis
Hobs added the comment:
Could even add an `operation` parameter to let the caller select actions,
including 'auto' implemented as Larry suggests. Sometimes you feel like
trusting the user's xdg-open preferences/settings. Sometimes you don't.
Easy enough to let the caller
Hobs added the comment:
Had no idea. Sounds like a good place for it.
On Apr 28, 2012 6:54 AM, "Miki Tebeka" wrote:
>
> Miki Tebeka added the comment:
>
> Just to note there's http://pypi.python.org/pypi/desktop/0.4 out there.
>
Hobs added the comment:
I can see why this partial implementation of `operation` in this ver seems
useless. But it is a placeholder for eventually providing Linux/Mac users
with the same functionality as windows. The os.startfile() or
shutil.launch() function can easily fill the gap left by the
Hobs added the comment:
Yea, I hosed up the path quoting in a misguided attempt at shortening for
80-col line-wrapping. Yours is better, will revert.
On Tue, Apr 24, 2012 at 2:09 AM, Chris Rebert wrote:
>
> Chris Rebert added the comment:
>
> Also:
>
> The FileNotFoundErr
Hobs added the comment:
Because that's how I caused the exception in
Ubuntu--shutil.launch('file_that_doesnt_exist'). That's why I changed the
message to "file may not exist" for both 2 and 4, but should probably prove
that 2 sometimes happens when the file does
Hobs added the comment:
Eric, the documentation (shutil.rst) looks fine. Just a code comment typo.
--
___
Python tracker
<http://bugs.python.org/issue14
Hobs added the comment:
I'll be happy to code, test, and use the new .() function wherever it
ends up and whatever it is named... but...
> Initially this issue was about implementing a startfile-equivalent on
> posix. But if you have to add a gui option to startfile to not
Hobs added the comment:
Last patch was invalid and untested.
New patch passes `make patchtest`, but still doing the full test suite on
Windows and Linux.
Still unsure if I raised the right exceptions with the right arguments.
--
Added file: http://bugs.python.org/file25317
Hobs added the comment:
New patch incorporates improvements from pitrou, cvrebert, r.david.murray,
eric.araujo, cool-RR
--
Added file: http://bugs.python.org/file25315/shutil_open.patch
___
Python tracker
<http://bugs.python.org/issue3
New submission from Hobs :
This patch fixes a 1-character typo in the docstring for shutil.disk_usage().
--
assignee: docs@python
components: Documentation
files: shutil_disk_usage_doc.patch
keywords: patch
messages: 159035
nosy: Hobson.Lane, docs@python, eric.araujo
priority: normal
Hobs added the comment:
@Éric
Thanks for clearing up my misunderstanding of os and shutil. I get it now.
I'm sure you know this, and it's clear you agree with changing the name,
but just to add fire to your resolve, the difference between shutil.open()
and the other `*.open()` m
Hobs added the comment:
Does no one like "os.startfile" as a home for this? Besides myself and the
original 2008 proposer, of course. Can anyone explain to us newbies why
it's a bad idea to have the cross-platform module do things identically
across platforms?
@David,
`shutil
Hobs added the comment:
Implement shutil.launch() & fix minor shutil.disk_usage() doctext typo
Name changed from shutil.open to shutil.launch due to namespace conflict with
open() builtin within the shutil module and for users that do
from shutil import *
On Ubuntu Oneiric L
Hobs added the comment:
Test passes on Ubuntu Oneiric Linux and 'open' action appropriately defaults to
launching an editor for my particular OS settings.
Tests on Windows in work.
--
Added file: http://bugs.python.org/file25311/shutil
Hobs added the comment:
@eric.araujo, @giampaolo.rodola,
(http://bugs.python.org/issue3177#msg140275)
I'm not sure I understand why this was moved to shutil.open. It seems
appropriate to try to accomplish what os.startfile() does in a cross-platform
way. Don't many of the other
25 matches
Mail list logo