Does anyone know what python libraries are available to do the following:
1. I would like to take a photograph of an object with a colour. In this
case, it is a sheet of sponge.
2. Feed this image into a function in a python library and let the function
"automatically scan" this image's
pixel
Hi,
I am curious when one should implement a "__call__()" and when a
"__getitem__()" method.
For example, I want to display functions and data in the same plot. For
a function, the natural interface would to be called as "f(x)", while
the natural interface for data would be "f[x]". On the other
Hi all,
Im learning web scraping with python from the following link
http://www.packtpub.com/article/web-scraping-with-python
To work with it, mechanize to be installed
I installed mechanize using
sudo apt-get install python-mechanize
As given in the tutorial, i tried the code as below
import
On Thu, 15 Oct 2009 09:14:35 +0200, Ole Streicher wrote:
> So what is the reason that Python has separate __call__()/() and
> __getitem__()/[] interfaces and what is the rule to choose between them?
They are separate so you can implement both, or just one, or neither,
whichever makes the most se
On Thu, Oct 15, 2009 at 5:14 PM, Ole Streicher wrote:
> So what is the reason that Python has separate __call__()/() and
> __getitem__()/[] interfaces and what is the rule to choose between them?
Hi,
This is very interesting, a thought that never occured to me before.
Usually, a function is a
On Thu, Oct 15, 2009 at 12:14 AM, Ole Streicher wrote:
> Hi,
>
> I am curious when one should implement a "__call__()" and when a
> "__getitem__()" method.
>
> For example, I want to display functions and data in the same plot. For
> a function, the natural interface would to be called as "f(x)",
Dave Angel wrote:
def find(root):
for pdf in os.walk(root, topdown=False):
for file in pdf[2]:
yield os.path.join(pdf[0],file)
At the risk of nitpicking, I think that a modicum of
tuple-unpacking would aid readability here:
for dirpath, dirnames, filenames in
2009/10/11 Philip Semanchuk :
> IMHO, break, goto, etc. have their place, but they're ripe for abuse which
> leads to spaghetti code.
Unrestricted goto can leat to spaghetti code, but surely break can't?
AFAICS, any break construct will still be H-K reducible.
--
Tim Rowe
--
http://mail.python.
I need to create a slideshow in JES but am not sure how to do it. Can anyone
help me with this. How do i create a slideshow that has a song and then two
images where one image begins then the second image slowly blends in and takes
over the first image? --
h
mattia schrieb:
> Any particular difference in using for a simple collection of element ()
> over [] or vice-versa?
Just try this and you'll see:
tup = (1,2,3)
tup.append(4)
or:
tup = (1,2,3)
tup[0] = 4
HTH,
Mick.
--
http://mail.python.org/mailman/listinfo/python-list
Any particular difference in using for a simple collection of element ()
over [] or vice-versa?
Thanks, Mattia
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 14, 1:05 pm, mattia wrote:
> Any particular difference in using for a simple collection of element ()
> over [] or vice-versa?
>
> Thanks, Mattia
From: http://www.faqs.org/docs/diveintopython/odbchelper_tuple.html
1 You can’t add elements to a tuple. Tuples have no append or extend
Peng Yu writes:
> http://docs.python.org/reference/simple_stmts.html#grammar-token-yield_stmt
>
> The explanation of yield is not clear to me, as I don't know what a
> generator is. I see the following example using 'yield'. Could
> somebody explain how 'yield' works in this example? Thank you!
>
On Thu, Oct 15, 2009 at 12:39 AM, Raji Seetharaman wrote:
> Hi all,
>
> Im learning web scraping with python from the following link
> http://www.packtpub.com/article/web-scraping-with-python
>
> To work with it, mechanize to be installed
> I installed mechanize using
>
> sudo apt-get install pyt
On Thu, Oct 15, 2009 at 3:21 AM, Nanjundi wrote:
> 3 You can’t find elements in a tuple. Tuples have no index method.
>
I don't know what language you're using there, but my Python tuples have
indexes.
>>> a = (1, 2, 3)
>>> a
(1, 2, 3)
>>> a[1]
2
--
http://mail.python.org/mailman/listinf
Ole Streicher wrote:
> I am curious when one should implement a "__call__()" and when a
> "__getitem__()" method.
>
> For example, I want to display functions and data in the same plot.
Wait: The term 'function' is overloaded. In Python and programming in
general, a function is a piece of code wi
On Thu, Oct 15, 2009 at 1:27 AM, Xavier Ho wrote:
> On Thu, Oct 15, 2009 at 3:21 AM, Nanjundi wrote:
>> 3 You can’t find elements in a tuple. Tuples have no index method.
>
> I don't know what language you're using there, but my Python tuples have
> indexes.
>
a = (1, 2, 3)
a
> (1
On Thu, Oct 15, 2009 at 6:39 PM, Chris Rebert wrote:
> Nanjundi meant "index method" as in "a method .index()" (i.e. a method
> named "index") which searches through the container for the given item
> and returns the index of the first instance of said item, like
> list.index() does.
>
> Interest
Dylan Palmboom wrote:
Does anyone know what python libraries are available to do the following:
1. I would like to take a photograph of an object with a colour. In this
case, it is a sheet of sponge.
2. Feed this image into a function in a python library and let the function
"automatically sca
On Thu, Oct 15, 2009 at 1:46 AM, Xavier Ho wrote:
>
> On Thu, Oct 15, 2009 at 6:39 PM, Chris Rebert wrote:
>>
>> Nanjundi meant "index method" as in "a method .index()" (i.e. a method
>> named "index") which searches through the container for the given item
>> and returns the index of the first i
Hi,
Does HTMLgen (Robin Friedrich's) still exsist?? And, if so, where can it
be found?
--
Andre van der Vlies
Certifiable Linux/UNIX engineer (CLUE)
Homepage: http://vandervlies.xs4all.nl/~andre
Books: http://www.lulu.com/andre14
Key fi
Xavier Ho wrote:
On Thu, Oct 15, 2009 at 6:39 PM, Chris Rebert wrote:
Nanjundi meant "index method" as in "a method .index()" (i.e. a method
named "index") which searches through the container for the given item
and returns the index of the first instance of said item, like
list.index() does.
the value 5 not in tuple
reference help
list.index(x)
Return the index in the list of the first item whose value is x. It is an error
if there is no such item.
--
Eric Lee
-- 原始邮件 --
发件人: "Chris Rebert";
发送时间: 2009年10月15日(星期四) 下午4:48
收
hi,
i am relatively new to python programming,
i am facing the following problem:
i am tring to simply obtain data from a file ( "B.txt" , data in this file
are in single column and floats)
and plot a graph between those values and thier index. ( for example if in
file , if at 2nd position valu
On Thu, Oct 15, 2009 at 6:55 PM, Tim Golden wrote:
> It was added relatively recently, around Python 2.6 I think,
> at least partly as an oh-ok-then reaction to everyone asking:
> "how come lists have .index and .count and tuples don't?"
> and neverending "tuples-are-immutable-lists-no-they-aren'
On Oct 15, 2:58 am, an...@vandervlies.xs4all.nl wrote:
> Hi,
> Does HTMLgen (Robin Friedrich's) still exsist?? And, if so, where can it
> be found?
>
> --
> Andre van der Vlies
> Certifiable Linux/UNIX engineer (CLUE)
> Homepage:http://vandervlies.xs4al
On Thu, Oct 15, 2009 at 6:14 PM, ankita dutta wrote:
> is dumped
> segmentation fault
>
>
It looks like you are using matplotlib, and matplotlib is the one
likely to segfault. You could check that it is indeed the case by just
commenting the part which does the plot - but I would be very
surpr
On Thu, Oct 15, 2009 at 2:14 AM, ankita dutta wrote:
> hi,
> i am relatively new to python programming,
> i am facing the following problem:
>
> i am tring to simply obtain data from a file ( "B.txt" , data in this file
> are in single column and floats)
> and plot a graph between those values a
Peng Yu wrote:
I have the following python code snippet. I'm wondering what command I
should use to terminate the program if the arguments are not right.
#!/usr/bin/env python
import sys
import os
if len(sys.argv) <= 1:
print "usage:", os.path.basename(sys.argv[0]), ''
return ## what comma
On Thu, 2009-10-15 at 14:44 +0530, ankita dutta wrote:
> hi,
> i am relatively new to python programming,
> i am facing the following problem:
>
> i am tring to simply obtain data from a file ( "B.txt" , data in
> this file are in single column and floats)
> and plot a graph between those value
[Janto Dreijer]
> I found a PDF by Soumya D. Mohanty entitled "Efficient Algorithm for
> computing a Running Median" (2003) by Googling. It has code snippets
> at the end, but it's not going to be a simple cut-and-paste job. It
> will take some work figuring out the missing parts.
See http://code.
thanx david,
yes ,i am using matplotlib for plotting graph.
i am using this lines in my programme:
"import matplotlib.pyplot as plt"
now, if the problem with matplotlib ( and i will send them mail) ,
but can you kindly tell alternatively , how can i plot graph for my
programme.
ankita
On Thu,
hi chris,
i am using matplotlib for plotting graph, as following:
"import matplotlib.pyplot as plt"
can you kindly tell me how to fix this problem(crashing) ?
On Thu, Oct 15, 2009 at 3:36 PM, Chris Rebert wrote:
> On Thu, Oct 15, 2009 at 2:14 AM, ankita dutta
> wrote:
> > hi,
> > i am relat
If I understand things correctly, the set class uses hash()
universally to calculate hash values for its elements. Is there a
standard way to have set use a different function? Say I've got a
collection of objects with names. I'd like to create a set of these
objects where the hashing is done on th
On Thu, Oct 15, 2009 at 4:24 AM, Austin Bingham
wrote:
> If I understand things correctly, the set class uses hash()
> universally to calculate hash values for its elements. Is there a
> standard way to have set use a different function? Say I've got a
> collection of objects with names. I'd like
On Thu, Oct 15, 2009 at 7:46 PM, ankita dutta wrote:
> thanx david,
>
> yes ,i am using matplotlib for plotting graph.
> i am using this lines in my programme:
>
> "import matplotlib.pyplot as plt"
>
> now, if the problem with matplotlib ( and i will send them mail) ,
The problem is how matplotli
Austin Bingham wrote:
> If I understand things correctly, the set class uses hash()
> universally to calculate hash values for its elements. Is there a
> standard way to have set use a different function? Say I've got a
> collection of objects with names. I'd like to create a set of these
> objec
That's definitely a workable solution, but it still rubs me the wrong
way. The uniqueness criteria of a set seems, to me, like a property of
the set, whereas the python model forces it onto each set element.
Another issue I have with the HashWrapper approach is its space
requirements. Logically, w
I guess we see things differently. I think it's quite natural to want
a set of unique objects where "unique" is defined as an operation on
some subset/conflation/etc. of the attributes of the elements. That's
all that the regular set class is, except that it always uses the
hash() function to calcu
Austin Bingham wrote:
> If I understand things correctly, the set class uses hash()
> universally to calculate hash values for its elements. Is there a
> standard way to have set use a different function? Say I've got a
> collection of objects with names. I'd like to create a set of these
> object
hi,
well, even i was also using matplotlib for some time, and it was working
fine.
but this time i use it for data which is quite large,( my input file has
single column of float values ,
and length ( no. of rows) of this column is 10,000,000. )
may be because of size it might have crashed.
any wa
On Thu, Oct 15, 2009 at 9:08 PM, ankita dutta wrote:
> hi,
> well, even i was also using matplotlib for some time, and it was working
> fine.
> but this time i use it for data which is quite large,( my input file has
> single column of float values ,
> and length ( no. of rows) of this column is 1
Chris Rebert wrote:
> On Thu, Oct 15, 2009 at 4:24 AM, Austin Bingham
> wrote:
>> If I understand things correctly, the set class uses hash()
>> universally to calculate hash values for its elements. Is there a
>> standard way to have set use a different function? Say I've got a
>> collection of
Austin Bingham wrote:
> That's definitely a workable solution, but it still rubs me the wrong
> way. The uniqueness criteria of a set seems, to me, like a property of
> the set, whereas the python model forces it onto each set element.
This is a POV, but to to me, the set just deals with a very m
I'm trying to troubleshoot a bug in VirtualEnv, but in order to do so
I need to better understand how Python initializes Tkinter.
Setup:
Python 2.6.3 on Windows 7 & Windows XP SP3
Problem:
There is a file called init.tcl that gets loaded when first executing
a Tkinter statement. The file is held
Erik Max Francis wrote:
> Tim Chase wrote:
>> In general, if you're using "is" (and not comparing with None) or id(),
>> you're doing it wrong unless you already know the peculiarities of
>> Python's identity implementations.
> Right. Another way to do look at it is that if you're curious about
>
Hello,
I'm using PyUSB 0.4.2 to interact with a Microsoft Sindwinder joystick. I'm
using python 2.6 on windows XP. With the code snippet below I'm able to find
usb device currently plugged into my computer. Now I would like to actually
tap into the data that to joystick is providing to the system.
On Thu, Oct 15, 2009 at 2:23 PM, Diez B. Roggisch wrote:
> Austin Bingham wrote:
> This is a POV, but to to me, the set just deals with a very minimal
> protocol - hash-value & equality. Whatever you feed it, it has to cope with
> that. It strikes *me* as odd to ask for something else.
But I'm no
Austin Bingham wrote:
> On Thu, Oct 15, 2009 at 2:23 PM, Diez B. Roggisch
> wrote:
>> Austin Bingham wrote:
>> This is a POV, but to to me, the set just deals with a very minimal
>> protocol - hash-value & equality. Whatever you feed it, it has to cope
>> with that. It strikes *me* as odd to ask
On Thu, Oct 15, 2009 at 3:02 PM, Diez B. Roggisch wrote:
> Austin Bingham wrote:
> You do. Hashes can collide, and then you need equality. Sets are *based* on
> equality actually, the hash is just one optimization. ...
Right, thanks for clearing that up. Not reading closely enough ==
public shami
Francesco Bochicchio wrote:
>
> I would add a server class, maybe subclassing something in standard
> library, and add to it the 'send' method, so that sending a mail would
> be
> something like:
>
> myserver = MyMailServer("mysmtpserver", "localhost", ) # this only
> needs to be done once, not
>> And if there were something that would decide on context which of several
>> implementations to use, you'd have less to worry. As things are, there
>> isn't such thing (I don't even have the slightest idea what could work),
>> you are as well off with defining two functions.
>
> But this "conte
Austin Bingham schrieb:
> I guess we see things differently. I think it's quite natural to want
> a set of unique objects where "unique" is defined as an operation on
> some subset/conflation/etc. of the attributes of the elements.
What you seem to imply is that the hash function imposes some kin
On Thu, Oct 15, 2009 at 3:43 PM, Diez B. Roggisch wrote:
> The context-decider isn't the same thing because it isn't designed yet :)
> And most probably won't ever be. It's just the abstract idea that
> hashing/equality change for one object depending on the circumstances they
> are used in, and t
On Oct 15, 7:24 am, Austin Bingham wrote:
> [snip] I'd like to create a set of these
> objects where the hashing is done on these names. [snip]
Why not use a dict? The key would be the object name. Pretty much
the same behavior as a set (via the key), and you can still easily
iterate over the o
On Thu, Oct 15, 2009 at 3:50 PM, Mick Krippendorf wrote:
> Austin Bingham schrieb:
> What you seem to imply is that the hash function imposes some kind of
> uniqueness constraint on the set which uses it. That's just not the
> case, the uniqueness constraint is always the (in-)equality of objects,
On Thu, Oct 15, 2009 at 4:06 PM, Anthony Tolle wrote:
> Why not use a dict? The key would be the object name. Pretty much
> the same behavior as a set (via the key), and you can still easily
> iterate over the objects.
To reiterate, dict only gets me part of what I want. Whereas a set
with uniq
En Thu, 15 Oct 2009 05:58:02 -0300, escribió:
Does HTMLgen (Robin Friedrich's) still exsist?? And, if so, where can it
be found?
Would you consider using HyperText? It's inspired on HTMLGen but I like
its design much more (that said, currently I prefer to use a templating
engine instead o
On Oct 15, 10:42 am, Austin Bingham wrote:
> On Thu, Oct 15, 2009 at 4:06 PM, Anthony Tolle > To reiterate, dict only gets
> me part of what I want. Whereas a set
> with uniqueness defined over 'obj.name' would guarantee no name
> collisions, dict only sorta helps me keep things straight; it does
I'm getting input for a program while it's running by using raw_input in a
loop in separate thread. This works except for the inconvenience of not having
a command history or the use of backspace etc.
That can be solved by loading the readline module; however, it results in a
loss of visible a
On Thu, Oct 15, 2009 at 5:22 AM, Diez B. Roggisch wrote:
> Chris Rebert wrote:
>
>> On Thu, Oct 15, 2009 at 4:24 AM, Austin Bingham
>> wrote:
>>> If I understand things correctly, the set class uses hash()
>>> universally to calculate hash values for its elements. Is there a
>>> standard way to h
Suppose I have classes 'A', 'B', 'C', 'D'. The definition of these
classes are long enough so that I have to put each class in a separate
module 'mA', 'mB', 'mC', 'mD', which are in packages 'pA', 'pB', 'pC',
'pD', respectively. And there were no need to have conversion
functions between these c
Gabriel Genellina wrote:
> En Thu, 15 Oct 2009 05:58:02 -0300, escribió:
>
> > Does HTMLgen (Robin Friedrich's) still exsist?? And, if so, where can it
> > be found?
>
> Would you consider using HyperText? It's inspired on HTMLGen but I like
> its design much more (that said, currently I pref
En Thu, 15 Oct 2009 11:42:20 -0300, Austin Bingham
escribió:
On Thu, Oct 15, 2009 at 4:06 PM, Anthony Tolle
wrote:
Why not use a dict? The key would be the object name. Pretty much
the same behavior as a set (via the key), and you can still easily
iterate over the objects.
To reiterate
Hi;
My code was working fine then I must have inadvertently screwed something
up. The result is a mysql insert/update statement that looks something like
the following:
update productsX set Name=%s, Title=%s, Description=%s, Price=%s,
Bedrooms=%s, Bathrooms=%s, Conditions=%s, Acreage=%s, Construct
Mel wrote:
> As Python has evolved the semantics have got richer, and the implementation
> has got trickier with proxy objects and wrapped functions and more.
> Whatever use there was for `is` in ordinary code is vanishing.
'is' has important use cases but it's not trivial to use if you leave
t
The built-ins aren't mutable, and the singletons are each immutable
and/or unique; so in no case do objects that are both different and
mutable have the same ID.
I know. :-)
Although I have no idea how it is that `id({}) == id({})` as a prior
posted showed; FWIW, I can't manage to reproduce
Christian Heimes írta:
Chris Rebert wrote:
The built-ins aren't mutable, and the singletons are each immutable
and/or unique; so in no case do objects that are both different and
mutable have the same ID.
Correct, the fact allows you to write code like "type(egg) is str" to
check if an
On Tue, Oct 13, 2009 at 1:23 PM, Robert Kern wrote:
> On 2009-10-13 13:00 PM, Peng Yu wrote:
>>
>> I use pickle to dump a long list. But when I load it, I only want to
>> load the first a few elements in the list. I am wondering if there is
>> a easy way to do so? Thank you!
>
> Not by pickling th
On Thu, Oct 15, 2009 at 5:15 PM, Gabriel Genellina
wrote:
> En Thu, 15 Oct 2009 11:42:20 -0300, Austin Bingham
> escribió:
> I think you didn't understand correctly Anthony Tolle's suggestion:
>
> py> class Foo:
> ... def __init__(self, name): self.name = name
> ...
> py> objs = [Foo('Joe'), Fo
None, True, False, integers and strings are not mutable. The only time
the id is the "same" between two objects is if they are the identical
two objects.
I'm aware of that. ;-)
CPython just (as a performance optimization) re-uses the same objects
sometimes even if people think they're usi
On Thu, 15 Oct 2009 09:11:00 -0700, Austin Bingham
wrote:
On Thu, Oct 15, 2009 at 5:15 PM, Gabriel Genellina
wrote:
En Thu, 15 Oct 2009 11:42:20 -0300, Austin Bingham
escribió:
I think you didn't understand correctly Anthony Tolle's suggestion:
py> class Foo:
... def __init__(self, name
Le Wed, 14 Oct 2009 22:39:14 -0700, John Nagle a écrit :
>
> Note that multithreaded compute-bound Python programs really suck
> on multiprocessors. Adding a second CPU makes the program go slower,
> due to a lame mechanism for resolving conflicts over the global
> interpreter lock.
I'm not
It says on http://www.python.org/dev/peps/pep-0008/
Package and Module Names
Modules should have short, all-lowercase names. Underscores can be used
in the module name if it improves readability. Python packages should
also have short, all-lowercase names, although the use
Thanks a bunch. Qill give it a shot.
--p
On Oct 14, 8:18 pm, "Gabriel Genellina"
wrote:
> En Wed, 14 Oct 2009 22:08:09 -0300,prasanna
> escribió:
>
> > Out of curiosity--one more thing I haven't yet figured out, is there a
> > xmlrpc command I can send that stops or restarts the server?
>
> If
Peng Yu wrote:
It says on http://www.python.org/dev/peps/pep-0008/
... don't get too hung up on things like this. Just
use the modules.
But StringIO does not following this convention. Although on the same
page, it also mentions the following. However, since StringIO is in
the library, shall
Dear all,
I have a strange problem that I am not able to solve myself.
I have written a little Python script to download image from last.fm,
now, if I call it from the python environment it works, if I call it
from Windows console it doesn't works
If I open the prompt and run python I call
On 2009-10-15 11:05 AM, Peng Yu wrote:
On Tue, Oct 13, 2009 at 1:23 PM, Robert Kern wrote:
On 2009-10-13 13:00 PM, Peng Yu wrote:
I use pickle to dump a long list. But when I load it, I only want to
load the first a few elements in the list. I am wondering if there is
a easy way to do so? Tha
On Thu, Oct 15, 2009 at 8:02 AM, Peng Yu wrote:
> Suppose I have classes 'A', 'B', 'C', 'D'. The definition of these
> classes are long enough so that I have to put each class in a separate
> module 'mA', 'mB', 'mC', 'mD', which are in packages 'pA', 'pB', 'pC',
> 'pD', respectively. And there
En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu escribió:
How do I determine if I have loaded all the elements? I use the
following code. I'm wondering if there is any better solution than
this.
###
import pickle
alist = [1, 2.0, 3, 4+6j]
output=open('serialize_list.output/serialize
En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu escribió:
How do I determine if I have loaded all the elements? I use the
following code. I'm wondering if there is any better solution than
this.
###
import pickle
alist = [1, 2.0, 3, 4+6j]
output=open('serialize_list.output/serialize
On Oct 15, 12:11 pm, Austin Bingham wrote:
> To put it in code, I want this:
>
> s = set(hash_func = lambda obj: hash(obj.name), eq_func = ...)
> ...
> x.name = 'foo'
> y.name = 'foo'
> s.add(x)
> s.add(y) # no-op because of uniqueness criteria
> assert len(s) == 1
I wrote a quick s
> When I google (including codesearch) for assertMatch, I get a mishmash of
> opinions. Am I missing the One True assertMatch(), or isn't there one and I
> gotta write it? or copy and use one of the pretenders?
Ookay, try this:
def assertMatch(self, pattern, slug):
r = re.compile(patt
I can't send emails out. Can u fix this problem please?
The
message could not be sent. The authentication setting might not be
correct for your outgoing e-mail [SMTP] server. For help solving this
problem, go to Help, search for "Troubleshoot Windows Mail", and read
the "I'm having problems sendi
On Fri, Oct 16, 2009 at 3:28 AM, Ander wrote:
> I can't send emails out. Can u fix this problem please?
>
I don't know what I'm missing here, but you evidently sent out an email to
the Python mailing list...
Cheers,
Xav
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 15 Oct 2009 13:24:18 -0300, Rami Chowdhury
escribió:
On Thu, 15 Oct 2009 09:11:00 -0700, Austin Bingham
wrote:
On Thu, Oct 15, 2009 at 5:15 PM, Gabriel Genellina
wrote:
En Thu, 15 Oct 2009 11:42:20 -0300, Austin Bingham
escribió:
I think you didn't understand correctly Anthony
Austin Bingham wrote:
Yes, I can construct a dict as you
specify, where all of the keys map to values with name attributes
equal to the key. My point is that dict doesn't really help me enforce
that beyond simply letting me set it up; it doesn't care about the
values at all, just the keys. All th
I can't send emails out. Can u fix this problem please?
The problem is on line 72.
Oh wait...you didn't include any code or the traceback. Yeah,
that's gonna make it a little difficult to diagnose. But I'm
gonna guess that "The authentication setting might not be correct
for your outgoing e-m
Hello,
I was fooling around with python's struct lib, looking on how we'd
unpack some data. I was a little confused by its behavior:
Python 2.5.2 (r252:60911, Jul 22 2009, 15:33:10)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information
QOTW: "It is however, much like the framework in question, best kept private
and not made public." - Ed Singleton, on a "perfectly healthful and
acceptable" practice ... left unnamed here
http://groups.google.com/group/comp.lang.python/msg/987b1a7a4b9 01f3f
Looking for a sane way of
On Oct 15, 1:49 pm, Ethan Furman wrote:
> I'm still not sure I understand your concern about the values in a set,
> though. Sets keep the first object of a given key, dicts keep the last
> object of a given key; in both cases, all other objects with the same
> key are lost.
>
> So is that the beh
Steve Holden wrote:
> Many such designs make mistakes like using multiple columns
> (or, even worse, comma-separated values) instead of many-to-many
> relationships.
BTW, the comma-separted-values-in-a-field is officially called the First
Anormal Form. There *has to be* some value to it since I'v
Hi all,
I am attempting to learn curses programming and in the process have
created a small curses ui program. I am currently working on the code
which is handling resizing the terminal window.
As part of the resizing of the terminal window, I have to resize and
move some of the subwindows in my u
Peng Yu wrote:
It says on http://www.python.org/dev/peps/pep-0008/
Package and Module Names
Modules should have short, all-lowercase names. Underscores can be used
in the module name if it improves readability. Python packages should
also have short, all-lowercase names,
Mick Krippendorf wrote:
Steve Holden wrote:
Many such designs make mistakes like using multiple columns
(or, even worse, comma-separated values) instead of many-to-many
relationships.
BTW, the comma-separted-values-in-a-field is officially called the First
Anormal Form. There *has to be* som
SmokingDog wrote:
> Interesting interpretation.. but I just gave it a try.
>
a = (1,2,3,4)
a
> (1, 2, 3, 4)
a.index(3)
> 2
a.index(5)
> Traceback (most recent call last):
> File "", line 1, in
> ValueError: tuple.index(x): x not in tuple
>
> So my Python is say
I have a large amount of binary data that needs to be pushed across
the network. It appears from profiling that the dominant time is
being taken up by packing the data. (50%) Here is a CME that shows
the problem.
from numpy import random
from struct import pack
import time
lenstim = 10084200
s
On Thu, Oct 15, 2009 at 12:01 PM, Gabriel Genellina
wrote:
> En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu escribió:
>
>> How do I determine if I have loaded all the elements? I use the
>> following code. I'm wondering if there is any better solution than
>> this.
>>
>>
>> ###
>> import
Ethan Furman schrieb:
> Mick Krippendorf wrote:
>> BTW, the comma-separted-values-in-a-field is officially called the First
>> Anormal Form. There *has to be* some value to it since I've seen it used
>> quite a few times...
>
> Just because you've seen something, doesn't mean it has value; [...]
Risposta al messaggio di gialloporpora :
Dear all,
I have a strange problem that I am not able to solve myself.
Ok, I have solved my problem, sorry for the post.
First I had no view this function:
sys.getfilesystemencoding()
that return the console encoding, sorry.
Sandro
*gialloporpora:
1 - 100 of 162 matches
Mail list logo