Change by Aurora :
--
pull_requests: +24543
status: pending -> open
pull_request: https://github.com/python/cpython/pull/18210
___
Python tracker
<https://bugs.python.org/issu
Change by Aurora :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue39480>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Aurora :
--
title: .python_history write permission improvements -> Improved the site
module's permission handling while writing .python_history
___
Python tracker
<https://bugs.python.org/issu
Change by Aurora :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue39468>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Aurora :
--
pull_requests: -17675
___
Python tracker
<https://bugs.python.org/issue39468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aurora :
--
pull_requests: +17677
pull_request: https://github.com/python/cpython/pull/18299
___
Python tracker
<https://bugs.python.org/issue39
Change by Aurora :
--
pull_requests: -17589
___
Python tracker
<https://bugs.python.org/issue39468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aurora :
--
pull_requests: -17674
___
Python tracker
<https://bugs.python.org/issue39468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aurora :
--
pull_requests: +17675
pull_request: https://github.com/python/cpython/pull/39468
___
Python tracker
<https://bugs.python.org/issue39
Change by Aurora :
--
pull_requests: +17674
pull_request: https://github.com/python/cpython/pull/18299
___
Python tracker
<https://bugs.python.org/issue39
Change by Aurora :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39455>
___
___
Python-bugs-list
Change by Aurora :
--
title: Autofill the closing paraenthesis during auto-completion for functions
which accept no arguments at all -> (readline) Autofill the closing parenthesis
during auto-completion for functions which accept no arguments at
Change by Aurora :
--
title: Update the documentation for linecache module -> Update the
documentation for the linecache module
___
Python tracker
<https://bugs.python.org/issu
Aurora added the comment:
This example is practically against Python's diversity statement.
--
nosy: +opensource-assist
___
Python tracker
<https://bugs.python.org/issue39
Change by Aurora :
--
pull_requests: +17589
pull_request: https://github.com/python/cpython/pull/18210
___
Python tracker
<https://bugs.python.org/issue39
Change by Aurora :
--
pull_requests: -17586
___
Python tracker
<https://bugs.python.org/issue39468>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aurora :
--
keywords: +patch
pull_requests: +17586
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18210
___
Python tracker
<https://bugs.python.org/issu
Aurora added the comment:
https://github.com/opensource-assist/cpython/blob/opensource-assist-patch-sitepy-1/Lib/site.py
--
___
Python tracker
<https://bugs.python.org/issue39
New submission from Aurora :
On a typical Linux system, if you run 'chattr +i /home/user/.python_history',
and then run python, then exit, the following error message will be printed out:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/lib/pyth
New submission from Aurora :
Added the definitions for two undocumented functions.
--
assignee: docs@python
components: Documentation
messages: 360709
nosy: docs@python, opensource-assist
priority: normal
pull_requests: 17572
severity: normal
status: open
title: Update
Aurora added the comment:
That's a nice simple idea.
--
nosy: +opensource-assist
___
Python tracker
<https://bugs.python.org/issue39449>
___
___
Python-bug
Change by Aurora :
--
versions: -Python 3.9
___
Python tracker
<https://bugs.python.org/issue39314>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aurora added the comment:
@eryksun So modify the documentation to note that they're operable on both
platforms.
I've seen that ntpath worked on my Linux system, but the documentation was
misleading.
--
___
Python tracker
<https://bugs.python.
New submission from Aurora :
According to https://docs.python.org/dev/library/undoc.html the 'ntpath' module
is an "Implementation of os.path on Win32 and Win64 platforms".
Just like all other Windows-specific modules(like winreg),'ntpath' must not be
available for use on a POSIX s
Change by Aurora :
--
components: +Library (Lib) -Interpreter Core
type: behavior ->
___
Python tracker
<https://bugs.python.org/issue39319>
___
___
Python-
Change by Aurora :
--
title: Autofill the closing paraenthesis during auto-completion for functions
which accept no arguments -> Autofill the closing paraenthesis during
auto-completion for functions which accept no arguments at all
___
Pyt
Aurora added the comment:
@xtreak
Understood, just as an aftermath:
I still disagree a little with such an implementation because it's riding way
into terse-coding that it's going against the principles of mathematics, which
is the basis of computer science and programming.
Python can use
New submission from Aurora :
If Python is compiled with the GNU readline headers, it will provide
autocompletion for Python functions and etc.
In the Python interpreter environment, if a function is typed partially, Python
will fill in the rest if a tab character is typed.
If a function
New submission from Aurora :
It's meaningless for the count argument to have a negative value, since there's
no such thing as negative count for something.
--
components: Library (Lib)
messages: 359795
nosy: opensource-assist
priority: normal
severity: normal
status: open
title: Don't
New submission from Aurora :
I'm failing to build the cpython/Doc dir.
The full build log is as follows:
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b epub -d build/doctrees -D
latex_elements.papersize= -W . build/epub
Running Sphinx v2.2.0
First of all, if you run this on the console, find out your console's
encoding. In my case it is English Windows XP. It uses 'cp437'.
C:\chcp
Active code page: 437
Then
s = José
u = uJos\u00e9 # same thing in unicode escape
s.decode('cp437') == u # use encoding that match your
Yes. But they have different motivations.
The mini-language concept is to design an input format that is convenient
for human editor and that is close to the semi-structured data source. I
think the benefit from ease of editing and flexibility would justify
writing a little parsing code.
P.S. Also it is a 'mini-language' because it is an ad-hoc design that is
good enough and can be easily implemented for a given problem. This is
oppose to a general purpose solution like XML that is one translation from
the original data format and carries too much baggages.
Just consider
This is an entry I just added to ASPN. It is a somewhat novel technique I
have employed quite successfully in my code. I repost it here for more
explosure and discussions.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475158
wy
I agree. I just keep rewriting the parse method again and again.
wy
def parse_iso8601_date(s):
Parse date in iso8601 format e.g. 2003-09-15T10:34:54 and
returns a datetime object.
y=m=d=hh=mm=ss=0
if len(s) not in [10,19,20]:
raise ValueError('Invalid
pyregex is a command line tools for constructing and testing Python's
regular _expression_. Features includes text highlighting, detail break
down of match groups, substitution and a syntax quick reference. It is
released in the public domain.
Screenshot and download from
On Fri, 27 Jan 2006 06:35:46 -0800, Paul McGuire
[EMAIL PROTECTED] wrote:
Nice! I just adapted my pyparsing unit tests to use this tool - took me
about 3 minutes, and now it's much easier to run and review my unit test
results. I especially like the pass/fail color coding, and the
Greeting,
HTMLTestRunner is an extension to the Python standard library's unittest
module. It generates easy to use HTML test reports. See a sample report at
http://tungwaiyip.info/software/sample_test_report.html.
Check more information and download from
Cool, it works! I have also done some due diligence that the utf-8
encoding would not introduce any Python escape accidentially. I have
written a recipe in the Python cookbook:
Efficient character escapes decoding
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466293
wy
Does this
I have some unicode string with some characters encode using python
notation like '\n' for LF. I need to convert that to the actual LF
character. There is a 'unicode_escape' codec that seems to suit my purpose.
encoded = u'A\\nA'
decoded = encoded.decode('unicode_escape')
print
You seem to be assuming that a yield statement and a function call are
equivalent. I'm not sure that's a valid assumption.
I don't know. I was hoping the compiler can optimize away the chain of
yields.
Anyway, here's some data to consider:
test.py
I love generator and I use it a lot. Lately I've been writing some
recursive generator to traverse tree structures. After taking closer look
I have some concern on its performance.
Let's take the inorder traversal from
http://www.python.org/peps/pep-0255.html as an example.
def inorder(t):
On Windows (XP) with win32 extension installed, a Python script can be
launched from the command line directly since the .py extension is
associated with python. However it fails if the stdin is piped or
redirected.
Assume there is an echo.py that read from stdin and echo the input.
be there after the null character. It is easy enough to truncate
them. But why does it get there in the first place? Is the data length
somehow calculated wrong?
I'm using Windows XP SP2 with Python 2.4 and pywin32-203.
aurora
--
http://mail.python.org/mailman/listinfo/python-list
I do something more or less like your option b. I don't think there is any
orthodox structure to follow. You should use a style that fit your taste.
What I really want to bring up is your might want to look at refactoring
your module in the first place. 348 test cases for one module sounds
In Python 2.4, use the new subprocess module for this. It subsume the
popen* methods.
Hi,
I'm a newbie, so please be gentle :-)
How would I run a shell command in Python?
Here is what I want to do:
I want to run a shell command that outputs some stuff, save it into a
list and do stuff with
It was discussed in the last Bay Area Python Interest Group meeting.
Thursday, February 10, 2005
Agenda: Developing Responsive GUI Applications Using HTML and HTTP
Speakers: Donovan Preston
http://www.baypiggies.net/
The author has a component LivePage for this. You may find it from
On Sat, 19 Feb 2005 18:44:27 +0100, Fredrik Lundh [EMAIL PROTECTED]
wrote:
aurora [EMAIL PROTECTED] wrote:
I don't want to mix them. But how could I find them? How do I know
this statement can be
potential problem
if a==b:
where a and b can be instantiated individually far away from
On Sun, 20 Feb 2005 15:01:09 +0100, Martin v. Löwis [EMAIL PROTECTED]
wrote:
Nick Coghlan wrote:
Having , u, and r be immutable, while b was mutable would seem
rather inconsistent.
Yes. However, this inconsistency might be desirable. It would, of
course, mean that the literal cannot be a
On 18 Feb 2005 19:10:36 -0800, [EMAIL PROTECTED] wrote:
It's really funny, I cannot send a unicode stream throuth socket with
python while all the other languages as perl,c and java can do it.
then, how about converting the unicode string to a binary stream? It is
possible to send a binary through
I have long find the Python default encoding of strict ASCII frustrating.
For one thing I prefer to get garbage character than an exception. But the
biggest issue is Unicode exception often pop up in unexpected places and
only when a non-ASCII or unicode character first found its way into
Not sure about the repeated hi. But you are supposed to use \r\n\r\n, not
just \n\n according to the HTTP specification.
#!/usr/bin/python
import cgi
print Content-type: text/html\n\n
print hi
Gives me the following in my browser:
'''
hi
Content-type: text/html
hi
'''
Why are there two 'hi's?
On Fri, 18 Feb 2005 18:36:10 +0100, Peter Otten [EMAIL PROTECTED] wrote:
Rory Campbell-Lange wrote:
#!/usr/bin/python
import cgi
print Content-type: text/html\n\n
print hi
Gives me the following in my browser:
'''
hi
Content-type: text/html
hi
'''
Why are there two 'hi's?
You have chosen a bad
You could not. Unicode is an abstract data type. It must be encoded into
octets in order to send via socket. And the other end must decode the
octets to retrieve the unicode string. Needless to say the encoding scheme
must be consistent and understood by both ends.
On 18 Feb 2005 11:03:46
On Fri, 18 Feb 2005 20:18:28 +0100, Walter Dörwald [EMAIL PROTECTED]
wrote:
aurora wrote:
[...]
In Java they are distinct data type and the compiler would catch all
incorrect usage. In Python, the interpreter seems to 'help' us to
promote binary string to unicode. Things works fine
On Fri, 18 Feb 2005 21:16:01 +0100, Martin v. Löwis [EMAIL PROTECTED]
wrote:
I'd like to point out the
historical reason: Python predates Unicode, so the byte string type
has many convenience operations that you would only expect of
a character string.
We have come up with a transition
IE should be able to do that. Install the win32 modules. Then you should
simply embed Python using script language='python'. Not sure about Mac.
Even on Windows your audiences are limited to those who have
IE+python+win32 modules.
Are there any ways to use Python (rather than JavaScript)
Go to the bookstore and get a copy of Python Programming on Win32
by Mark Hammond, Andy Robinson today.
http://www.oreilly.com/catalog/pythonwin32/
It has everything you need.
Is there a way to make programs written in these two languages
communicate
with each other? I am pretty sure that
aurora [EMAIL PROTECTED] writes:
Slow compares to what? For a large commerical site with bigger budget,
better infrastructure, better implementation, it is not surprising
that they come out ahead compares to hobbyist sites.
Hmm, as mentioned, I'm not sure what the commercial sites do that's
from it
subsequencely.
In anycase the number of function call seems to make sense and it should
give some insight to the runtime behaviour. The CPU time is just so
misleading.
aurora wrote:
But the numbers look skeptical. Hotspot claim 71.166 CPU seconds but
the actual elapsed time
print d.encode('cp437')
So I would have to specify the encoding on every call to print? I am
sure to
forget and I don't like the program dying, in my case garbled output
would be
much more acceptable.
Marian I'm with you. You never known you have put enough encode in all the
right places
A frequent error I encounter
try:
...do something...
except IOError:
log('encounter an error %s line %d' % filename)
Here in the string interpolation I should supply (filename,lineno).
Usually I have a lot of unittesting to catch syntax error in the main
code. But it is very
On Tue, 01 Feb 2005 20:28:11 +0100, Marian Aldenhövel
[EMAIL PROTECTED] wrote:
Hi,
I am very new to Python and have run into the following problem. If I do
something like
dir = os.listdir(somepath)
for d in dir:
print d
The program fails for filenames that contain
I have a parser I need to optimize. It has some disk IO and a lot of
looping over characters.
I used the hotspot profiler to gain insight on optimization options. The
methods show up on on the top of this list seems fairly trivial and does
not look like CPU hogger. Nevertheless I optimized
Let's stop discussing about the perl-python non-sense. It is so boring.
For a break, just visit Mr Xah Lee's personal page
(http://xahlee.org/PageTwo_dir/Personal_dir/xah.html). You'll find lot of
funny information and quotes from this queer personality. Thankfully no
perl-python stuff
the host name and not sending the host header either the web server
wouldn't what address it is really looking for. If you caught some request
that doesn't have host header it is a good idea to redirect them to a
browser upgrade page.
Thanks, aurora ;),
aurora wrote:
If you actually want
If you actually want the IP, resolve the host header would give you that.
In the redirect case you should get a host header like
Host: www.python.org
From that you can reconstruct the original URL as
http://www.python.org/ftp/python/contrib/. With that you can open it using
urllib and proxy
It is really necessary to build a VM from the ground up that includes OS
ability? What about JavaScript?
On Wed, Jan 26, 2005 at 05:18:59PM +0100, Alexander Schremmer wrote:
On Tue, 25 Jan 2005 22:08:01 +0100, I wrote:
sys.safecall(func, maxcycles=1000)
could enter the safe mode and call the
On Sat, 22 Jan 2005 10:03:27 -0800, aurora [EMAIL PROTECTED] wrote:
I am think more in the line of string.ljust(). So if we have a
list.ljust(length, filler), we can do something like
name, value = s.split('=',1).ljust(2,'')
I can always break it down into multiple lines. The good thing
Thanks. I'm just trying to see if there is some concise syntax available
without getting into obscurity. As for my purpose Siegmund's suggestion
works quite well.
The few forms you have suggested works. But as they refer to list multiple
times, it need a separate assignment statement like
to matter much today. But in 10 years we might be really glad that we have
tried.
aurora [EMAIL PROTECTED] writes:
Just gone though an article via Slashdot titled The Free Lunch Is
Over: A Fundamental Turn Toward Concurrency in Software
[http://www.gotw.ca/publications/concurrency-ddj.htm
Hello!
Just gone though an article via Slashdot titled The Free Lunch Is Over: A
Fundamental Turn Toward Concurrency in Software
[http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the
continous CPU performance gain we've seen is finally over. And that future
gain would
72 matches
Mail list logo