On Nov 14, 11:28 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> Aaron Brady wrote:
> > On Nov 14, 8:01 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >>> I don't understand. If you don't want to terminate the "if", why do
> >>> you hit backspace? What is i
Joe Strout wrote:
So, the level of assertion that I want to make in a method that expects
a Duck is just that its parameter is either a Duck, or something that
the caller is claiming is just as good as a Duck.
I'm not sure, but I think the new ABC stuff in Py3 is
going to provide something
Joe Strout wrote:
So, in this case, the simplest solution was to have the method that
initially accepts and stores the data check to make sure that data
satisfies the assumptions of the class.
In hindsight, yes, but the trouble is that you can't
tell ahead of time which of the gazillion pla
On Fri, 14 Nov 2008 22:56:52 -0500, Terry Reedy wrote:
> [EMAIL PROTECTED] wrote:
>> On Nov 13, 4:53 pm, Terry Reedy wrote:
>>> [EMAIL PROTECTED] wrote:
>>>
I have yet to see any reasonable definition of a Python value in the
Python docs or elsewhere, despite the fact that a value is one
En Wed, 12 Nov 2008 05:22:55 -0200, Rafe <[EMAIL PROTECTED]> escribió:
I think I have discovered two bugs with the inspect module and I would
like to know if anyone can spot any traps in my workaround.
They look like real bugs - please report them at http://bugs.python.org
else this will be
En Tue, 11 Nov 2008 23:09:25 -0200, <[EMAIL PROTECTED]> escribió:
On Nov 11, 7:48 pm, [EMAIL PROTECTED] wrote:
To create a 2D list, that is a list of lists:
x = [[0] * ncols for i in nrows]
Many thanks, I don't think I would ever 'discovered' this.
Try reading the FAQ:
http://www.python.
En Thu, 13 Nov 2008 19:41:44 -0200, Alan Baljeu <[EMAIL PROTECTED]>
escribió:
Thanks, I have 2.5 now and it works great with Nose. Now for my next
project, I want to embed Python and Nose in a C++ program. I know this
means using the python25.dll, and I know how to setup the calls.
I thin
En Wed, 12 Nov 2008 08:58:05 -0200, Petr Gotthard
<[EMAIL PROTECTED]> escribió:
Hello,
my C++ extension crashes under Win32 when the tp_print is called.
It crashes with both Python 2.5.2 and 2.6. The crash occurs in
system32\ntdll.dll, with exception code 0xc005.
I found out that this wo
Thanks Chris!!
It worked.. Yeah my bad i was trying out the bad logic :)
On Sat, Nov 15, 2008 at 5:31 AM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 14, 2008 at 10:40 AM, Indian <[EMAIL PROTECTED]> wrote:
> > Hi Friends
> >
> > I'm getting the TypeError Unsubscriptable object when usi
Aaron Brady wrote:
> On Nov 14, 8:01 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> I don't understand. If you don't want to terminate the "if", why do
>>> you hit backspace? What is it that you would like to have happen?
>> the goal is to make some aspects of i
On Sat, Nov 15, 2008 at 12:19 AM, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Fri, 14 Nov 2008 20:39:53 -0800, len wrote:
>
>> hi
>>
>> Have this code in my program;
>>
>> filename = 'custfile'
>> codeline = filename + ' = [\n'
>> output.write(codeline)
>>
>> record written to file
On Fri, 14 Nov 2008 20:39:53 -0800, len wrote:
> hi
>
> Have this code in my program;
>
> filename = 'custfile'
> codeline = filename + ' = [\n'
> output.write(codeline)
>
> record written to file look like this
>
> "custfile" = [
I cannot reproduce that behaviour. I suggest
On Nov 15, 3:39 pm, len <[EMAIL PROTECTED]> wrote:
> hi
>
> Have this code in my program;
>
> filename = 'custfile'
> codeline = filename + ' = [\n'
> output.write(codeline)
>
> record written to file look like this
>
> "custfile" = [
Assuming output is a file object, what you say
hi
Have this code in my program;
filename = 'custfile'
codeline = filename + ' = [\n'
output.write(codeline)
record written to file look like this
"custfile" = [
Yet in another part of the program I have code:
def fmtline(fieldline):
code = '(' + fieldline[1].re
Using Apache 2.2 on my local OSX machine, I;ve set up a virtual host to
serve a directory that a project of mine is in. In this directory, I have
some python .cgi scripts that I use to dynamically generated locally-used
html code. In several places,scripts that work fine when not run as .cgi
scr
On Nov 14, 4:19 am, Bruno Desthuilliers wrote:
> len a écrit :
>
>
>
>
>
> > Hi all;
>
> > I am looking for a little direction in moving from novice python MySQL
> > to real world processing.
>
> > I can connect to MySQL databases and have performed most of the
> > various select, create, update,
On Nov 13, 7:32 pm, Ethan Furman <[EMAIL PROTECTED]> wrote:
> len wrote:
> > Hi all;
>
> [snip]
>
> > Here is my problem. I need to start doing this in the really world at
> > my company converting some older cobol system and data to python
> > programs and MySQL. I have gotten past packed decima
On Nov 14, 2008, at 1:48 PM, KAM.covad wrote:
Here is a great reference:
http://www.thinkspot.net/sheila/staticpages/index.php?page=gypsymail
However, the code will not work for an SMTP site like gmail that
requires authentication. Anyone know of a site that has that code?
I am a nube with
[EMAIL PROTECTED] wrote:
On Nov 13, 4:53 pm, Terry Reedy wrote:
[EMAIL PROTECTED] wrote:
I have yet to see any reasonable definition of a Python
value in the Python docs or elsewhere, despite the fact
that a value is one of the three defining characteristics
of an object, a central concept in
"Hunter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
We are reviewing a vendor who will output some data in an XML format.
I will then use python to convert the data to another format for
upload to another vendor. I'm having trouble with very basic steps
with the sample file th
En Mon, 10 Nov 2008 11:44:44 -0200, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribió:
On Nov 10, 2:23 pm, Floris Bruynooghe <[EMAIL PROTECTED]>
wrote:
Sorry, I probably should have mentioned you want to cast the object to
PyFileObject and then use the PyFile_AsFile() function to get the
FILE*
Mike Driscoll <[EMAIL PROTECTED]> wrote:
> TurboGears somehow
> watches files for changes, so you might want to check out their source
> to see how it works. I'm sure it's something similar.
I think that's more an inherited feature from TG's use of CherryPy.
There's some code provided on the CP si
"Werner Merkl" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hallo,
I like Python 2.6 and I like to use it anywhere, even within Windows PE.
In former version of Python (<= 2.5.x) it was easy to bring it to a
Windows PE system: Install Python to Windows XP or Vista and (robo-)
On Nov 15, 9:48 am, [EMAIL PROTECTED] wrote:
> Thanks. I wasn't aware there was a documented way to check for
> interactivity.
That's more of a side-effect than the actual intent of those
attributes, which are there to hold the interpreter prompts. But it
does seem to be the only way.
It might
On Nov 14, 8:01 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I don't understand. If you don't want to terminate the "if", why do
> > you hit backspace? What is it that you would like to have happen?
>
> the goal is to make some aspects of indentation behave the
On Nov 14, 1:58 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
> On Nov 14, 5:27 pm, Greg Copeland <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Nov 14, 9:56 am, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
> > > I'd like to know if there's a way to determine which is the best
> > > buf
[EMAIL PROTECTED] wrote:
> I don't understand. If you don't want to terminate the "if", why do
> you hit backspace? What is it that you would like to have happen?
the goal is to make some aspects of indentation behave the same without context
dependency. this goal exists for many features of pr
On Nov 14, 6:02 pm, Trent Mick <[EMAIL PROTECTED]> wrote:
> I'm happy to announce that ActivePython 2.6.0.0 is now
> available for download from:
> http://www.activestate.com/Products/activepython/
>
> ActivePython 2.6.0.0 is based on Python 2.6.0.
>
> What is ActivePython?
> -
On Fri, Nov 14, 2008 at 6:38 PM, Joe Strout <[EMAIL PROTECTED]> wrote:
> On Nov 14, 2008, at 4:33 PM, Jerry Hill wrote:
>
>> Then add
>> def __init__(self):
>> a = 0
>> b = 0
>
> Doesn't that have to be "self.a" and "self.b"?
Yes, that should indeed have been self.a and self.b! Sorry about that
On Thu, Nov 13, 2008 at 3:54 AM, James Harris
<[EMAIL PROTECTED]> wrote:
> On 11 Nov, 22:59, Brendan Miller <[EMAIL PROTECTED]> wrote:
>> What would heavy python unit testers say is the best framework?
>>
>> I've seen a few mentions that maybe the built in unittest framework
>> isn't that great. I'
On Fri, 14 Nov 2008 16:38:15 -0700, Joe Strout wrote:
> On Nov 14, 2008, at 4:33 PM, Jerry Hill wrote:
>
>> Then add
>> def __init__(self):
>> a = 0
>> b = 0
>>
>> to your box class to make a and b instance variables.
>
> Doesn't that have to be "self.a" and "self.b"?
Only if you want it to
On Fri, 14 Nov 2008 13:28:27 -0700, Joe Strout wrote:
> But this class wasn't really that complex; it's just that it assumed all
> the stuff it's being fed were strings (or could be treated as strings),
> and I inadvertently fed it an NLTK.Tree node instead (not realizing that
> a library method I
On Nov 14, 3:04 am, Aaron Brady <[EMAIL PROTECTED]> wrote:
> On Nov 13, 7:16 pm, Alex_Gaynor <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to figure out what the best architecture for doing code
> > generation would be. I have a set of ASTs that define a program, so
> > what should I do to for code
On Fri, Nov 14, 2008 at 10:40 AM, Indian <[EMAIL PROTECTED]> wrote:
> Hi Friends
>
> I'm getting the TypeError Unsubscriptable object when using Exec in a class
>
> Here's the example
>
> class Fake(object):
> def __init__(self, reg):
> self._reg = reg
>
> def OpenKey(self, rootkey, path):
I'm happy to announce that ActivePython 2.6.0.0 is now
available for download from:
http://www.activestate.com/Products/activepython/
ActivePython 2.6.0.0 is based on Python 2.6.0.
What is ActivePython?
-
ActivePython is ActiveState's binary distribution of Python. Bui
Peter> hasattr(sys, "ps1")
Thanks. I wasn't aware there was a documented way to check for
interactivity. It would have been more obvious if sys had an
"isinteractive" method or attribute.
--
Skip Montanaro - [EMAIL PROTECTED] - http://smontanaro.dyndns.org/
--
http://mail.python.org/mailm
BiraRai a écrit :
(snip)
class box:
a = int()
b = int()
I strongly suggest you read the tutorial.
--
http://mail.python.org/mailman/listinfo/python-list
BiraRai a écrit :
for record in roll:
x = box()
x.createSomething(record)
do something
Can anyone tell me why python keeps return the original object x that
was created in the FOR loop.
Where is the "return" statement ?
I want to instantiate a new x object for
each iterat
Jerry Hill a écrit :
On Fri, Nov 14, 2008 at 6:10 PM, BiraRai <[EMAIL PROTECTED]> wrote:
class box:
a = int()
b = int()
def createSomething(self,x):
At a guess, x = box() does create a new instance of your box class,
but since you've declared a and b to be class variables instead of
inst
On Nov 13, 4:23 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> def static(**vars):
> ns = NS(vars)
> def deco(f):
> return lambda *args, **kwargs: f(ns, *args, **kwargs)
> return deco
>
> @static(ncalls=0, history=[])
> def foo(ns, x):
> ns.ncalls += 1
> ns.history.appe
On Nov 14, 2008, at 4:33 PM, Jerry Hill wrote:
Then add
def __init__(self):
a = 0
b = 0
to your box class to make a and b instance variables.
Doesn't that have to be "self.a" and "self.b"?
Best,
- Joe
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Nov 14, 2008 at 6:10 PM, BiraRai <[EMAIL PROTECTED]> wrote:
> class box:
> a = int()
> b = int()
>
> def createSomething(self,x):
At a guess, x = box() does create a new instance of your box class,
but since you've declared a and b to be class variables instead of
instance variables,
Hi All,
I am new to using swig/C++/python. I got some problem with function
pointers. I posted in swig-user, but got no response. So I forwarded
it here. You help is greatly appreciated.
Thanks!
-- Forwarded message --
Hi All,
Yesterday I posted about the question I had of temp
Joe Strout wrote:
> On Nov 14, 2008, at 2:07 PM, Paul McGuire wrote:
>
>> Or to be even more thorough:
>> def sub(x: must have getitem, y: must have strip and strip must be
>> callable, and y.strip must return something that has replace and
>> replace must be callable)
>>
>> So even this simple ex
On Nov 14, 5:44 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Nov 14, 5:16 pm, BiraRai <[EMAIL PROTECTED]> wrote:
>
> > for record in roll:
> > x = box()
> > x.createSomething(record)
> > do something
>
> > Can anyone tell me why python keeps return the original object x that
>
On Nov 14, 5:27 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Nov 14, 4:08 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> >> Almar Klein wrote:
> >>> Hi Eric,
> >>> First of all, I like your initiative.
> >> there's nothing like self interest to drive on
On Nov 14, 5:16 pm, BiraRai <[EMAIL PROTECTED]> wrote:
> for record in roll:
> x = box()
> x.createSomething(record)
> do something
>
> Can anyone tell me why python keeps return the original object x that
> was created in the FOR loop. I want to instantiate a new x object for
> e
On Nov 14, 4:49 pm, Joe Strout <[EMAIL PROTECTED]> wrote:
> So things like this should suffice:
>
> # simple element
> assert(is_stringlike(foo))
> assert(is_numeric(foo))
> assert(is_like(foo, Duck))
>
> # sequence of elements
> assert(seqof_stringl
[EMAIL PROTECTED] wrote:
> On Nov 14, 4:08 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
>> Almar Klein wrote:
>>> Hi Eric,
>>> First of all, I like your initiative.
>> there's nothing like self interest to drive one's initiative. :-) 14 years
>> with
>> speech recognition and counting. I'm
On Nov 13, 4:53 pm, Terry Reedy wrote:
> [EMAIL PROTECTED] wrote:
>
>> I have yet to see any reasonable definition of a Python
>> value in the Python docs or elsewhere, despite the fact
>> that a value is one of the three defining characteristics
>> of an object, a central concept in Python.
>
> I
for record in roll:
x = box()
x.createSomething(record)
do something
Can anyone tell me why python keeps return the original object x that
was created in the FOR loop. I want to instantiate a new x object for
each iteration of the FOR loop
--
http://mail.python.org/mailman/list
Joe Strout <[EMAIL PROTECTED]> writes:
> On Nov 13, 2008, at 3:23 PM, Arnaud Delobelle wrote:
>
>> Aaron Brady <[EMAIL PROTECTED]> writes:
>>
>>> One way around it, which I like the idea of but I'll be honest, I've
>>> never used, is getting a function a 'self' parameter. You could make
>>> it a
On Nov 14, 4:08 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> Almar Klein wrote:
> > Hi Eric,
>
> > First of all, I like your initiative.
>
> there's nothing like self interest to drive one's initiative. :-) 14 years
> with
> speech recognition and counting. I'm so looking to my 15th anni
We are reviewing a vendor who will output some data in an XML format.
I will then use python to convert the data to another format for
upload to another vendor. I'm having trouble with very basic steps
with the sample file they sent me.
My very simple test script is:
from xml.etree.ElementTree i
[EMAIL PROTECTED] wrote:
> Is there a reliable way (this is on Solaris if that matters) to tell if
> I'm
> running in the interactive interpreter as opposed to in a script? I think
> examining sys.argv works, but wanted to double check.
hasattr(sys, "ps1")
http://www.python.org/doc/2.5.2/lib/mo
On Nov 14, 2008, at 2:07 PM, Paul McGuire wrote:
Or to be even more thorough:
def sub(x: must have getitem, y: must have strip and strip must be
callable, and y.strip must return something that has replace and
replace must be callable)
So even this simple example gets nasty in a hurry, let alon
[EMAIL PROTECTED] wrote:
Is there a reliable way (this is on Solaris if that matters) to tell if I'm
running in the interactive interpreter as opposed to in a script? I think
examining sys.argv works, but wanted to double check.
import sys, traceback
try:
raise ValueError
On Nov 14, 12:08 pm, Mark Wooding <[EMAIL PROTECTED]> wrote:
> Chris Mellon <[EMAIL PROTECTED]> wrote:
> > Any time you port between languages, it's rarely a good idea to just
> > convert code verbatim. For example:
>
> > import random, string
> > def random_char():
> > return random.choice(str
On Nov 14, 1:27 pm, [EMAIL PROTECTED] wrote:
> On Nov 14, 12:47 am, George Sakkis <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Nov 13, 10:55 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> > cybersource.com.au> wrote:
> > > Take this example:
>
> > > def foo(alist):
> > > alist.sort()
> > > alist
Almar Klein wrote:
> Hi Eric,
>
> First of all, I like your initiative.
there's nothing like self interest to drive one's initiative. :-) 14 years with
speech recognition and counting. I'm so looking to my 15th anniversary of being
injured next year
another initiative is exporting the spee
I don't know what exactly your python script is doing and what kind of
return value you have,
Let's assume your python application prints nothing to stdout, then
python could print out the return value and you could get it with the
back ticks (reverse single quote)
(at least for sh bash csh tcsh a
[EMAIL PROTECTED] wrote:
>
> Jeffrey> With the release of multiprocessing in Python 2.6, is there
> any Jeffrey> reason to use Pyro or RPyC?
>
> As far as I know the multiprocessing module only works on one machine
> (multi-cpu or multi-core), not across machines.
So I thought at first,
Jeffrey> With the release of multiprocessing in Python 2.6, is there any
Jeffrey> reason to use Pyro or RPyC?
As far as I know the multiprocessing module only works on one machine
(multi-cpu or multi-core), not across machines.
--
Skip Montanaro - [EMAIL PROTECTED] - http://smontanaro.d
With the release of multiprocessing in Python 2.6, is there any reason to
use Pyro or RPyC?
--
Jeffrey Barish
--
http://mail.python.org/mailman/listinfo/python-list
Here is a great reference:
http://www.thinkspot.net/sheila/staticpages/index.php?page=gypsymail
However, the code will not work for an SMTP site like gmail that requires
authentication. Anyone know of a site that has that code?
I am a nube with python and am looking for a way to learn as well a
On Nov 14, 2008, at 12:27 PM, [EMAIL PROTECTED] wrote:
What would be actually interesting would be an switch to the python
interpreter that internally annotated function parameters with how
they are used in the function and raised an exception as soon as the
function is called instead of later.
Good morning group,
When I open my Python window, this is appearing instead of the command
line >>>. (I'm somehow new to Python).
File "boot_com_servers.py", line 21, in
File "C:\Python25\lib\site-packages\pythoncom.py", line 3, in
pywintypes.__import_pywin32_system_module__("pythoncom"
On Nov 14, 11:41 am, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> in trying to make programming in Python more accessible to disabled
> programmers
> (specifically mobility impaired speech recognition users), and hitting a bit
> of
> a wall. The wall (for today) is indentation. I need a met
On Nov 15, 2:14 am, Christopher Brewster <[EMAIL PROTECTED]> wrote:
> I am running the same script on the same data on two different
> machines (the folder is synchronised with Dropbox).
> I get two different results. All the script does is count words in
> different files and perform a simple set
On Fri, Nov 14, 2008 at 10:26 AM, major-john <[EMAIL PROTECTED]> wrote:
> I'm having trouble sorting a dictionary based on values when the values are
> all lists, and i want to sort the list by key with the largest value lists
> in decreasing size.
>
> Currently, I have the following:
>
> from oper
Hi Eric,
First of all, I like your initiative.
I'm not sure if I undestand you correctly, but can't you just
increase indentation after each line that ends with a colon?
That's how I do it in my editor. The user would then only need
to specify when to decrease indentation.
Cheers,
Almar
2008/
korean_dave wrote:
> stringa = "hi"
> stringb = "hiy"
>
> I'd like it to return -1 when I do:
>
> returnVal = stringa.find(stringb);
>
> Instead, it treats stringa as "hi" and stringb as "hi".
>
No it doesn't. stringb is "hiy" and it "treats" it that way.
(And just what do you mean
On Nov 14, 5:27 pm, Greg Copeland <[EMAIL PROTECTED]> wrote:
> On Nov 14, 9:56 am, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
> > I'd like to know if there's a way to determine which is the best
> > buffer size to use when you have to send() and recv() some data over
> > the n
Hello, I am looking for a utility that will generate any number of
pings per second, and allow me to check how many of the pings in the
last X seconds have been dropped, while it is still running.
The reason I can't use the built-in Unix ping is that 1) it does not
provide overall feedback while i
in trying to make programming in Python more accessible to disabled programmers
(specifically mobility impaired speech recognition users), and hitting a bit of
a wall. The wall (for today) is indentation. I need a method of getting the
"right indentation" without having to speak a bunch of unnece
On Nov 15, 6:20 am, korean_dave <[EMAIL PROTECTED]> wrote:
> stringa = "hi"
> stringb = "hiy"
>
> I'd like it to return -1 when I do:
>
> returnVal = stringa.find(stringb);
>
> Instead, it treats stringa as "hi" and stringb as "hi".
You appear to be gravely mistaken:
| >>> stringa = "hi"
| >>
On Nov 14, 1:20 pm, korean_dave <[EMAIL PROTECTED]> wrote:
> stringa = "hi"
> stringb = "hiy"
>
> I'd like it to return -1 when I do:
>
> returnVal = stringa.find(stringb);
>
> Instead, it treats stringa as "hi" and stringb as "hi".
>
> How do I solve this?
Try this:
>>> stringa = 'hi'
>>> st
On Nov 14, 12:47 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Nov 13, 10:55 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > Take this example:
>
> > def foo(alist):
> > alist.sort()
> > alist.append(5)
>
> > The argument can be any object with sort and append
stringa = "hi"
stringb = "hiy"
I'd like it to return -1 when I do:
returnVal = stringa.find(stringb);
Instead, it treats stringa as "hi" and stringb as "hi".
How do I solve this?
--
http://mail.python.org/mailman/listinfo/python-list
2008/11/14 major-john <[EMAIL PROTECTED]>
> I'm having trouble sorting a dictionary based on values when the values are
> all lists, and i want to sort the list by key with the largest value lists
> in decreasing size.
>
> Currently, I have the following:
>
> from operator import itemgetter
>
> di
Alan Baljeu
http://www.collaborative-systems.org
Intelligent software that works _with_ you.
- Forwarded Message
From: Alan Baljeu <[EMAIL PROTECTED]>
To: Mike Driscoll <[EMAIL PROTECTED]>
Sent: Friday, November 14, 2008 2:06:26 PM
Subject: Re: automatic reload
I thought I was readi
On Nov 14, 1:59 pm, rm <[EMAIL PROTECTED]> wrote:
> On Nov 13, 7:08 pm, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
> > rm wrote:
> > > On Nov 13, 2:23 pm, James Harris <[EMAIL PROTECTED]>
> > > wrote:
>
> > >> On 13 Nov, 18:59, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
> > >>> Abah Joseph wrote:
>
>
On Nov 13, 7:08 pm, Stef Mientki <[EMAIL PROTECTED]> wrote:
> rm wrote:
> > On Nov 13, 2:23 pm, James Harris <[EMAIL PROTECTED]>
> > wrote:
>
> >> On 13 Nov, 18:59, Stef Mientki <[EMAIL PROTECTED]> wrote:
>
> >>> Abah Joseph wrote:
>
> What is the best Python GUI API? I am planning to start m
Hi Friends
I'm getting the TypeError Unsubscriptable object when using Exec in a class
Here's the example
class Fake(object):
def __init__(self, reg):
self._reg = reg
def OpenKey(self, rootkey, path):
open_key = self._reg
path_string='[\'HKLM\']'
for key in path.split('\\'):
Mr.SpOOn wrote:
Hi,
I'm writing a method to create musical chords.
This method must follow a specific set of syntax rules. At least, this
is my idea, but maybe there's a better way.
Anyway, in the code I have class Chord which is a set.
The costrunction of a chord is based on a root note and a
Florian Brucker <[EMAIL PROTECTED]> wrote:
> That is, generate a new dict which holds for each value of the old
> dict a list of the keys of the old dict that have that very value.
> Another requirement is that it should also work on lists, in that case
> with indices instead of keys. We may assum
I'm having trouble sorting a dictionary based on values when the values are
all lists, and i want to sort the list by key with the largest value lists
in decreasing size.
Currently, I have the following:
from operator import itemgetter
dict = {'A': [(10, 20), (12, 18), (5, 11), (18, 25)], 'C': [
Mr.SpOOn wrote:
Anyway, I think I can use a chain of if-clauses, one per rule and at
the end remove the notes marked with "no". But this seems to me a very
bad solution, not so pythonic. Before I proceed for this way, do you
have any suggestion? Hope the problem is not too complicated.
I say,
On Fri, Nov 14, 2008 at 1:00 PM, Mr. SpOOn <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm writing a method to create musical chords.
>
> This method must follow a specific set of syntax rules. At least, this
> is my idea, but maybe there's a better way.
> Anyway, in the code I have class Chord which is a s
Chris Mellon <[EMAIL PROTECTED]> wrote:
> Any time you port between languages, it's rarely a good idea to just
> convert code verbatim. For example:
>
> import random, string
> def random_char():
> return random.choice(string.ascii_letters + string.digits)
Note that this code doesn't preserve
On Nov 13, 2008, at 8:26 PM, Steven D'Aprano wrote:
def spam(_count=[0]):
_count[0] += 1
return "spam " * _count[0]
This is a common trick, often used for things like caching. One major
advantage is that you are exposing the cache as an *optional* part
of the
interface, which make
On Nov 13, 2008, at 3:23 PM, Arnaud Delobelle wrote:
Aaron Brady <[EMAIL PROTECTED]> writes:
One way around it, which I like the idea of but I'll be honest, I've
never used, is getting a function a 'self' parameter. You could make
it a dictionary or a blank container object, or just the funct
Hi,
I'm writing a method to create musical chords.
This method must follow a specific set of syntax rules. At least, this
is my idea, but maybe there's a better way.
Anyway, in the code I have class Chord which is a set.
The costrunction of a chord is based on a root note and a structure,
so by d
On Nov 14, 11:04 am, Alan Baljeu <[EMAIL PROTECTED]> wrote:
> I need a solution for automatically reloading files I edited. This is in a
> unit testing/fixing context, so there shouldn't be much problem with leftover
> data. I just need to be able to call a reload_changed() method of some sort
On 14 нояб, 18:12, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Fri, 14 Nov 2008 06:35:27 -0800, konstantin wrote:
> > Hi,
>
> > I wonder if there is a safe way to download page with urllib2. I've
> > constructed following method to catch all possible exceptions.
>
> See here:
I need a solution for automatically reloading files I edited. This is in a
unit testing/fixing context, so there shouldn't be much problem with leftover
data. I just need to be able to call a reload_changed() method of some sort
before rerunning tests. Stopping and restarting the python inter
On Thu, Nov 13, 2008 at 10:25 PM, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Fri, 14 Nov 2008 13:35:02 +1100, Ben Finney wrote:
>
>> Instead, it looks like you're falling foul of one of the classic
>> mistakes in the "How to ask questions the smart way" document: you've
>> got a goal, but you'
> Has anyone an idea?
You should not install "for all users" before copying it,
but "just for me".
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Nov 13, 2008 at 2:10 PM, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-11-13, Mirat Can Bayrak <[EMAIL PROTECTED]> wrote:
>
>> Hi, i'll try to write a editor in python, i want it run under
>> terminal (no qt or gtk) but i dont want to use urwid or curses
>> modules.
>>
>> Can i write m
Gilles Ganault wrote:
> On Fri, 14 Nov 2008 11:01:27 +0100, "Martin v. Löwis"
> <[EMAIL PROTECTED]> wrote:
>> Add
>>print type(output)
>> here. If it says "unicode", reconsider the next line
>>
>>> print output.decode('utf-8')
>
> In case the string fetc
1 - 100 of 155 matches
Mail list logo