New submission from Dun Peal:
# The following reproduction is running on Ubuntu 13.04, Python 3.3.1:
$ ls
bar
$ python3 -c import os; os.rename('foo', 'bar')
Traceback (most recent call last):
File string, line 1, in module
FileNotFoundError: [Errno 2] No such file or directory: 'bar
Hi,
In a stack trace, is it possible to somehow get the arguments with
which each function was called?
So for example, if function `foo` in module `bar` was called with
arguments `(1, [2])` when it raised an exception, then instead of:
Traceback (most recent call last):
File bar.py,
On Jun 7, 1:23 pm, Neil Cerutti ne...@norwich.edu wrote:
Use pdb.
Neil, thanks for the tip; `pdb` is indeed a great debugging tool.
Still, it doesn't obviate the need for arguments in the stack trace.
For example:
1) Arguments in stack trace can expedite a debugging session, and even
obviate
Hi!
Here's the demonstrating code:
# module foo.py
var = 0
def set():
global var
var = 1
Script using this module:
import foo
from foo import *
print var, foo.var
set()
print var, foo.var
Script output:
0 0
0 1
Apparently, the `var`
OK, I understand now.
`from foo import var` means create a module-global name `var` inside
the current module, and have it point at the object `foo.var` is
pointing at (following its evaluation).
Naturally, regardless of whether `foo.var` ever changes, the global
`var` of the current module
P.S. now I have to ask: is there a symbolic reference in Python, i.e.
a name foo that points to whatever bar.baz is pointing at?
Thanks, D.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm writing and testing an asyncore-based server. Unfortunately, it
doesn't seem to work. The code below is based on the official docs and
examples, and starts a listening and sending dispatcher, where the
sending dispatcher connects and sends a message to the listener - yet
On Apr 20, 3:01 pm, Jean-Paul Calderone calderone.jeanp...@gmail.com
wrote:
You didn't let the program run long enough for the later events to
happen. loop(count=1) basically means one I/O event will be processed
- in the case of your example, that's an accept(). Then asyncore is
done and it
On Wed, Oct 20, 2010 at 6:52 AM, Stefan Behnel stefan...@behnel.de wrote:
Well, the estimate is about one man-month, so it would be doable in about
three months time if we had the money to work on it. So far, no one has made
a serious offer to support that project, though.
I find myself
On Mon, Oct 18, 2010 at 1:41 AM, Stefan Behnel stefan...@behnel.de wrote:
Or, a bit shorter, using Cython 0.13:
def only_allowed_characters(list strings):
cdef unicode s
return any((c 31 or c 127)
for s in strings for c in s)
Very cool, this caused me to
`all_ascii(L)` is a function that accepts a list of strings L, and
returns True if all of those strings contain only ASCII chars, False
otherwise.
What's the fastest way to implement `all_ascii(L)`?
My ideas so far are:
1. Match against a regexp with a character range: `[ -~]`
2. Use
On Oct 4, 7:23 pm, Lawrence D'Oliveiro l...@geek-
central.gen.new_zealand wrote:
You can already check the exit status from the subprocess. What more do you
need?
A robust mechanism to deal with said issues...
Of course I can write it myself, but it would save much time and
effort if I could
Hi folks,
I'm writing a Python program to operate on Git repositories.
The program works at the user level of abstraction: i.e. it needs to
do everything that an end user can do with Git.
I'm talking about the high-level commands like git-clone, git-branch,
git-fetch, git-merge, git-rebase,
On Oct 4, 4:04 pm, Lawrence D'Oliveiro l...@geek-
central.gen.new_zealand wrote:
Why not just call Git itself?
That's what I'm doing right now, but since this is a mission-critical
process, it would be nice to have a more reliable exception detection
and handling mechanism. With my straight
14 matches
Mail list logo