don't know where your 17 seconds is going.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
n a few weeks.
We'd use some open-source tools, WireShark among them,
plus some Microsoft tools for which we might have to
pay, plus the SQLite3 project's C library. With that
investment I'd bet we could diagnose, but not cure.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
fix? I'm not a Tornado user; I don't have a patch.
Obviously Laszlo's polling strategy is not performing, and the
solution is to adopt the event-driven approach that epoll and Tornado
do well.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
bably unwise" according to Linux man
page on close(2).
Do you really need to worry about it? If your process is being
forcibly terminated you probably cannot do anything better than the OS
will do by default.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
;re reading about lists, tuples, and
dictionary data? Great, but other home accounting businesses have
their client databases automatically synced with their smart-phones
and their time-charging and their invoicing.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Mark R Rivet wrote:
> Well I have to say that this is most discouraging.
Sorry to to be a drag, but the thread needed a bit a realism.
--
http://mail.python.org/mailman/listinfo/python-list
the edge on asynchronous
facilities but Python treats Windows like a Unix wanna-be.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
pecial within
the particular class. To the Python language it's just another name,
but the authors of the class have coded it to look up that name and do
something interesting with the associated value.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
eads.
Dustin, I hope you carry on with your plan. I request, please, report
back here what you find. As law professor James Duane said in pre-
introduction of police officer George Bruch, "I'm sure [you'll] have a
lot to teach all of us, including myself."
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
ot;, should
work on Unix. And everywhere it runs it should respect shebang lines
that name itself. The modern shebang line ought to be "#!/usr/bin/env
py -3" (but it's not yet so don't use it).
The other big idea in supporting multiple Pythons is virtual
environmen
SherjilOzair wrote:
> Has it been considered to add shell features
> to python, such that it can be used as a
> default shell, as a replacement for bash, etc.
I think yes, but rather than become a shell, Python makes easy
programming a shell that can execute Python code. The tendency has
been to e
global
variabel. It could be a class for which users can make any number of
instances.
Third, there are cases where you want a single global. Most of the
time I'd recommend warning users about threading assumptions.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
threading' will fail. There's a
standard library module dummy_threading which offers fake versions of
the facilities in threading. It suggests:
try:
import threading as _threading
except ImportError:
import dummy_threading as _threading
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
mports like any other competent module. The tricky part
doesn't start until you actually use its facilities.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
o I'm as much blame as anyone.
Something to keep in mind for Python 4.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> Bryan wrote:
> > Python 3(K) likes to use the same '.py' file extension as its
> > incompatible predecessors,
>
> And so it should.
We disagree. Not surprising in a "gotcha's" thread.
> > and in some/many/most
the stated reason why paramiko did not yet play with Python 3. Even
more recently, PyCrypto has gone green on the Python 3 Wall of Shame.
Anyone know recent news on the status of paramiko?
Thanks,
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
raries to catch up. Of course
they can, as I am, but the gotchas are really annoying. With minor
versions its not a big deal if most users simply wait to do an
upgrade.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
se they both use the same file extension.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
han the purpose-built automatic table-generators of Django
and Web2Py.
Then there are the less than full-stack frameworks and libraries. But
this post is probably too long already.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith wrote:
> Bryan wrote:
> > Django has emphasized backwards compatibility with the
> > down-side that, last I heard, there was no plan to move to Python 3.
>
> Hardly. Seehttps://www.djangoproject.com/weblog/2012/mar/13/py3k/
Ah, I'm behind the times again
e in one short thread: Last I
heard -- please correct me if I'm wrong -- Web2py had no plan for to
move to Python 3.
-Bryan
--
http://mail.python.org/mailman/listinfo/python-list
is there a rough estimate somewhere that shows currently how many python 1.5 vs
2.2 vs 2.3 vs 2.4 users there are? have a majority moved to 2.4? or are they
still using 2.3? etc...
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Bryan wrote:
>
>>is there a rough estimate somewhere that shows currently how many python 1.5
>>vs
>>2.2 vs 2.3 vs 2.4 users there are? have a majority moved to 2.4? or are they
>>still using 2.3? etc...
>
>
> Here are curren
Xah Lee wrote:
> Addendum, 200510
>
> Here's further example of Python's extreme low quality of
> documentation. In particular, what follows focuses on the bad writing
> skill aspect, and comments on some language design and quality issues
> of Python.
>
>>From the Official Python documentation o
mr. xah... would you be willing to give a lecture at pycon 2006? i'm sure you
would draw a huge crowd and a lot of people would like to meet you in person...
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
s a
structure,
use a tuple. if you view it a sequence, use a list. in this example, i view
it
as a stucture, so i would use (width, height) as a tuple.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
(x1, y1), (x2, y2), ...]. to me,
it doesn't matter if you want to modify a point. if you do then create a new
one, but don't make it a list just to make it modifiable.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
ion. therefore, python was the
obvious choice for me.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
e" not "cale". nothing like a hot bowl of tofu kale soup
while reading the recipes in the "python cookbook".
bryan
--
http://mail.python.org/mailman/listinfo/python-list
always get not in sys.path
What am I missing? Or is pdb fubar?
Suse93 btw.
thanks,
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
is claim seems pretty dubious to me.
i would not say sion's ratio of 5:1 is dubious. for what it's worth, i've
written i pretty complex program in jython over the last year. jython compiles
to java source code and the number of generated java lines to the jython lines
is 4:1.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
>
>
i agree with you... pyrex should be part of the python distribution :)
bryan
--
http://mail.python.org/mailman/listinfo/python-list
ny gui toolkits, and instead use that space
for more core funcionality.
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
can anyone tell me how the talks work? there are between 9 and 12 talks for
each time slot. do all talks start at the same time? or are there just four
talks at a time and the columns show what talks are in a given room? is it easy
to go to the talks you want?
thanks,
bryan
--
http
Eric Pederson wrote:
From: Arthur <[EMAIL PROTECTED]>
Not sure how Xah got himself into all this.
One can easily see that Java programmers are geeks who secretly wanted to make the
football team and are now trying to conform, ignoring their language's critical lack of
Prolog syntax. Python c
nt only gets executed if and only if the opening of the
resource doesn't raise an exception. it has nothing to do with exception handling.
in the previous 2 examples s = ... was placed inside the try/finally, but if an
exception occures and s doesn't get bound to an object, then s.
Dan Perl wrote:
"Bryan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
IMO, that is not the reason for the try/finally statement and it is not
redundant. the try/finally statement guarantees the resource is closed
and the try/finally statement only gets execute
Fredrik Lundh wrote:
"Bryan" wrote
the above is not the same. make the a = ... raise an exception and you'll see
the difference.
s = ... #
a = 1/0
s.close()
as you can see, s.close() will never be called. also, in this example, i intentionally didn't put
the extra try/e
modules index page open and i always wished there was an explicit link to
lists, tuples, dict, set, etc. maybe these explicit links could be at the top
of the __builtins__ page.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
to see wx included in the standard distrubution.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Quick question:
Why does os._exit called from a Python Timer kill the whole process while
sys.exit does not? On Suse.
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
arifications. One more question, can I catch this
exception in my main thread and then do another sys.exit() to kill the whole
process?
Apparently sys.exit() allows the program to clean up resources and exit
gracefully, while os._exit() is rather abrupt.
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
ng it up.
>
> regards
> Steve
steve,
are you thinking about moveable python?
http://www.voidspace.org.uk/python/movpy/
bryan
--
http://mail.python.org/mailman/listinfo/python-list
gt; can write
>
> a, (b ,c) = 1, (2,3)
>
> I'd like to write
>
> def foo(a, (b,c)):
> ...
>
> foo(1, (2,3))
>
> too.
>
> Diez
exactly... consistency is the most important thing here. i use this style all
the time. i will be very disappointed to find this removed from python. i'm +1
for keeping it.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
ange it
to '0').
i tried c &= c - 1 but i'm not getting the least significant or rightmost bit
reset to zero. am i misunderstanding something?
>>> 2 & 1 # 2 = 0x10; reset right most would be 0x10
0
>>> 10 & 9 # 10 = 0x1010; reset right most would be 0x1010
8
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
Bryan wrote:
is to reset the rightmost (less significant) '1' bit of a number (ie
change it to '0').
i tried c &= c - 1 but i'm not getting the least significant or
rightmost bit reset to zero. am i misunderstanding something?
2 & 1 # 2
http://xahlee.org/PageTwo_dir/more.html
this is the first thing that came to my mind. i'm sure there are more clever
ways to do this.
elements = [['x', 'x', 'x', '1'],
['x', 'x', 'x', '2'],
['x', 'x', 'x', '2'],
['x', 'x', 'x', '2'],
['x', 'x', 'x', '3'],
['x', 'x', 'x', '4'],
['x', 'x', 'x', '5'],
['x', 'x', 'x', '5']]
pos = {}
for i, element in enumerate(elements):
pos.setdefault(element[-1], []).append(i+1)
p = pos.values()
p.sort()
[[1], [2, 3, 4], [5], [6], [7, 8]]
bryan
--
http://mail.python.org/mailman/listinfo/python-list
i:i+60]
couldn't you change the above for loop to:
print wraptext.fill(seq, 60)
bryan
def main():
seq = []
for line in sys.stdin:
if line[0] in ';>':
show(''.join(seq))
print line,
del seq[:]
else:
is there a way to determine the operating system's language? i can't seem to
find a method that returns the value.
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Bryan wrote:
is there a way to determine the operating system's language? i can't
seem to find a method that returns the value.
thanks,
bryan
found it myself, thanks...
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'cp1252')
>>>
--
http://mail.python.org/mailman/listinfo/python-list
, 3, 3)
True
>>> sys.hex_version
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: 'module' object has no attribute 'hex_version'
bryan
--
http://mail.python.org/mailman/listinfo/python-list
attr__ or
the new __getattribute__ methods. does anyone know how to port this recipe to
the new class style?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Nick Coghlan wrote:
Bryan wrote:
i'm also curious if it's possible to write this recipe using the new
class style for the Deffered class.it appears you can nolonger
delegate all attributes including special methods to the contained
object by using the __getattr__ or the new __geta
olest things i've
ever seen :)
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
27;t speak to
that, but i've never experienced an IO hang related to perforce.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
untested) is to
relax being single-threader for just a bit.
import thread
thread.start_new_thread(server.shutdown, ())
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
> Suggestion: Create a subclass of dict, the SecureDict or something,
> which could either perturb the hashes or even use a proper
> cryptographic hash function; normal dictionaries can continue to use
> the current algorithm. The description in Objects/dictnotes.txt
> suggest
ates to 2
in this case. how does itemgetter (and property) know what tuple to use? in
my
itemgetter sample, the tuple is passed to itemgetter so it's obvious to see
what's going on. but in the supertup example, it isn't obvious to me.
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
is it possible to get the list of search results from the search box from
wxPython's wxHtmlHelpControl without it displaying GUI? i don't see an obvious
way to do this.
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Bryan wrote:
> is it possible to get the list of search results from the search box from
> wxPython's wxHtmlHelpControl without it displaying GUI? i don't see an
> obvious
> way to do this.
>
> thanks,
>
> bryan
>
i meant wxPython's wxHtmlHelpCont
ading
if possible to give it a really attractive look. also, do you know if a pygame
windows can be embedded in a wxPython app?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
, 30), ("ao", 40)]
ar = area.T(size=(300,300), legend=legend.T(),
x_grid_style = None, y_grid_style = None)
plot = pie_plot.T(data=data, arc_offsets=[0,10,0,10],
shadow = (2, -2, fill_style.gray50),
label_offset = 25,
arrow_style = arrow.a3)
ar.add_plot(plot)
ar.draw()
bryan
--
http://mail.python.org/mailman/listinfo/python-list
mod_python:
Py_Initialize() succeeded
PyThreadState_Swap(NULL) failed
sucess case when apache doesn't load mod_python:
Py_Initialize() succeeded
PyThreadState_Swap(NULL) succeeded
thanks,
bryan
--- mod_xxx ---
Py_Initialize();
if (Py_IsInitialized()) {
log("Py_In
Jack Diederich wrote:
> On Fri, Aug 18, 2006 at 02:21:40PM -0700, Bryan wrote:
>> i've written a program that uses python c api code that lives in a
>> shared library that is loaded by a custom apache module (mod_xxx). this
>> python c api code all works correctly
();
interpreter = PyThreadState_Swap(NULL);
what could another library do to make this fail? and is there anything i can
do
to make this work in all situations?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
ck code in PyGILState_Ensure(), PyEval_SaveThread()
without success.
does anyone know what i have to do to the c callback to prevent python
from crashing?
thanks,
bryan
static void process_method(session *session)
{
PyObject *py_obj_session = NULL;
PyObject *py_mod_foo
Bryan wrote:
> hi,
>
> i have a multithreaded c server that calls process_method in a different
> c thread per each call. process_method calls a python function bar in
> module foo. function bar calls back into c. i've removed all the type
> error handling and
te_New wipes out, or rather gives you a new
global dictionary, because i lost all my global variables. the article
assumes you have one c thread per python thread state, but i want multiple
c threads per python thread state. Is there a c api function that will
associate a c thread without resettin
between jar files containing .class files and zip files
containing .pyc files.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Harry George wrote:
> See pygdchart
> http://www.nullcube.com/software/pygdchart.html
>
this looks pretty nice. i don't see in the docs if and how it can be
integrated
with other gui toolkits such wxpython. :(
bryan
--
http://mail.python.org/mailman/listinfo/python-list
of these language-x-isms that people on this list
have seen. i think it would be helpful to both the new java-to-python developer
and python developers in general to be aware of these.
just an idea.
feel free to discuss any language-x-isms, not necessarily just java-isms.
bryan
--
http://ma
es/software_hardware/numarray
this page says, "NumPy derives from the old Numeric code base and can be used
as
a replacement for Numeric."
http://numeric.scipy.org/
i looked at the matplotlib examples today and if i remember correctly, the
examples didn't use numarray.
so
Simon Percivall wrote:
> Bryan wrote:
>> hi,
>>
>> what is the difference among numeric, numpy and numarray? i'm going to start
>> using matplotlib soon and i'm not sure which one i should use.
>>
>>
>> this page says, "Numarray is a re-
Ben Sizer wrote:
> Bryan wrote:
>
>> at the end of that page, it says:
>>
>> "Numarray is another implementation of an arrayobject for Python written
>> after
>> Numeric and before NumPy. Sponsors of numarray have indicated they will be
>> moving t
ese methods in base class object
that
everything subclasses? then you wouldn't have to reimplement these methods on
your class either, right? i'm not arguing for one method or the other. just
curious about the difference.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Bryan wrote:
>
>> could you get the same result by putting these methods in base
> > class object that everything subclasses?
>
> and how do you make sure that everything subclasses this base class ?
>
>
>
in this hypothetical case,
Fredrik Lundh wrote:
> "Bryan" wrote:
>
>>> and how do you make sure that everything subclasses this base class ?
>> in this hypothetical case, i was assuming len() would be put in object and
>> every
>> class subclasses object implicitly or explicitly
ds against
that script but it didn't work. i'm using setuptools-0.6c2 if that is helpful
to anyone.
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
color = 'red'
percent = 100 * float(change) / (float(trade) - float(change))
data.append('http://finance.yahoo.com/q?s=%s";>%s%s (%s /
%.2f%%)' % (symbol, symbol, color, trade, change, percent))
return '%s' % ''.j
on2.3/xmlrpclib.py", line 1293, in __init__
> raise IOError, "unsupported XML-RPC protocol"
> IOError: unsupported XML-RPC protocol
>
> I know that I am using it incorrectly. Does the basic authentication support
> in xmlrpclib mean something else than I take
anyway to fix
this?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
would be like.
http://www.mozilla.org/hacking/working-with-seamonkey.html
i know python is currently using buildbot... are there any differences or
simplifications in the processes using buildbot?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
don't require any of these features, but extra browny points for any of
the following:
interactive interpreter
batteries included
can integrate with c
compiles to native code
can use a gui toolkit such as wx
doesn't take 60 hour weeks over years to master
thanks,
bryan
--
http://
egantly solve the suits vs developer issue. for those who like fancy images
on the home page, you could now have an image that clearly links to each
subdomain. you could even have a search on the home page that searches all the
python subdomains.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
tocompletion feature you talk, and I think this feature is very
> important. Where it is?
>
> Daniel
>
i saw this message too and i've been using it for the last couple days, but i
don't see the class/functions browser you are talking about. where is it???
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
i have never
found these interpreters to be anything but very robust and *IT IS SUITABLE* as
trial'n'error pad for real-world programming. the above comment can possible
only be made by someone who doesn't actually use it for real world programming.
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Somehow on my linux box I scrood things up and I lost my python path info.
If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where
it should show '/usr/'.
Is there a config file somewhere that I can change to fix this, or do I
need to do a rebuild/reinstall? Hope not.
Thanks,
B
Bryan wrote:
> Somehow on my linux box I scrood things up and I lost my python path info.
>
> If I check sys.exec_prefix or sys.prefix it shows '/usr/local/', where
> it should show '/usr/'.
>
> Is there a config file somewhere that I can change to fix
Hi,
I just started with python, and have a for loop question
In c++ (or a number of other languages) I can do this:
for (int i=0, j=0; i < i_len, j< j_len; ++i, ++j) {}
If I have this in python:
l = ['a', 'b', 'c']
I want to get the value and also an iterator:
for i,v in len(l), l:
pri
>>>> s[0] == chr(0)
> True
>
> - -- Gerhard
this works too :)
>>> s = '\x001'
>>> s[0] == chr(0)
True
>>> s = '\x00abc'
>>> s[0] == chr(0)
True
i think it would be more clear not to use 3 digits for this example si
> >>> keepchars = set(alphabet + alphabet.upper() + '1234567890-.')
or
>>> keepchars = set(string.letters + string.digits + '-.')
bryan
--
http://mail.python.org/mailman/listinfo/python-list
lue for python, but i did find other sites that
show java and c++ at 53 LOC/FP which is the same as this document. is it safe
to assume that python's value would be similar to perl's value of 21 ?
http://www.abo.fi/~kaisa/FN.pdf
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
does anyone know if matplotlib is robust enough to use in a commercial
application? are there any existing commercial or popular open source programs
that use it?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
> Tabs versus Spaces in Source Code
>
> Xah Lee, 2006-05-13
>
> In coding a computer program, there's often the choices of tabs or
> spaces for code indentation. There is a large amount of confusion about
> which is better. It has become what's known as “religious war” —
> a heated
, (2, ), (3, )]
>>> list(m[0][1])
[]
>>>
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis wrote:
> Bryan wrote:
>
>> can some explain why in the 2nd example, m doesn't print the list [1, 1, 1]
>> which i had expected?
>>
>>
>> >>> for k, g in groupby([1, 1, 1, 2, 2, 3]):
>> ... print k, list(g)
>>
example 9. does
biggles
integrate well wxPython? if so, do you have an example of how to add it to a
wxPython panel?
thanks,
bryan
--
http://mail.python.org/mailman/listinfo/python-list
s for the
formencode library. It is kind of scary upgrading my Python server
install without being sure all my libraries will work. Experiences??
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 13, 1:52 pm, Jason Scheirer wrote:
> On Feb 13, 12:42 pm, Bryan wrote:
>
> > I have a Python v2.5.2 server running and I found some undesirable
> > behavior in the xmlrpclib module that is included with that version of
> > Python. The xmlrpclib version that is
1 - 100 of 754 matches
Mail list logo