Filip Gruszczyński wrote:
> I took a look at the standard library and tried to find some
> validation against schema tools, but found none. I googled, but found
> only links to external libraries, that can do some validation. Does it
> mean, that there is no validation in stdlib or have I just miss
I'm stuck on a problem where I want to use marshal for serialization
(yes, yes, I know (c)Pickle is normally recommended here). I favor
marshal for speed for the types of data I use.
However it seems that marshal.dumps() for large objects has a
quadratic performance issue which I'm assuming is tha
Hello [EMAIL PROTECTED],
import urllib
url_opener = urllib.URLopener() # create URLopener
#You could also work with urllib.FancyURLopener
try:
data = url_opener.open("http://www.somedomain.com/index.html";) #
open index.html
except IOError, error_code:
if error_code[0] == "http error":
if erro
I am using a python program on a lot of different documents and for few of
them I will get NoneType error. I just want to skip those files and continue
for others, I do this without a problem for
IndexError,TypeError,ValueError,NameError :
try:
except (IndexError,TypeError,ValueError,NameErr
Hello Fernando,
I hope that's of some help! I think you may want to delve deeper
into
FancyURLopener...
The problem is that I'm using a subclass of FancyOpener and it doesn't
raise those exceptions.
Ok, forget it, I should have read the "fine" manual. O:-)
--
http://mail.python.org/mailma
On 16:04, domenica 15 giugno 2008 [EMAIL PROTECTED] wrote:
> cStringIO.StringIO object to marshal.dump() instead but I quickly
> learned this is not supported (only true file objects are supported).
>
> Any ideas about how to get around the marshal quadratic issue? Any
> hope for a fix for that
On 04:08, domenica 15 giugno 2008 [EMAIL PROTECTED] wrote:
> what's wrong with getattr(cp, nn) ?
The learning curve to get into these programming ways.
Does gettattr run the snippet passed in?
Considering that nn is a name of function, which will be called and (cfl,
value) are the parameters to p
On 06:34, domenica 15 giugno 2008 Dennis Lee Bieber wrote:
>> for nn in stn_items:
> I already see a syntax error when viewing that in Agent... A missing
> indent level under the "for"
The program don't complain wrong indentation, I mostly sure a wrong
copy-paste error.
Error doesn't com
[EMAIL PROTECTED] wrote:
> I'm stuck on a problem where I want to use marshal for serialization
> (yes, yes, I know (c)Pickle is normally recommended here). I favor
> marshal for speed for the types of data I use.
>
> However it seems that marshal.dumps() for large objects has a
> quadratic perfo
On 04:11, domenica 15 giugno 2008 Daniel Fetchinson wrote:
> Check this out: http://www.voidspace.org.uk/python/configobj.html
>
Let me add:
cfgparse, iniparse
I've look at all to find a simple solution for my interest, but I realized
not a good result.
I'm using three of them ConfigParser, cfgpa
On Jun 15, 1:04 am, [EMAIL PROTECTED] wrote:
> However it seems that marshal.dumps() for large objects has a
> quadratic performance issue which I'm assuming is that it grows its
> memory buffer in constant increments.
Looking at the source in
http://svn.python.org/projects/python/trunk/Python/ma
On Jun 15, 7:47 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I'm stuck on a problem where I want to use marshal for serialization
> > (yes, yes, I know (c)Pickle is normally recommended here). I favor
> > marshal for speed for the types of data I use.
>
> > However it s
I released this a while ago but did some work recently to fix some bugs
so I thought I may as well post it here. To quickly summarise:
In-line syntax highlighting
Auto complete with suggestions as you type
Pastebin stuff, save to file
"Rewind" feature to jump back a line if you mess up (don't ask
2008/6/15, Bob Farrell <[EMAIL PROTECTED]>:
>
> I released this a while ago but did some work recently to fix some bugs
> so I thought I may as well post it here. To quickly summarise:
> In-line syntax highlighting
> Auto complete with suggestions as you type
> Pastebin stuff, save to file
> "Rewin
Quick question:
I have python code that does a lot of floating point arithmetic. How
do I make it do the arithmetic in 64 bit? (I have a 64 bit CPU.) If
I'll install a 64-bit operating system, will that do the trick?
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
>> Here's how marshal resizes the string:
>>
>> newsize = size + size + 1024;
>> if (newsize > 32*1024*1024) {
>> newsize = size + 1024*1024;
>> }
>>
>> Maybe you can split your large objects and marshal multiple objects to
>> keep the siz
Hi,
Le Sunday 15 June 2008 10:35:18 Maryam Saeedi, vous avez écrit :
> I am using a python program on a lot of different documents and for few of
> them I will get NoneType error. I just want to skip those files and
> continue for others, I do this without a problem for
> IndexError,TypeError,Valu
[EMAIL PROTECTED] wrote:
> Quick question:
> I have python code that does a lot of floating point arithmetic. How
> do I make it do the arithmetic in 64 bit? (I have a 64 bit CPU.) If
> I'll install a 64-bit operating system, will that do the trick?
The Python float type uses a C double internall
Hi,
currently I have a problem understanding Py_BuildValue. I have this code:
static PyObject *function(PyObject *self, PyObject *args) {
PyObject * python_return_value = NULL;
PyObject * dummy = NULL;
double * internal_list;
/* converting to python representation */
for (i
On Jun 15, 2:48 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Quick question:
> > I have python code that does a lot of floating point arithmetic. How
> > do I make it do the arithmetic in 64 bit? (I have a 64 bit CPU.) If
> > I'll install a 64-bit operating system, will
On Sun, Jun 15, 2008 at 8:02 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> On Jun 15, 2:48 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> > > Quick question:
> > > I have python code that does a lot of floating point arithmetic. How
> > > do I make it do the arithme
[EMAIL PROTECTED] wrote:
> On Jun 15, 2:48 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>> > Quick question:
>> > I have python code that does a lot of floating point arithmetic. How
>> > do I make it do the arithmetic in 64 bit? (I have a 64 bit CPU.) If
>> > I'll instal
Hallöchen!
Grant Edwards writes:
> On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
>>> [...]
>>>
>>> IMO, a few of the "un-Pythonic" things about wxPython are:
>>>
>>> 1) Window ID numbers.
>>
>> When I started to use wxPython, there was a newly-introduced
>> wx.ID_ANY that you could
Raymond Hettinger wrote:
> When more space is needed, the resize operation over-allocates by
> double the previous need plus 1K. This should give amortized O(1)
> performance just like list.append().
>
> However, when that strategy requests more than 32Mb, the resizing
> becomes less aggressive a
I wrote a Python program (103 lines, below) to download developer data
from SourceForge for research about social networks.
Please critique the code and let me know how to improve it.
An example use of the program:
prompt> python download.py 1 24
The above command downloads data for the pro
On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>> You're saying that having the user or-together a bunch of
>> bitmasks and pass the result as an integer is a common way for
>> Python functions/object allow the user to turn optional
>> features on and off?
>
> "Common" doesn't matter.
I wrote a binary search tree in python, explaining as I was doing it
how and why I did it. I am very interested in receiving comments on
the code, process, and anything else that will improve my coding or
writing.
I wrote this all up in my blog at:
http://kasterma.wordpress.com/2008/06/15/implem
[EMAIL PROTECTED] wrote:
> Does it mean that even now it does arithmetic in 64 bit?
> I'm not getting enough precision. Is there any way to increase it?
Buy a good book about numerics or take a course. ;)
Seriously, computers and IEEE 754 floating point numbers have a lot of
pit falls. If you cho
Hi,
> Hi,
>
> currently I have a problem understanding Py_BuildValue. I have this code:
>
> static PyObject *function(PyObject *self, PyObject *args) {
>PyObject * python_return_value = NULL;
>PyObject * dummy = NULL;
>double * internal_list;
>
>
>/* converting to python repres
Hi,
The main while in main thread spend all cpu time, it's more convenient put
one little sleep between each iteration or use a some synchronization method
between threads.
And about your questions IMO:
> --- Are my setup and use of threads, the queue, and "while True" loop
> correct or conven
On Jun 15, 8:40 am, John Salerno <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
> > If the two computers are in no way connected via any type of
> > network, then the two programs won't be able to talk to each
> > other.
>
> > The programs can't create a network, they can only use one that
> > a
I know there must be at least a few very solid answers to this, but,
just to hear it from the Pythonistas: Why can't there be several GUI
toolkits on the standard library?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> I know there must be at least a few very solid answers to this, but,
> just to hear it from the Pythonistas: Why can't there be several GUI
> toolkits on the standard library?
Because the Zen of Python advises against it:
>>> import this
The Zen of Python, by Tim Pete
On Jun 15, 3:16 am, John Machin <[EMAIL PROTECTED]> wrote:
> But that change went into the svn trunk on 11-May-2008; perhaps the OP
> is using a production release which would have the previous version,
> which is merely "newsize = size + 1024;".
>
> Do people really generate 32MB pyc files, or is
On Jun 15, 5:05 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Does it mean that even now it does arithmetic in 64 bit?
> > I'm not getting enough precision. Is there any way to increase it?
>
> Buy a good book about numerics or take a course. ;)
>
> Seriously, compu
Thank you. At least I can exclude another few error sources, now.
Cédric Lucantis wrote:
> I see nothing wrong with your code so I'd say it is somewhere else (did
> you snip any code between the end of the loop and the return?).
No. (Apart from freeing allocated memory.)
> I've never
> seen tho
Hallöchen!
Grant Edwards writes:
> On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
>>> You're saying that having the user or-together a bunch of
>>> bitmasks and pass the result as an integer is a common way for
>>> Python functions/object allow the user to turn optional features
>>>
> I do need speed. Is there an option?
Mind telling us what you *actually* want to achieve? (What do you want to
calculate?)
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Hi list,
I'm trying to build a package for python modules.
When I just wanted to have a package for Python2.5, this is an easy task,
but in most cases, it's not enough.
Sometimes I need python2.4, 2.5, 2.6 or 3.0 etc.
The problem is coming from the fact that python installs its modules
into versi
On Jun 15, 6:58 pm, Christian Meesters <[EMAIL PROTECTED]> wrote:
> > I do need speed. Is there an option?
>
> Mind telling us what you *actually* want to achieve? (What do you want to
> calculate?)
>
> Christian
Physical simulations of objects with near-lightspeed velocity.
--
http://mail.python.
On Mon, 16 Jun 2008 01:01:47 +0900, js <[EMAIL PROTECTED]> wrote:
Hi list,
I'm trying to build a package for python modules.
When I just wanted to have a package for Python2.5, this is an easy task,
but in most cases, it's not enough.
Sometimes I need python2.4, 2.5, 2.6 or 3.0 etc.
The problem
> Thank you. At least I can exclude another few error sources, now.
>
>
>> I see nothing wrong with your code so I'd say it is somewhere else (did
>> you snip any code between the end of the loop and the return?).
>No. (Apart from freeing allocated memory.)
I'm pretty sure we'll find something i
On Jun 15, 9:37 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] writes:
> > I know there must be at least a few very solid answers to this, but,
> > just to hear it from the Pythonistas: Why can't there be several GUI
> > toolkits on the standard library?
>
> Because the Zen of Python
By "package", I meant APT, Ports for BSD, MacPorts, etc.
On Mon, Jun 16, 2008 at 1:16 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Mon, 16 Jun 2008 01:01:47 +0900, js <[EMAIL PROTECTED]> wrote:
>>
>> Hi list,
>>
>> I'm trying to build a package for python modules.
>> When I just wanted
[EMAIL PROTECTED] wrote:
> On Jun 15, 6:58 pm, Christian Meesters <[EMAIL PROTECTED]> wrote:
>> > I do need speed. Is there an option?
>>
>> Mind telling us what you *actually* want to achieve? (What do you want to
>> calculate?)
>>
>> Christian
>
> Physical simulations of objects with near-light
> I know there must be at least a few very solid answers to this, but,
> just to hear it from the Pythonistas: Why can't there be several GUI
> toolkits on the standard library?
Why do you think there can't be several GUI toolkits in the standard
library? There is nothing that prohibits such a thi
Thank you so much - I was such an idiot (see below).
>>> I see nothing wrong with your code so I'd say it is somewhere else (did
>>> you snip any code between the end of the loop and the return?).
>
>>No. (Apart from freeing allocated memory.)
>
> I'm pretty sure we'll find something interesting
Peter Otten wrote:
>
> How did you determine that standard python floats are not good enough?
> Everything beyond that is unlikely to be supported by the hardware and
> will therefore introduce a speed penalty.
>
> Did you try gmpy?
I would like to add: If Python's precision (or that of additiona
On Mon, 16 Jun 2008 01:37:47 +0900, js <[EMAIL PROTECTED]> wrote:
On Mon, Jun 16, 2008 at 1:16 AM, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
On Mon, 16 Jun 2008 01:01:47 +0900, js <[EMAIL PROTECTED]> wrote:
Hi list,
I'm trying to build a package for python modules.
When I just wanted to
On Jun 15, 7:43 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Jun 15, 6:58 pm, Christian Meesters <[EMAIL PROTECTED]> wrote:
> >> > I do need speed. Is there an option?
>
> >> Mind telling us what you *actually* want to achieve? (What do you want to
> >> calculate?)
>
The point here is that eval() use is general frowned upon. If you
don't understand it or the alternatives, then you probably don't
understand it well enough to make the call on using it or not.
If you need just look up an attribute where the name of the attribute
is in a variable, use getat
That smells bad the same was the eval() usage in the thread "Hard to
understand 'eval'". This is only one pythoners opinion, of course.
On Jun 13, 2008, at 3:29 PM, Jason Scheirer wrote:
for x in xrange(1, 26):
setattr(self, 'checkbox_%i' % x, ...)
--
http://mail.python.org/mailman/listinfo/
On Jun 14, 11:31 pm, John Salerno <[EMAIL PROTECTED]> wrote:
> Let me see if this question even makes sense...I'm reading Core Python
> Programming and I jumped ahead to the more specific topics like network
> programming. I plan to follow along with the example in that chapter and
> create a socke
On Jun 14, 11:31 pm, John Salerno <[EMAIL PROTECTED]> wrote:
> Let me see if this question even makes sense...I'm reading Core Python
> Programming and I jumped ahead to the more specific topics like network
> programming. I plan to follow along with the example in that chapter and
> create a socke
"Martin v. Löwis" <[EMAIL PROTECTED]>:
>> Just out of curiosity, what are the chances of this happening (sort of
>> like what happened with sqlite)?
>
> As a starting point, the author(s) of wxPython would need to contribute
> it to Python (and then also give the PSF the permission to relicense
>
[EMAIL PROTECTED] wrote:
> I have a physical system set up in which a body is supposed to
> accelerate and to get very close to lightspeed, while never really
> attaining it. After approx. 680 seconds, Python gets stuck and tells
> me the object has passed lightspeed. I put the same equations in
>
Hi,
I've created a method where the script defines twenty variables and
several of them should be random having a maximum and a minimum value.
What I did was this:
from random import randrange as rr, random
self.tr2_vezes = self.rr(self.d_tr2_vezes[0],self.d_tr2_vezes[-1],
1) # just an exa
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial explosion of subclasses as
more orthogonal features are added. Naturally, the decorator pattern
[1] comes to mind (not to b
> Not yet: I was kind of set back when I saw their homepage was last
> updated 2002. But I'll give it a try. You think it's the best thing
> there is?
>
> Thanks,
> Ram.
gmpy has moved to Google.
http://code.google.com/p/gmpy/
gmpy only support the basic floating point operations so it may not b
On Jun 15, 12:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Jun 15, 7:43 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>
> > [EMAIL PROTECTED] wrote:
> > > On Jun 15, 6:58 pm, Christian Meesters <[EMAIL PROTECTED]> wrote:
> > >> > I do need speed. Is there an option?
>
> > >> Mind telling
Le Sunday 15 June 2008 20:23:56 [EMAIL PROTECTED], vous avez écrit :
> Hi,
>
>
> I've created a method where the script defines twenty variables and
> several of them should be random having a maximum and a minimum value.
>
> What I did was this:
>
> from random import randrange as rr, random
>
> s
py2exe 0.6.8 released
=
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll COM servers are supported
[EMAIL PROTECTED] wrote:
> I've created a method where the script defines twenty variables and
> several of them should be random having a maximum and a minimum value.
>
> What I did was this:
>
> from random import randrange as rr, random
>
> self.tr2_vezes = self.rr(self.d_tr2_vezes[0],self.d
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|> How did you determine that standard python floats are not good enough?
| I have a physical system set up in which a body is supposed to
| accelerate and to get very close to lightspeed, while never really
|attaining it.
Just a thoug
On Sat, 14 Jun 2008 10:04:15 -0700, Rhamphoryncus wrote:
> On Jun 13, 10:41 am, Dan Stromberg <[EMAIL PROTECTED]> wrote:
>> I wrote a script(1) replacement in python
>> (http://stromberg.dnsalias.org/ ~dstromberg/pypty/), but I'm
>> encountering a problem in it.
>>
>> I think I know the solution t
On Jun 15, 10:01 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> |> How did you determine that standard python floats are not good enough?
>
> | I have a physical system set up in which a body is supposed to
> | accelerate and to get
On Jun 15, 8:52 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I have a physical system set up in which a body is supposed to
> > accelerate and to get very close to lightspeed, while never really
> > attaining it. After approx. 680 seconds, Python gets stuck and tells
>
On Jun 15, 9:31 pm, casevh <[EMAIL PROTECTED]> wrote:
> > Not yet: I was kind of set back when I saw their homepage was last
> > updated 2002. But I'll give it a try. You think it's the best thing
> > there is?
>
> > Thanks,
> > Ram.
>
> gmpy has moved to Google.
>
> http://code.google.com/p/gmpy/
On Jun 15, 9:41 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Jun 15, 12:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Jun 15, 7:43 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>
> > > [EMAIL PROTECTED] wrote:
> > > > On Jun 15, 6:58 pm, Christian Meesters <[EMAIL PROTECTED]>
"Bart Kastermans" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I wrote a binary search tree in python, explaining as I was doing it
| how and why I did it. I am very interested in receiving comments on
| the code, process, and anything else that will improve my coding or
| writin
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi,
|
|
| I've created a method where the script defines twenty variables and
| several of them should be random having a maximum and a minimum value.
|
| What I did was this:
|
| from random import randrange as rr, random
|
| self.tr2
George Sakkis schrieb:
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial explosion of subclasses as
more orthogonal features are added. Naturally, the decorator pattern
[1
Greetings,
We're pleased to announce:
OpenOpt 0.18 (release), free (license: BSD) optimization framework
(written in Python language) with connections to lots of solvers (some
are C- or Fortran-written) is available for download.
Changes since previous release 0.17 (March 15, 2008):
* connec
[EMAIL PROTECTED] wrote:
> I have a physical system set up in which a body is supposed to
> accelerate and to get very close to lightspeed, while never really
> attaining it. After approx. 680 seconds, Python gets stuck and tells
> me the object has passed lightspeed. I put the same equations in
>
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I have a situation where one class can be customized with several
| orthogonal options. Currently this is implemented with (multiple)
| inheritance but this leads to combinatorial explosion of subclasses as
| more orthog
On Jun 15, 1:06 pm, Dan Stromberg <[EMAIL PROTECTED]> wrote:
> On Sat, 14 Jun 2008 10:04:15 -0700, Rhamphoryncus wrote:
> > On Jun 13, 10:41 am, Dan Stromberg <[EMAIL PROTECTED]> wrote:
> >> I wrote a script(1) replacement in python
> >> (http://stromberg.dnsalias.org/~dstromberg/pypty/), but I'm
>
On 2008-06-15, John Salerno <[EMAIL PROTECTED]> wrote:
> So in the case of me trying this with a friend who lives far
> away, how would these two scripts work if we wouldn't be on
> the same connection?
It depends on the way the two networks are set up. Here's a
fairly typical setup:
Mac
[EMAIL PROTECTED] schrieb:
I know there must be at least a few very solid answers to this, but,
just to hear it from the Pythonistas: Why can't there be several GUI
toolkits on the standard library?
Take my first post, add martin's maintenance + licensing-issues, and
multiply the arguments by
On Jun 15, 11:30 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I have a physical system set up in which a body is supposed to
> > accelerate and to get very close to lightspeed, while never really
> > attaining it. After approx. 680 seconds, Python gets stuck and te
On 15 Jun, 21:05, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | Hi,
> |
> |
> | I've created a method where the script defines twenty variables and
> | several of them should be random having a maximum and a minimum value.
> |
> | Wha
On Jun 16, 7:05 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 15 Jun 2008 17:45:12 +0800, TheSaint <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > is it an ifelifelif probing only the first matching case and drop
> > the
> > remaining checks?
>
>
[EMAIL PROTECTED] writes:
> On Jun 15, 9:37 am, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > The Zen of Python, by Tim Peters
> > …
> > There should be one-- and preferably only one --obvious way to do it.
>
> I agree with that concept. But there already is more than one way to
> do it, only that
On Jun 16, 1:08 am, [EMAIL PROTECTED] wrote:
> On Jun 15, 3:16 am, John Machin <[EMAIL PROTECTED]> wrote:
>
> > But that change went into the svn trunk on 11-May-2008; perhaps the OP
> > is using a production release which would have the previous version,
> > which is merely "newsize = size + 1024;
Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
> On Mon, 16 Jun 2008 01:37:47 +0900, js <[EMAIL PROTECTED]> wrote:
> >By "package", I meant APT, Ports for BSD, MacPorts, etc.
>
> I don't know about ports or macport, but Debian has recently
> switched to a different policy for python packages whi
On Jun 15, 2:29 pm, [EMAIL PROTECTED] wrote:
> I wrote a Python program (103 lines, below) to download developer data
> from SourceForge for research about social networks.
>
> Please critique the code and let me know how to improve it.
>
> An example use of the program:
>
> prompt> python download
On Mon, 02 Jun 2008 17:49:11 -0700, Scott David Daniels
<[EMAIL PROTECTED]> wrote:
>(c, "NULL") is a tuple; it is being indexed by the boolean "c == ''"
>Since False is 0, and True is 1, the expression picks out "NULL"
>exactly when c is the zero-length string.
Thanks Scott, and also to Peter abo
On Mon, 16 Jun 2008 08:39:52 +1000, Ben Finney <[EMAIL PROTECTED]> wrote:
Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
On Mon, 16 Jun 2008 01:37:47 +0900, js <[EMAIL PROTECTED]> wrote:
>By "package", I meant APT, Ports for BSD, MacPorts, etc.
I don't know about ports or macport, but Debian
Hi everyone,
I'm studying python via the excellent "how to think like a python
programmer" book by Allen Downey. Noob question follows...
I have a txt file (animals.txt) which contains the following text each
on a separate line: aardvark, bat, cat, dog, elephant, fish, giraffe,
horse, inchworm,
On 01:15, lunedì 16 giugno 2008 Calvin Spealman wrote:
> such as getattr(obj,
> methname)(a, b, c). Does this make sense?
This is big enlightenment :) Thank you! :)
I found problem with eval() when it comes to pass quoted strings.
I circumvent that by encapsulating the strings in variable or tup
Hi,
I'm studying python via the exellent book "How to think like a python
programmer" by Allen Downey.
Noob question follows...
animals.txt is a list of animals, each on a separate line: "aardvard,
bat, cat, dog, elephant, fish, giraffe, horse, insect, jackelope"
I want to loop through the list
In article
<[EMAIL PROTECTED]>,
takayuki <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm studying python via the exellent book "How to think like a python
> programmer" by Allen Downey.
>
> Noob question follows...
>
> animals.txt is a list of animals, each on a separate line: "aardvard,
> bat, cat,
Dennis,
thanks for your reply. unfortunately i accidentally posted only half
of my question! the "real" post should be up now.
my apologies.
takayuki
On Jun 16, 10:15 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 15 Jun 2008 17:18:54 -0700 (PDT), takayuki
> <[EMAIL PROTECTED]> d
Jean-Paul Calderone <[EMAIL PROTECTED]> writes:
> >What has changed is that the tools in common use for Debian
> >packaging of Python libraries have taken on the role of generating
> >those per-version copies at install time.
>
> [EMAIL PROTECTED]:~$ ls -l /usr/lib/python2.{4,5}/site-packages/sql
On 05:05, 16-6- 2008 Dennis Lee Bieber wrote:
>> # any number of digit followed by 0 or 1 (k or m), case insensitive
>
> I don't do regular expressions... and the comment doesn't help
> "digit followed by 0 or 1", when 0/1 ARE digits themselves...
That means either none or one letter, of whi
On 09:23, lunedì 16 giugno 2008 takayuki wrote:
> word = line.strip()
Try
word= line.split()
and at the end of the loop add one more print to go to new line.
--
Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html
--
http://mail.python.org/mailman/listinfo/python-list
Grant,
On Jun 14, 3:43 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote:
>
> >> I've never used any of the designers, but I agree 100% that
> >> wxPython code is nasty ugly. wxPython has a very un-Pythonic
> >> API that's is, IMO, difficult to
Before I try this and destroy my computer :) I just wanted to see if
this would even work at all. Is it possible to read a binary file such
as an mp3 or an avi, put its contents into a new file, then read another
such file and append its contents to this same new file as well, thereby
making, f
Dennis Lee Bieber wrote:
The network protocols form a layered stack. The bottom of the stack
is the physical connection: coax (now rare), twisted-pair (cat-5/cat-6
cable with rectangular plugs on the end), fiber optic... etc. At some
level above that is the part that translates data pack
takayuki wrote:
for letter in avoid:
if letter in word:
break
else:
print word
Take the word 'dog', for example. What the above loop is doing is
basically this:
1
takayuki wrote:
inchworm
inchworm
P.S. Why does 'inchworm' only print twice? Or is that not the full output?
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 115 matches
Mail list logo