Am 02/21/10 22:09, schrieb Dennis Lee Bieber:
On Sat, 20 Feb 2010 23:12:50 +0100, Norman Rieß
declaimed the following in comp.lang.python:
Hello,
i am trying to read a large bz2 compressed textfile using the bz2 module.
The file is 1717362770 lines long and 8GB large.
Using this code
sour
On Mon, 22 Feb 2010 18:45:40 +1300, Gregory Ewing wrote:
> W. Martin Borgert wrote:
>
>> def myeval(untrustedinput):
>> return eval(untrustedinput, {"__builtins__": None},
>> { "abs": abs, "sin": math.sin })
>>
>> Is it possible to define functions or import modules from the
W. Martin Borgert wrote:
def myeval(untrustedinput):
return eval(untrustedinput, {"__builtins__": None},
{ "abs": abs, "sin": math.sin })
Is it possible to define functions or import modules from the
untrusted input string?
This is NOT safe as it stands. It still isn't saf
On Sat, Feb 20, 2010 at 10:48 PM, Steven D'Aprano
wrote:
> On Sat, 20 Feb 2010 21:21:47 -0800, Jonathan Gardner wrote:
>> For ten items, though, is it really faster to muck around with array
>> lengths than just copying the data over? Array copies are extremely fast
>> on modern processors.
>
> My
PAPER PRESENTATIONS AND SEMIMAR TOPICS.
CHECK OUR VAST PAPER PRESENTATIONS AND SEMIMAR TOPICS INCLUDING
PROJECTS FOR FREE AT
http://presentationsandseminars.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 21, 7:39 pm, rantingrick wrote:
> Mensanator snipped: """Yeah, I saw that. Funny that something
> important like that wasn't part of the announcement. I notice no
> mention of Mac OS, so visiting the website was a complete waste of
> time on my part, wasn't it?"""
>
> Oh Mensanator, why you
Thanks David.
Someone asked this question on the PyQt mailing list, too:
http://www.riverbankcomputing.com/pipermail/pyqt/2010-February/025827.html
That's my student, Helvin.
I believe it was also asked on the #pyqt IRC channel on freenode. I think
I have previously referred people with
On Feb 21, 2010, at 9:10 PM, Shashwat Anand wrote:
> Just got it working in mac. Installing dependencies took a bit though.
I used macports and it was only 2 installs:
# sudo port install py26-pygtksourceview
# sudo port install py26-gtk2
It sure did install a lot of other stuff, like a new g
Just got it working in mac. Installing dependencies took a bit though.
On Mon, Feb 22, 2010 at 7:38 AM, Philip Semanchuk wrote:
>
> On Feb 21, 2010, at 8:39 PM, rantingrick wrote:
>
>
>>
>> Mensanator snipped: """Yeah, I saw that. Funny that something
>> important like that wasn't part of the ann
On Feb 21, 2010, at 8:39 PM, rantingrick wrote:
Mensanator snipped: """Yeah, I saw that. Funny that something
important like that wasn't part of the announcement. I notice no
mention of Mac OS, so visiting the website was a complete waste of
time on my part, wasn't it?"""
Oh Mensanator, why
Mensanator snipped: """Yeah, I saw that. Funny that something
important like that wasn't part of the announcement. I notice no
mention of Mac OS, so visiting the website was a complete waste of
time on my part, wasn't it?"""
Oh Mensanator, why you always so grumpy? I visited your site a few
year
On Feb 21, 12:49 pm, Dennis Lee Bieber wrote:
Note: The author of this message requested that it not be archived.
This message will be removed from Groups in 6 days (Feb 28, 12:49 pm).
I've not seen a message via Gmane in something like 36
hours... and
find it hard to believe this group
On Monday 22 February 2010 01:17, Gib Bogle wrote:
>
>
> Traceback (most recent call last):
>File "ABM15.pyw", line 15, in
>File "PyQt4\Qwt5\__init__.pyc", line 32, in
>File "PyQt4\Qwt5\Qwt.pyc", line 12, in
>File "PyQt4\Qwt5\Qwt.pyc", line 10, in __load
>
On 21-02-2010 03:51, Ryan Kelly wrote:
On Sun, 2010-02-21 at 13:17 +1100, Lie Ryan wrote:
On 02/21/10 12:02, Stef Mientki wrote:
On 21-02-2010 01:21, Lie Ryan wrote:
On Sun, Feb 21, 2010 at 12:52 AM, Stef Mientki
wrote:
hello,
I would like m
My student is trying to build an executable version of a program that uses PyQt
and PyQwt, on Windows XP. She has installed: Python 2.6.1, Qt 4.5.0, PyQt 4.5,
and PyQwt 5.2.0. There is a module error on running the executable produced by
py2exe. Here is the info I got from my student:
On 22/02/2010 4:28 AM, vsoler wrote:
Hi everyone,
When I run a python script, I know that I can print the results of my
calculations on the Interactive Window. Once the scripts ends, I can
copy/pate these results on an OpenOffice Writer document.
However, I would like to know if I can somehow a
On Sun, 21 Feb 2010 22:25:11 +0100, W. Martin Borgert wrote:
> Hi,
>
> I know that this issue has been discussed before, but most of the time
> using only one argument to eval().
>
> Is it possible to use the following code, e.g. run as part of a web
> application, to break in and if so, how?
>
lallous wrote:
If the base defines the method and it was empty, then my C++ code
would still call the function. This is not optimal because I don't
want to go from C++ to Python if the _derived_ class does not
implement the cb.
I would simply not implement the method at all in the base
class. T
On Sun, 21 Feb 2010 13:40:54 -0800, Mensanator wrote:
> Yeah, I saw that. Funny that something important like that wasn't part
> of the
> announcement. I notice no mention of Mac OS, so visiting the website was
> a complete
> waste of time on my part, wasn't it?
Of course not. Now you know that M
Steven D'Aprano wrote:
On Sat, 20 Feb 2010 22:31:44 -0800, Carl Banks wrote:
The one place where Python does have references is when accessing
variables in an enclosing scope (not counting module-level).
What makes you say that?
I think Carl is talking about cells, which *are* actually ob
On Sun, 21 Feb 2010 11:07:24 -0800, marwie wrote:
>> x = SomeReallyBigListOrString
>> for item in x[1:]:
>> process(item)
>>
>> has to copy the entire list or string (less the first item). But
>> honestly, I've never found a situation where it actually mattered.
>
> Good grief, it copies that
On Sun, Feb 21, 2010 at 3:21 PM, John Nagle wrote:
> nobrowser wrote:
>>
>> Hi. The with statement is certainly nifty. The trouble is, the
>> *only* two documented examples how it can be used with the library
>> classes are file objects (which I use all the time) and thread locks
>> which I almo
nobrowser wrote:
Hi. The with statement is certainly nifty. The trouble is, the
*only* two documented examples how it can be used with the library
classes are file objects (which I use all the time) and thread locks
which I almost never use. Yet there are many, many classes in the
library whos
On Sun, 2010-02-21 at 23:05 +0100, Martin v. Loewis wrote:
> > It's far from scientific, but I've seen behaviour that's close to a 100%
> > performance penalty on a dual-core linux system:
> >
> >http://www.rfk.id.au/blog/entry/a-gil-adventure-threading2
> >
> > Short story: a particular te
> It's far from scientific, but I've seen behaviour that's close to a 100%
> performance penalty on a dual-core linux system:
>
>http://www.rfk.id.au/blog/entry/a-gil-adventure-threading2
>
> Short story: a particular test suite of mine used to run in around 25
> seconds, but a bit of ctypes
On Feb 21, 2010, at 4:40 PM, Mensanator wrote:
> On Feb 21, 12:14 pm, Paul Boddie wrote:
>> On 21 Feb, 17:32, Mensanator wrote:
>>
>>> On Feb 21, 10:30 am, Mensanator wrote:
>>
What versions of Python does it suuport?
>>
>>> What OS are supported?
>>
>> From the Web site referenced in
"Michael Pardee" wrote in message
news:mailman.22.1266722722.4577.python-l...@python.org...
I'm relatively new to python and I was very surprised by the following
behavior:
a=1
b=2
mylist=[a,b]
print mylist
[1, 2]
a=3
print mylist
[1, 2]
Whoah! Are python lists only for literals? Nope
Hi,
I know that this issue has been discussed before, but most of
the time using only one argument to eval().
Is it possible to use the following code, e.g. run as part of a
web application, to break in and if so, how?
import math
def myeval(untrustedinput):
return eval(untrustedinput, {"__
On Sun, 2010-02-21 at 22:22 +0100, Martin v. Loewis wrote:
> John Nagle wrote:
> >I know there's a performance penalty for running Python on a
> > multicore CPU, but how bad is it? I've read the key paper
> > ("www.dabeaz.com/python/GIL.pdf"), of course. It would be adequate
> > if the GIL ju
On Feb 21, 12:14 pm, Paul Boddie wrote:
> On 21 Feb, 17:32, Mensanator wrote:
>
> > On Feb 21, 10:30 am, Mensanator wrote:
>
> > > What versions of Python does it suuport?
>
> > What OS are supported?
>
> From the Web site referenced in the announcement (http://
> dreampie.sourceforge.net/):
>
>
On Feb 20, 5:55 pm, marwie wrote:
> On 21 Feb., 02:30, Steven D'Aprano
> cybersource.com.au> wrote:
> > Python lists are arrays of pointers to objects, so copying a slice is
> > fast: it doesn't have to copy the objects, just pointers. Deleting from
> > the end of the list is also quick, because
John Nagle wrote:
>I know there's a performance penalty for running Python on a
> multicore CPU, but how bad is it? I've read the key paper
> ("www.dabeaz.com/python/GIL.pdf"), of course. It would be adequate
> if the GIL just limited Python to running on one CPU at a time,
> but it's worse t
On Sun, Feb 21, 2010 at 1:09 PM, Dennis Lee Bieber
wrote:
> On Sat, 20 Feb 2010 12:46:24 -0800 (PST), chad
> declaimed the following in comp.lang.python:
>
>> Given the following
>>
>> #!/usr/bin/python
>>
>> import subprocess as s
>>
>> broadcast = s.Popen("echo test | wall", shell=True,stdo
FOREX : Foreign Exchange Market : FX : Currency Market : Earn Money
Quickly.
Simple Optimized Tips and Tricks, Basics of FOREX to be a king of
FOREX in one day.
Check out these exclusive never seen tips for free at
http://forex-fx-currencymarket.blogspot.com/2010/02/forex-market-size-and-liquidi
MRAB wrote:
Steven D'Aprano wrote:
[snip]
I'm sympathetic to your concern: I've often felt offended that doing
something like this:
x = SomeReallyBigListOrString
for item in x[1:]:
process(item)
has to copy the entire list or string (less the first item). But
honestly, I've never found a
On 21 Feb., 07:38, Carl Banks wrote:
> Numpy arrays can share underlying data like that when you take
> slices. For instance, this probably works the way you want:
>
> a = numpy.array([1,2,3,4,5,6])
> b = a[:3]
> c = a[3:]
>
> None of the actual data was copied here.
Hmm, that might be worth loo
On 21 Feb., 04:40, Steven D'Aprano wrote:
>
> Additionally, Python lists are over-allocated so that appends are fast. A
> list of (say) 1000 items might be over-allocated to (say) 1024 items, so
> that you can do 24 appends before the array is full and the array needs
> to be resized. This means t
vsoler wrote:
>I'm trying to print .7 as 70%
>I've tried:
>
>print format(.7,'%%')
>.7.format('%%')
>
>but neither works. I don't know what the syntax is...
Did you try this:
>>> print('%d%%' % (0.7 * 100))
70%
Best regards,
Günther
--
http://mail.python.org/mailman/listinfo/python-list
On 21 Feb, 03:00, "sjdevn...@yahoo.com" wrote:
> On Feb 18, 2:58 pm, John Nagle wrote:
>
> > Multiple processes are not the answer. That means loading multiple
> > copies of the same code into different areas of memory. The cache
> > miss rate goes up accordingly.
>
> A decent OS will use c
Jonathan Gardner writes:
> On Fri, Feb 19, 2010 at 11:16 PM, Lie Ryan wrote:
>>
>> Now, why don't we start a PEP to make python a fully-functional language
>> then?
>
> Because people don't think the same way that programs are written in
> functional languages.
Heh! When I learned Miranda it fe
On Feb 21, 7:11 pm, TomF wrote:
> On 2010-02-21 09:53:45 -0800, vsoler said:
>
> > I'm trying to print .7 as 70%
> > I've tried:
>
> > print format(.7,'%%')
> > .7.format('%%')
>
> > but neither works. I don't know what the syntax is...
> >>> print "Grade is {0:%}".format(.87)
>
> Grade is 87.000
On Feb 21, 5:53 pm, vsoler wrote:
> I'm trying to print .7 as 70%
> I've tried:
>
> print format(.7,'%%')
> .7.format('%%')
>
> but neither works. I don't know what the syntax is...
Assuming that you're using Python 2.6 (or Python 3.x):
>>> format(.7, '%')
'70.00%'
>>> format(.7, '.2%')
'70.
On 21 Feb, 17:32, Mensanator wrote:
> On Feb 21, 10:30 am, Mensanator wrote:
>
> > What versions of Python does it suuport?
>
> What OS are supported?
>From the Web site referenced in the announcement (http://
dreampie.sourceforge.net/):
"""
# Supports Python 2.5, Python 2.6, Jython 2.5, IronPy
On 2010-02-21 09:53:45 -0800, vsoler said:
I'm trying to print .7 as 70%
I've tried:
print format(.7,'%%')
.7.format('%%')
but neither works. I don't know what the syntax is...
print "Grade is {0:%}".format(.87)
Grade is 87.00%
or if you want to suppress those trailing zeroes:
print
>>> print('%.0f%%' % (0.7*100))
70%
On Sun, Feb 21, 2010 at 12:53 PM, vsoler wrote:
> I'm trying to print .7 as 70%
> I've tried:
>
> print format(.7,'%%')
> .7.format('%%')
>
> but neither works. I don't know what the syntax is...
>
> Can you help?
>
> Thank you
> --
> http://mail.python.org/ma
On Feb 21, 2010, at 11:51 AM, Chris Colbert wrote:
> http://dreampie.sourceforge.net/download.html
>
> reading is a wonderful thing.
I got it running on OS X with MacPorts after about an hour of installing
everything required for gtk and gtksourceview (including a new gcc, apparently).
Now...
I'm trying to print .7 as 70%
I've tried:
print format(.7,'%%')
.7.format('%%')
but neither works. I don't know what the syntax is...
Can you help?
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
@"sstein...@gmail.com"
"See this article for some more info about the reported sizes of things:
http://www.doughellmann.com/PyMOTW/sys/limits.html";
I posted this question on stack overflow. I now have a better appreciation
of ssteinerX suggestions of the above link and guppy, I also had pympler
I tested it in Windows Vista.
When I type single or double quotes, I get a unicode character, different of
python's quotes, and it break my code.
But i liked this tool! Thanks!
[]s
iuri
On Sun, Feb 21, 2010 at 3:13 PM, Chris Colbert wrote:
> This is bloody fantastic! I must say, this fixes
Hi everyone,
When I run a python script, I know that I can print the results of my
calculations on the Interactive Window. Once the scripts ends, I can
copy/pate these results on an OpenOffice Writer document.
However, I would like to know if I can somehow add some lines to my
script, so that it
This is bloody fantastic! I must say, this fixes everything I hate about
Ipython and gives me the feature I wished it had (with a few minor
exceptions).
I confirm this working on Kubuntu 9.10 using the ppa listed on the sites
download page.
I also confirm that it works interactively with PyQt4 an
http://dreampie.sourceforge.net/download.html
reading is a wonderful thing.
On Sun, Feb 21, 2010 at 11:32 AM, Mensanator wrote:
> On Feb 21, 10:30�am, Mensanator wrote:
> > On Feb 21, 3:42 am, Noam Yorav-Raphael wrote:> I'm
> pleased to announce DreamPie 1.0 - a new graphical interactive
> >
http://chattingfree.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 21, 10:30�am, Mensanator wrote:
> On Feb 21, 3:42 am, Noam Yorav-Raphael wrote:> I'm
> pleased to announce DreamPie 1.0 - a new graphical interactive
> > Python shell!
>
> What versions of Python does it suuport?
What OS are supported?
--
http://mail.python.org/mailman/listinfo/python-l
On Feb 21, 3:42�am, Noam Yorav-Raphael wrote:
> I'm pleased to announce DreamPie 1.0 - a new graphical interactive
> Python shell!
>
What versions of Python does it suuport?
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 18, 3:20 am, Ben Finney wrote:
> Lacrima writes:
> > Right, isolation [of test cases] is essential. But I can't decide to
> > which extent I should propagate isolation.
>
> You used “propagate” in a sense I don't understand there.
>
> > For example, in "Python Testing: Beginner's Guide" by
Delete \Documents and Settings\\DreamPie and it should now
work.
Did you edit the colors using the configuration window or manually?
If you edited them using the configuration window, can you give
instructions on how to reproduce the bug?
Noam
On Feb 21, 3:06 pm, "Aage Andersen" wrote:
> I reins
I reinstalled and got this message:
Traceback (most recent call last):
File "dreampie.py", line 4, ()
File "dreampielib\gui\__init__.pyc", line 972, main()
File "dreampielib\gui\__init__.pyc", line 153,
__init__(self=DreamPie(path..."window_main"),
pyexec='C:\\Python26\\python.exe')
File
I tried to edit the awfully colors, here are the results:
Traceback (most recent call last):
File "dreampie.py", line 4, ()
File "dreampielib\gui\__init__.pyc", line 972, main()
File "dreampielib\gui\__init__.pyc", line 153,
__init__(self=DreamPie(path..."window_main"),
pyexec='C:\\Python2
On Sat, 20 Feb 2010 23:44:29 -0800, Carl Banks wrote:
> On Feb 20, 10:50 pm, Steven D'Aprano cybersource.com.au> wrote:
>> What makes you say that?
[...]
>> I don't even understand this.
[...]
>> I'm just confused why you think that
>> lexical scoping is equivalent to references that can't be pu
On 02/21/10 15:21, Steven D'Aprano wrote:
>> > So it looks like variables in a list are stored as object references.
> Python doesn't store variables in lists, it stores objects, always.
>
> Even Python variables aren't variables *grin*, although it's really
> difficult to avoid using the term. P
On 02/21/10 19:27, lallous wrote:
> If the base defines the method and it was empty, then my C++ code
> would still call the function. This is not optimal because I don't
> want to go from C++ to Python if the _derived_ class does not
> implement the cb.
That sounds like a microoptimization; hav
I'm pleased to announce DreamPie 1.0 - a new graphical interactive
Python shell!
Some highlights:
* Has whatever you would expect from a graphical Python shell -
attribute completion, tooltips which show how to call functions,
highlighting of matching parentheses, etc.
* Fixes a lot of IDLE nuisa
V8 NUT writes:
> /usr/bin/ld: cannot find -lz
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
Could it be you're missing zlib-devel? What does yum info zlib-devel
say? Or locate libz?
--
http://mail.python.org/mailman/listinfo/python-list
>> That's not true. Currently, the hasattr() call would report that cb is
>> available, when it is actually not implemented. It would be possible to
>> do something like
>>
>> if hasattr(c, 'cb') and not is_pure(c.cb):
>> c.cb("Hello", "World")
>>
>> is_pure could, for example, look at a fu
On Feb 21, 12:37 pm, alex goretoy wrote:
> hello all,
> since I posted this last time, I've added a new function dates_diff and
[SNIP]
I'm rather unsure of the context of this posting ... I'm assuming that
the subject "datelib pythonification" refers to trying to make
"datelib" more "pythoni
Thanks everyone for the answers.
The dispatcher() is actually sits in C++ code.
So my code receives an object that is an instance of the base class,
it PyObject_GetAttrString(py_obj, 'funcname'). If the attribute exists
I will call PyObject_CallMethod on it.
If the base defines the method and it
On Feb 20, 6:08 pm, "Martin v. Loewis" wrote:
> >> class C1:
>
> >> # Pure virtual
> >> def cb(self, param1, param2):
> >> """
> >> This is a callback
>
> >> �...@param param1: ...
> >> �...@param param2: ...
> >> """
> >> raise NotImpl
68 matches
Mail list logo