On May 18, 2015 9:26 PM, "Mario Figueiredo" wrote:
>
> I'd like to understand what I'm being told about slices in
> https://wiki.python.org/moin/TimeComplexity
>
> Particularly, what's a 'del slice' and a 'set slice' and whether this
> information pertains to both CPython 2.7 and 3.4.
>
> From the
On May 18, 2015 9:56 PM, "Fabien" wrote:
>
> On 05/18/2015 09:49 PM, Ian Kelly wrote:
>>
>> It may be possible that lists in CPython could be made to share their
>> internal arrays with other lists on a copy-on-write basis, which could
>> allow slicing to be O(1) as long as neither list is modifie
On Wed, May 27, 2015 at 2:40 PM, zipher wrote:
> On Wednesday, May 27, 2015 at 6:30:16 AM UTC-5, Ben Finney wrote:
> > Steven D'Aprano writes:
> >
> > > On Wednesday 27 May 2015 14:39, Ben Finney wrote:
> > >
> > > > That kind of homophobic slur is inappropriate from anyone in this
> > > > commu
On Thu, May 28, 2015 at 1:05 PM, Terry Reedy wrote:
> On 5/28/2015 6:34 AM, Serge Christian Ibala wrote:
>
>
> I want to use the following package
>>
>> “numpy, matplotib, mahotas, ipython OpenCV and SciPy"
>>
>
> opencv seems to be the only one not available for 3.x.
>
>
OpenCV 3 (which is in
On Fri, May 29, 2015 at 7:02 PM, Todd wrote:
> On Fri, May 29, 2015 at 6:01 PM, Mike Driscoll wrote:
>
>> Hi,
>>
>> I've been asked on several occasions to write about intermediate or
>> advanced topics in Python and I was wondering what the community c
On Fri, May 29, 2015 at 6:01 PM, Mike Driscoll wrote:
> Hi,
>
> I've been asked on several occasions to write about intermediate or
> advanced topics in Python and I was wondering what the community considers
> to be "intermediate" or "advanced". I realize we're all growing in our
> abilities wit
I think there is essentially zero chance of that. My understanding is that
Guido regrets having "else" to begin with.
But this should work
broken = True
for x in it:
if complicated_calculation_1():
break
complicated_calculation_2()
if complicated_calculation_3():
brea
On Fri, Jun 5, 2015 at 2:46 PM, Paul Appleby wrote:
> I saw somewhere on the net that you can copy a list with slicing. So
> what's happening when I try it with a numpy array?
>
> >>> a = numpy.array([1,2,3])
> >>> b = a[:]
> >>> a is b
> False
> >>> b[1] = 9
> >>> a
> array([1, 9, 3])
>
>
Numpy
On Fri, Jun 5, 2015 at 3:11 PM, Paul Appleby wrote:
> On Fri, 05 Jun 2015 14:55:11 +0200, Todd wrote:
>
> > Numpy arrays are not lists, they are numpy arrays. They are two
> > different data types with different behaviors. In lists, slicing is a
> > copy. In numpy arra
On Fri, Jun 5, 2015 at 3:23 PM, Gary Herron
wrote:
> On 06/05/2015 06:11 AM, Paul Appleby wrote:
>
>> On Fri, 05 Jun 2015 14:55:11 +0200, Todd wrote:
>>
>> Numpy arrays are not lists, they are numpy arrays. They are two
>>> different data types with different b
On Thu, Jun 18, 2015 at 1:03 PM, Fabien wrote:
> On 06/17/2015 11:16 PM, sohcahto...@gmail.com wrote:
>
>> You don't need interfaces with Python. Duck typing makes that all
>> possible.
>>
>
> Yes, but I also like interfaces (or in python: mimicked interfaces with
> NotImplementedError) for thei
On Thu, Jun 18, 2015 at 6:15 PM, Mark Lawrence
wrote:
> On 18/06/2015 14:53, Steven D'Aprano wrote:
>
>> On Thu, 18 Jun 2015 11:10 pm, Neal Becker wrote:
>>
>> http://begriffs.com/posts/2015-06-17-thinking-with-laziness.html
>>>
>>
>> I wanted to think about that post, but I'm too lazy to read i
The loop runs to completion for me on openSUSE Tumbleweed and both Python
2.7 64bits and Python 3.4 64bits.
On Thu, Jul 2, 2015 at 4:52 PM, Steven D'Aprano wrote:
> Despite the title, this is not one of the usual "Why can't Python do
> maths?" "bug" reports.
>
> Can anyone reproduce this behavio
On Thu, Jul 2, 2015 at 5:29 PM, Robin Becker wrote:
>
>
> $ uname -a
> Linux everest 4.0.6-1-ARCH #1 SMP PREEMPT Tue Jun 23 14:40:31 CEST 2015
> i686 GNU/Linux
>
I am wondering if this is a 32bit vs. 64bit thing. Has anyone gotten this
problem to work on a 64bit python?
--
https://mail.python
On Tue, Jul 14, 2015 at 7:13 AM, Chris Angelico wrote:
> On Tue, Jul 14, 2015 at 2:58 PM, Steven D'Aprano
> wrote:
> > On Tuesday 14 July 2015 14:07, Ian Kelly wrote:
> >
> >> On Mon, Jul 13, 2015 at 9:23 PM, Steven D'Aprano
> >> wrote:
> >>> Correct. But rather than removing it, it would be be
On Tue, Jul 21, 2015 at 2:10 PM, tjohnson
wrote:
> On 7/20/2015 10:57 PM, ryguy7272 wrote:
>
>> I'd like to install ALL Python packages on my machine. Even if it takes
>> up 4-5GB, or more, I'd like to get everything, and then use it when I need
>> it. Now, I'd like to import packages, like num
On Sun, Jul 26, 2015 at 7:19 PM, Paulo da Silva <
p_s_d_a_s_i_l_v_a...@netcabo.pt> wrote:
> On 26-07-2015 05:47, blue wrote:
> > Hi .
> > I tested all. Now I think the PySide can more.
>
> No python3!
> Besides ... any differences to pyqt4?
> Thanks
>
pyside has supported python 3 for a long time
On Wed, Jul 29, 2015 at 3:19 PM, ryguy7272 wrote:
> I am using Spyder Python 2.7. I'm running this sample code.
> import numpy as np
> import numpy.random as npr
> import matplotlib.pyplot as plt
> S0 = 100
> r = 0.05
> sigma = 0.25
> T = 30 / 365.
> I = 1
> ST = S0 * np.exp((r - 0.5 * sigma
On Aug 3, 2015 17:46, "Rick Johnson" wrote:
>
> On Sunday, August 2, 2015 at 9:45:51 PM UTC-5, Chris Angelico wrote:
> > How do you know it was written today, if you didn't click it?
>
> Because i possess skills you can hardly fathom. There are always
> loopholes; back doors; knot holes; key holes
On Aug 8, 2015 10:46, "Cecil Westerhof" wrote:
>
> On openSUSE I see python-matplotlib updated very often. Sometimes more
> as once a week. It is also not very small (almost 40 MB). Is there a
> reason for this, or is there a problem at SUSE?
I assume you are using tumbleweed and/or devel:langua
Using list indexing with booleans in place of a ternary operator.
a = False
b = [var2, var1][a]
Instead of:
b = var1 if a else var2
On Sep 24, 2015 8:06 AM, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:
> I was looking at an in-house code base today, and the author seems to h
On Sep 24, 2015 18:59, "Chris Angelico" wrote:
>
> On Fri, Sep 25, 2015 at 2:54 AM, Todd wrote:
> > Using list indexing with booleans in place of a ternary operator.
> >
> > a = False
> > b = [var2, var1][a]
> >
> > Instead of:
> >
On Oct 13, 2015 2:11 AM, "Steven D'Aprano" wrote:
>
> On Tue, 13 Oct 2015 04:20 am, Marko Rauhamaa wrote:
>
> > As for managing complexity, many people believe static typing is a
> > crucial tool. I disagree. Static typing adds vast amounts of noise to
> > the code.
>
> Only if you are stuck in th
On Nov 19, 2015 20:48, "Chris Angelico" wrote:
>
> On Fri, Nov 20, 2015 at 5:42 AM, Ian Kelly wrote:
> > BartC on the other hand is just complaining about an aspect of Python
> > that is legitimately controversial.
>
> IMO it's controversial mainly because there's an easy and obvious
> syntax for
Hi,
I'm working right from the example here to make a basic extenstion
module.
http://docs.python.org/ext/intro.html
http://www.dalkescientific.com/writings/diary/archive/2005/04/26/extending_python.html
I can load my module into python and dir shows my function. But I get
a syntax error if I tr
jeremito wrote:
> I have written a simple C++ program in my efforts to learn how to
> extend Python. It is shown below. Everything compiles and installs
> correctly, but I get strange answers. I know the function "Pi" is
> correct because when I call it from a C++ code it gives the correct
> ans
terface where people could run the
> scripts themselves whenever they like... instead of asking me.
>
> I'd rather not rewrite the scripts with PHP. Any tips on a fast, easy
> way of doing this?
>
> Thanks!
I haven't tried it myself, but have you looked into
http://www.modp
Hello everyone,
I ran a python script last night which connects to a matlab automation
server via DCOM (using win32com). I expected to see the results when
I came in this morning. But apparently, not long after I left, python
stopped. I hit enter in the console, and it started again. I scoured
On Jul 7, 10:17 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Todd wrote:
> > I ran a python script last night which connects to a matlab automation
> > server via DCOM (using win32com). I expected to see the results when
> > I came in this morning. But apparently, no
Steve R. Hastings wrote:
> When you compile the expression
>
> for i in range(1000):
> pass
>
> does Python make an iterator for range(), and then generate the values
> on the fly? Or does Python actually allocate the list [0, 1, 2, ..., 999]
> and then step through it?
I ran an expe
I'm trying to run the following in python.
os.system('/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file
\"test.c\")"')
This connects to xemacs with gnuclient and runs htmlize. If I run it
from a shell, xemacs gives me an error, but it generates the html file
just fine. If I run the same
Ben Cartwright wrote:
> Todd wrote:
> > I'm trying to run the following in python.
> >
> > os.system('/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file
> > \"test.c\")"')
>
> Python is interpreting the \"s as
I'm looking to search an entire XML file for specific text and replace that
text, while maintaining the structure of the XML file. The text occurs within
multiple nodes throughout the file.
I basically need to replace every occurrence C:\Program Files with C:\Program
Files (x86), regardless of l
Hello,
My name is Todd. I'm the lead developer for Komodo IDE (Interactive
Development Environment) and Komodo Edit (a free, open-source editor) at
ActiveState. I wanted to announce that the newest version, Komodo 7, has
been released:
http://www.activestate.com/komodo-ide
Pytho
On 12-02-08 01:52 PM, Terry Reedy wrote:
On 2/8/2012 3:14 PM, Todd Whiteman wrote:
My name is Todd. I'm the lead developer for Komodo IDE (Interactive
Development Environment) and Komodo Edit (a free, open-source editor) at
ActiveState. I wanted to announce that the newest version, Kom
Is there any documentation that shows how to use the RPM API for Python.
I have found one example but it's dated 2000 and I haven't been able
to get it to work :(.
Thanks
~Todd
--
http://mail.python.org/mailman/listinfo/python-list
he following problem:
from math import exp
>>>x=1000.
>>>z=exp(x)
so that z returns an actual value
Thanks in advance for any advice!
Todd
--
http://mail.python.org/mailman/listinfo/python-list
I'm running activestate Python 2.4 for windows, and the latest BLT,
under XP. I'm using pythonWin as my environment.
When I run my plotting program the first time, it works just fine. If I
exit out (normally), and then run it again from PythonWin, I get the
following error. It's as if something is
I'm running PythonWin on XP. When I run my plotter program the first
time, it works fine. The second time I run it, I get the following
error. If I exit PythonWin, and restart, I can again run it once. Any
ideas?
Error: 1
TclError Exception in Tk callback
Function: > (type: )
Args: ()
Tracebac
ctually
want to do is access them on the objects within the Model. Writing
Article.objects.first().titre in Django Models is mostly equivalent to
Article.titre from Python classes.
Todd
--
https://mail.python.org/mailman/listinfo/python-list
who don't know Jython it can help.
@echo off
set "x=thequickbrownfoxjumpsoverthelazydog"
set "x1=%x:~11,1%%x:~1,1%%x:~29,1%%x:~0,1%"
set "x2= %x:~32,2%%x:~2,1%%x:~20,1%"
set "x3= %x:~5,1%%x:~0,1% %x:~32,2%"
echo %x1%%x2%%x3%?
pause>nul
--
Todd Varg
SMPP, are you referring to the Short Message Peer to Peer protocol?
If so, I implemented this in python some 4 years ago for SMPP v3.4, I
have the source code, which I might release LGPL if interested.
Cheers,
Todd
Alvin A. Delagon wrote:
> Greetings!
>
> Does anyone know a good ref
OMG, that is so ugly :D
Jim wrote:
> There is a precise one in a Perl module, I believe.
> http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
> Can you swipe that?
>
> Jim
>
>
--
http://mail.python.org/mailman/listinfo/python-list
/blog/python-ide-review
Cheers,
Todd
John Salerno wrote:
> Just curious what users of the two big commercial IDEs think of them
> compared to one another (if you've used both).
>
> Wing IDE looks a lot nicer and fuller featured in the screenshots, but a
> glance at the feature
se by posting a message at:
http://support.activestate.com/products/Komodo
And giving more details on your exact problem also helps (Mac type: PPC,
Intel, Script type, etc...).
Best regards,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
just an internet beggar), hey, enjoy.
If you're a clever sociology graduate student doing a pootentially
interesting thesis on various responses to an anonymous plea for money
on the internet, kudos. I bet it'd be an interesting study.
Best Regards,
--
Todd H.
http://www.toddh.net/
--
http://mail.python.org/mailman/listinfo/python-list
quot;field2\r\n","field3\r\n"]
>>> values = ", ".join([escapeAndQuote(f[:-2]) for f in fields])
>>> values
'"field1", "field2", "field3"'
>>> q = "insert into daily values(%s)" % values
'insert into daily values("field1", "field2", "field3")'
Todd
--
http://mail.python.org/mailman/listinfo/python-list
ng like this:
a = [1,2,3]
b = a.append(4)
and assume that a is still [1,2,3]
More discussion on this topic is available at
http://groups.google.com/group/comp.lang.python/browse_thread/thread/8ab2e67550123b92
Todd
--
http://mail.python.org/mailman/listinfo/python-list
Another hack:
drive = os.popen("echo %SYSTEMDRIVE%").readline().strip()
rtilley wrote:
> Is there a proper way to get this variable from Windows? I know it's in
> the registry, but I'd rather not go there. I could not find a CSIDL
> shell constant for it either. I've been doing this:
>
> os.chdi
ype. Check PyDom info for a brief overview:
http://developer.mozilla.org/en/docs/PyDOM
There are also a few projects that make use of PyXPCOM in the current
mozilla/firefox/xulrunner builds, such as Democracy and Komodo.
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
you'll gain access to a wealth of components with which
you can take advantage of within your application.
Note also that for the Firefox 3 codebase, it is expected that Python
will become usable in the XUL UI, so instead of writing JavaScript
you'll be able to write Python code that
On Jul 22, 2:20 am, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] a écrit :
>
> > Python is a better language, with php support,
>
> Python has php support ? My, I'm a professional web developper using
> both, and I didn't knew this.
>
As an aside, perl DOES support PHP:
http
ccasionally get an error about the
operator not being supported. It doesn't always happen and we can't
seem to reproduce it when we try to.
Has anybody else seen this or is it just the original poster and me?
Todd
--
http://mail.python.org/mailman/listinfo/python-list
-- Forwarded message --
From: Todd O'Bryan <[EMAIL PROTECTED]>
Date: Nov 27, 2007 1:48 PM
Subject: Re: Pulling data from a .asps site
To: [EMAIL PROTECTED]
Check out Selenium Remote Control! It's very easy to use.
On Nov 27, 2007 1:37 PM, <[EMAIL PROTECTED]&
Happy holidays all!
I'm developing an application and, as a relative newbie to Python, have come
across a stumbling block with Tkinter.
I'd like to have a button that when pressed executes a loop (this could be a
thread) and then stops execution when it's released (Push to Make - Single
Pole i
ample of this.
> Can anyone help ?
Hi Mike,
If you download the Paramiko zip archive:
http://www.lag.net/paramiko/download/paramiko-1.7.2.zip
You can find examples of loading and using public/private keys for
automated logins in the code under the "demos" sub folder.
Cheers,
Todd
-
runs cross-platform as
a Firefox extension, or can use XULRunner as a standalone (so it could
run off a flash drive):
http://code.google.com/p/sqlite-manager/wiki/ScreenShots
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
completion?
Komodo Edit and Komodo IDE both use the exact same code intelligence
system, so what occurs in Edit occurs in the IDE version.
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
d to make your own build of the Mozilla application
I'm the one working on the PyXPCOM extension, which I am hoping will
eventually contain the PyDOM module as well (once I get around to making
new Mozilla builds with this enabled).
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
to make your own build of the Mozilla application
I'm the one working on the PyXPCOM extension, which I am hoping will
eventually contain the PyDOM module as well (once I get around to making
new Mozilla builds with this enabled).
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
ython (earlier than Python 2.4)
and also a few problems working with Python 2.4 itself.
This code might provide some help (you can search for FTPS):
http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/src/components/koFTP.py
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
this list
when it's finished).
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
Todd Whiteman wrote:
Mark Hammond's Python/Mozilla work has enabled products like Komodo,
Miro (Democracy) and the OLPC project to use Python as a major driver
for consistent cross-platform GUI applications.
Personally, I believe XULRunner has a lot to offer for Python GUI
development
cable).
Feedback is welcome.
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
Don Spaulding wrote:
On Sep 16, 8:29 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
I've put together a tutorial that shows off how to build a GUI
application using XULRunner (same architectural components as Firefox
uses) that can be used in conjunction with the Python programming lan
[EMAIL PROTECTED] wrote:
On Sep 17, 1:21 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
Don Spaulding wrote:
On Sep 16, 8:29 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
I've put together a tutorial that shows off how to build a GUI
application using XULRunner (same architectu
pressions... so there isn't as much of a need for the
interactive shell when creating/testing regular expressions:
http://docs.activestate.com/komodo/4.4/tutorial/tourlet_rx.html#rx_top
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
using:
my_stop_event.set()
Cheers,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
Any suggestions to fix this?
Todd :-)
--
http://mail.python.org/mailman/listinfo/python-list
:
http://www.activestate.com/komodo-ide/whats-new
http://community.activestate.com/komodo-60-features
Enjoy,
Todd
--
http://mail.python.org/mailman/listinfo/python-list
ally
results in 132 bytes being sent!
I am running 2.6.6 on Windows XP, which I understand has a default
minimum buffersize of 576 bytes which I would think is sufficient.
Apologies if this is somewhat incoherent, I'm cross-eyed from staring
at this!
- - Todd
- -- code --
def PLC_Function
t this.
I am primarily interested in the '\r'; it serves as the EOT (ie.,
'over' not 'out') I know the response packet size is fixed and it only
gets sent once in full. No re-transmission or fragmentation (this is
likely by design - full
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 17:03:58 +0100
MRAB wrote:
> On 21/10/2010 15:57, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 00:07:58 +0100
> > MRAB wrote:
> >
&
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thu, 21 Oct 2010 17:03:58 +0100
MRAB wrote:
> On 21/10/2010 15:57, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 00:07:58 +0100
> > MRAB wrote:
> >
&
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 22 Oct 2010 00:00:03 +0100
MRAB wrote:
> On 21/10/2010 21:05, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 17:03:58 +0100
> > MRAB wrote:
> >
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 22 Oct 2010 00:00:03 +0100
MRAB wrote:
> On 21/10/2010 21:05, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 17:03:58 +0100
> > MRAB wrote:
> >
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 22 Oct 2010 00:00:03 +0100
MRAB wrote:
> On 21/10/2010 21:05, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 17:03:58 +0100
> > MRAB wrote:
> >
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, 22 Oct 2010 10:53:45 -0400
Tom Pacheco wrote:
> On 10/21/2010 4:05 PM, Todd Walter wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On Thu, 21 Oct 2010 17:03:58 +0100
> > MRAB wrote:
&
ly quickly that catching the response
worked within a while loop but not the larger, 66-byte, message.
Again, thanks all for your assistance.
Cheers,
Todd
- The functional code ---
def PLC_Functions(command, argument):
"""
Command is one of: GetTray, Status, S
created a pgp key as follows:
- -- install kpgp
- -- create a new key pair for me : Todd Greenwood-Geer,
[EMAIL PROTECTED], etc.
- -- publish the key to hkp://subkeys.pgp.net
- -- dblclick the new key in kpgp to get the properties dialog, copy down
the key id, and paste that into the web field f
On Mon, Nov 30, 2009 at 05:35:31PM +, joao abrantes wrote:
> to open a new shell and to put the output of the new python program
> there..
The subprocess module is probably what you want.
--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"
--
http://mail.python.org/mailma
On Sun, Dec 20, 2009 at 08:40:05AM -0500, Ray Holt wrote:
> Why am I getting an invalid syntax error on the following:
> os.chdir(c:\\Python_Modules). The error message says the colon after c
You need to pass either a string literal or a variable. If you're
passing a string, like you are trying t
82 matches
Mail list logo