John,
Interesting and confusing...
I tested my code on Ubuntu 8.04, Win XP and 7, and WinMob before I
called it "good". And of course your modifications work on all too.
"""
* rename get_position() to get_complete_text()
* replace new_Rword(), new_Bword(), and new_Gword() with a single
functi
Hi,
Not sure this is the best group to post, but I cannot think of any
other.
My application would contain a limited set of "cells" represented by
the instances of a Cell class:
class Cell:
...
A1=Cell(7)
A2=Cell(2*A1)
A3=Cell(3*A1+A2)
A4=Cell(A3*4)
Of course, A1 = 7, A2 = 14, A3 = 35 and A4 =
David,
Try disabling your firewall software momentarily to see if that
makes a difference. IDLE uses a local port for inter-process
communication - you may need to configure your firewall to allow
IDLE's port usage.
To test whether Python itself has been properly installed, open
up a cmd prompt,
On Sun, 03 Jan 2010 03:27:46 -0800, vsoler wrote:
> My application would contain a limited set of "cells" represented by the
> instances of a Cell class:
>
> class Cell:
> ...
>
> A1=Cell(7)
> A2=Cell(2*A1)
> A3=Cell(3*A1+A2)
> A4=Cell(A3*4)
>
> Of course, A1 = 7, A2 = 14, A3 = 35 and A4 = 140
On Jan 3, 1:28 pm, Steven D'Aprano wrote:
> On Sun, 03 Jan 2010 03:27:46 -0800, vsoler wrote:
> > My application would contain a limited set of "cells" represented by the
> > instances of a Cell class:
>
> > class Cell:
> > ...
>
> > A1=Cell(7)
> > A2=Cell(2*A1)
> > A3=Cell(3*A1+A2)
> > A4=Cell(A3
On Fri, Jan 1, 2010 at 5:08 PM, Diez B. Roggisch wrote:
> Kent Tenney schrieb:
>>
>> Howdy,
>>
>> A script running as a regular user sometimes wants
>> to run sudo commands.
>>
>> It gets the password with getpass.
>> pw = getpass.getpass()
>>
>> I've fiddled a bunch with stuff like
>> proc = subp
Hi guys,
Jus want to wish you a happy new year to u all..
1.Copy the content below and Paste
it on a Notepad.2
. Use replace all (Ctrl + H)3.
Type in ‘6’ in the ‘find what’ column
4. Type in _
(underscore) in the ‘replace with’ column
5. Click on
replace all.
66
> John Posner wrote
>
> I've posted a complete solution
>
> http://cl1p.net/jjp_dynamic_text_color/.
John
Thanks for posting your solution to Dave McCormick's query
about colorizing text
I was not familiar with the re.finditer method
for search
On Wed, 30 Dec 2009 23:20:06 -0500, Benjamin Kaplan wrote:
>>> I used to have that a lot in cases where not finding at least one
>>> valid foo is an actual fatal error.
>>
>> What's wrong with the obvious solution?
>>
>> if not any(foo for foo in foos if foo.bar):
>> raise ValueError('need at l
Why we should prefer ``if: ...'' over a ``try: ... except something:
pass'' block?
In
http://wiki.python.org/moin/PythonSpeed/PerformanceTips#InitializingDictionaryElements
it is stated that a try catch block is faster if more often no
exception occurs.
Happy new year,
Dimitris Leventeas
--
htt
One thing I'm not clear on regarding Klauss' patch. He says it's
applicable where the data is primarily non-numeric. In trying to
understand why that would be the case, I'm thinking that the increased
per-object memory overhead for reference-counting would outweigh the
space gains from the shared m
On Jan 2, 10:29 am, Roy Smith wrote:
>
> To address your question more directly, here's a couple of ways Fortran
> treated whitespace which would surprise the current crop of
> Java/PHP/Python/Ruby programmers:
>
> 1) Line numbers (i.e. the things you could GOTO to) were in column 2-7
> (column 1
On Jan 1, 4:02�pm, Dan Stromberg wrote:
> I put together a page about significant whitespace (and the lack thereof).
The real problem is your use of proportional spaced fonts.
>
> You're invited to check it out:
>
> http://stromberg.dnsalias.org/~dstromberg/significant-whitespace.html
--
http:
The International Journal of Electronics, Information and Systems
(IJEIS) publish original papers on all subjects relevant to
electronics, computer science, communication network, and information
systems. The highest priority will be given to those contributions
concerned with a discussion of the b
On 12/30/2009 11:25 PM, Roald de Vries wrote:
Actually, performance is not much if an issue for what I want to do;
it's mainly interest in 'how should I do this in general'. I'll just
leave in all the code, and if it becomes a real issue, I'll separate the
code over an interactive and a non-inter
John Nagle wrote:
> pyt...@bdurham.com wrote:
>> I'm looking for the best practice way for a multi-threaded python web
>> server application to read/write to a shared file or a SQLite database.
>>
>> What do I need to do (if anything) to make sure my writes to a regular
>> file on disk or to a SQLi
On 1/3/2010 10:27 PM, vsoler wrote:
1) what are, in your opinion, the basic elements of the Cell class?
The "user-entered formula" and "effective value". A Cell containing a
formula "abc" has a value of "abc"; a cell containing the formula "=1+5"
has a value of "6". You could use the 'proper
On Jan 3, 2:58 pm, Lie Ryan wrote:
> On 1/3/2010 10:27 PM, vsoler wrote:
>
> > 1) what are, in your opinion, the basic elements of the Cell class?
>
> The "user-entered formula" and "effective value". A Cell containing a
> formula "abc" has a value of "abc"; a cell containing the formula "=1+5"
>
On Sat, Jan 2, 2010 at 10:38 PM, n00m wrote:
> On Jan 3, 5:30 am, Steve Holden wrote:
>> Zhu Sha Zang wrote:
>> >> [stuff and nonsense from a third party]
>> > WTF?
>>
>> We do get the occasional bigot dropping in from time to time. Best to
>> ignore them 'til they go away.
>>
> And who are YOU?
On Thu, Dec 31, 2009 at 05:06:24PM EST, Steve Howell wrote:
> FYI:
>
> http://twitter.com/gvanrossum
>
> Python is a truly awesome programming language. Not only is Guido a
> genius language designer, but he is also a great project leader. What
> an accomplishment. Congratulations to everybod
vsoler wrote:
Hi,
Not sure this is the best group to post, but I cannot think of any
other.
My application would contain a limited set of "cells" represented by
the instances of a Cell class:
class Cell:
...
A1=Cell(7)
A2=Cell(2*A1)
A3=Cell(3*A1+A2)
A4=Cell(A3*4)
Of course, A1 = 7, A2 = 14,
2010/1/2 baboucarr sanneh :
> Hi guys,
>
> Jus want to wish you a happy new year to u all..
>
> 1.Copy the content below and Paste it on a Notepad.
> 2 . Use replace all (Ctrl + H)
> 3. Type in ‘6’ in the ‘find what’ column
>
> 4. Type in _ (underscore) in the ‘replace with’ column
>
> 5. Click
Dotan Cohen wrote:
> 2010/1/2 baboucarr sanneh :
>> Hi guys,
>>
>> Jus want to wish you a happy new year to u all..
>>
>> 1.Copy the content below and Paste it on a Notepad.
>> 2 . Use replace all (Ctrl + H)
>> 3. Type in ‘6’ in the ‘find what’ column
>>
>> 4. Type in _ (underscore) in the ‘repla
> What I want to know is why didn't he just write
>
> """\
> ... original long string ...
> """.replace("6", "_")
>
Uf! Why didn't I think of that?!
> But watch that snarkiness ... I'm a Windows user too!
>
That's fine, I know that fresh air has to get into the basement somehow !
--
Dotan Coh
Hello!
I have simple gui gtk app. It has worker thread that populates list
with strings and gtk window with main loop which pops strings
from this list and shows them in TreeView.
Thread runs get_data_from_pcap to populate list with strings.
Gtk app calls update_store() with gobject.timeout_add ev
Chris Jones writes:
> Interesting to note that Guido's achievements prompt much less
> response, and get much less coverage […]
The entirety of ‘comp.lang.python’ is an ongoing response to Guido van
Rossum's achievements (and all the others that make Python great). Mere
week- or month-long threa
On Sun, 3 Jan 2010 21:18:38 +0200
Dotan Cohen wrote:
> Wow, I just love Windows users. Sending this to the Python list? Paste
I was going to ask him if his mommy and daddy knew that he was playing
with the grown-ups' computer.
--
D'Arcy J.M. Cain | Democracy is three wolves
http://www
Perhaps this can be useful:
http://www.web2py.com/examples/spreadsheet
The code is in a single file with not dependencies and it does not
require web2py to run:
http://code.google.com/p/web2py/source/browse/gluon/contrib/spreadsheet.py
Here is a sample controller that shows you how to embed the
s
On Jan 1, 2:47 pm, Peng Yu wrote:
>
> In the article API Design Matters by Michi Henning
>
> Communications of the ACM
> Vol. 52 No. 5, Pages 46-56
> 10.1145/1506409.1506424http://cacm.acm.org/magazines/2009/5/24646-api-design-matters/fulltext
>
> It says "Another popular design flaw—namely, throw
On Jan 2, 3:46 pm, Steve Holden wrote:
> cassiope wrote:
> > I have a daemon on a Linux system that supports a number of Windows
> > clients. Among the functions is to send e-mails, which is
> > sufficiently complicated that I fork() a separate process which gets
> > setuid to a lesser user, and
On Jan 2, 6:40 pm, Christian Heimes wrote:
> cassiope wrote:
> > The strange thing is that even with the right user-id, I cannot seem
> > to write to the directory, getting an IOError exception. Changing the
> > directory to world-writable fixes this. I can confirm the uid and gid
> > for the sc
Joan Miller wrote:
> How to set local variables based on dictionary contents?
>>> def f(**d):
... for k, v in d.iteritems(): exec "%s = v" % k
... return locals()
...
>>> f(a=42, b="yadda")
{'a': 42, 'k': 'b', 'b': 'yadda', 'd': {'a': 42, 'b': 'yadda'}, 'v':
'yadda'}
>>> f(**{"print 'war
cassiope wrote:
> On Jan 2, 6:40 pm, Christian Heimes wrote:
>> cassiope wrote:
>>> The strange thing is that even with the right user-id, I cannot seem
>>> to write to the directory, getting an IOError exception. Changing the
>>> directory to world-writable fixes this. I can confirm the uid and
On Sun, Jan 03, 2010 at 04:19:02PM EST, Ben Finney wrote:
> Chris Jones writes:
> > Interesting to note that Guido's achievements prompt much less
> > response, and get much less coverage […]
>
> The entirety of ‘comp.lang.python’ is an ongoing response to Guido van
> Rossum's achievements (and
On Jan 2, 8:02 pm, Cameron Simpson wrote:
> On 02Jan2010 15:21, cassiope wrote:
> | [...] I want
> | to save a copy of the email in a particular directory which is
> | accessible to the Windows clients via samba.
> |
> | The strange thing is that even with the right user-id, I cannot seem
> | to
On 03Jan2010 14:20, cassiope wrote:
| On Jan 2, 8:02 pm, Cameron Simpson wrote:
| > Can you show us:
| > - the directory user and group ownership and permissions
| > - the daemon's user and group values?
|
| Directory permissions: 774
That's unusual - why the "4"? Directories with read but
Michi wrote:
On Jan 1, 2:47 pm, Peng Yu wrote:
In the article API Design Matters by Michi Henning
Communications of the ACM
Vol. 52 No. 5, Pages 46-56
10.1145/1506409.1506424http://cacm.acm.org/magazines/2009/5/24646-api-design-matters/fulltext
It says "Another popular design flaw—namely, thr
On Jan 3, 3:00 pm, Cameron Simpson wrote:
> On 03Jan2010 14:20, cassiope wrote:
> | On Jan 2, 8:02 pm, Cameron Simpson wrote:
> | > Can you show us:
> | > - the directory user and group ownership and permissions
> | > - the daemon's user and group values?
> |
> | Directory permissions: 774
>
On 03Jan2010 15:56, cassiope wrote:
| Strace confirms the uid and gid == "lesser user". Changing the
| directory
| permissions to 775 changes nothing. Clearly get EACCES error on the
| attempted
| file creation.
|
| The only other thing is that as part of the python interpreter call, I
| provid
Roy Smith wrote:
>
>2) Whitespace was not required in many places. For example, the following
>two statements (this will only make sense in a fixed-width font) are
>identical:
>
> DO 10 I = 1, 10
> DO10I=1,10
More than "not required", it was "not relevant". This led to one of the
In message <874on82oan@benfinney.id.au>, Ben Finney wrote:
> Or you could use the ready-made wheel maintained by others:
>
> tzinfo Objects
> http://docs.python.org/library/datetime.html#tzinfo-objects>
But that’s only an abstract base class, which means it doesn’t actually
implemen
In message , Steve
Holden wrote:
> Yes, but not to MySQL, please. Particularly since there is a sword of
> Damocles hanging over its head while the Oracle takeover of Sun is
> pending.
Ah, I see the FUDsters are crawling out of the woodwork here, as well. I’ve
got news for you: MySQL is an open
Lawrence D'Oliveiro wrote:
> In message , Steve
> Holden wrote:
>
>> Yes, but not to MySQL, please. Particularly since there is a sword of
>> Damocles hanging over its head while the Oracle takeover of Sun is
>> pending.
>
> Ah, I see the FUDsters are crawling out of the woodwork here, as well.
Hi,
I was googling fot quite some time and was not really succesfull.
I found one solution, which I will try soon.
It is
http://www.cs.technion.ac.il/~danken/xmlrpc-ssl.html
(found in
http://hamakor.org.il/pipermail/python-il/2008-February/29.html )
This will probably work, but it requires t
*#How to use setup.py file with py2exe:*
**
python daniesetup.py py2exe --bundle 1
*#Also the data files have to taken care off in the options* list
*#Here is a sample setup.py:*
*#*
from distutils.core import setup
import py2exe
import sys
# n
In article ,
Tim Roberts wrote:
> Roy Smith wrote:
> >
> >2) Whitespace was not required in many places. For example, the following
> >two statements (this will only make sense in a fixed-width font) are
> >identical:
> >
> > DO 10 I = 1, 10
> > DO10I=1,10
>
> More than "not req
i'm sobered up
Yes of course Guido and his lang is both superb things
--
http://mail.python.org/mailman/listinfo/python-list
Chris Jones writes:
> On Sun, Jan 03, 2010 at 04:19:02PM EST, Ben Finney wrote:
> > The entirety of ‘comp.lang.python’ is an ongoing response to Guido
> > van Rossum's achievements (and all the others that make Python
> > great). Mere week- or month-long threads are paltry by comparison.
>
> That
What Imeant by what waht
try to solve e.g. http://acm.sgu.ru/problem.php?contest=0&problem=482
99% people here are 0 in this. They know this they know that, but they
can't nothing, they simply are sitting on this group and apraised
themselves But you can nothing
--
http://mail.python.org/mailman/l
On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
> More than "not required", it was "not relevant". This led to one of the
> most infamous programming blunders in the early days of the space program,
> when one programmer accidentially typed a period instead of a comma
> resulting in the loss o
On Sun, 03 Jan 2010 13:44:29 -0800, Michi wrote:
> The quoted sentence appears in a section of the article that deals with
> efficiency. I point out in that section that bad APIs often have a price
> not just in terms of usability and defect rate, but that they are often
> inefficient as well.
T
In article ,
Steven D'Aprano wrote:
> This last one can be *very* problematic. In the early 1990s, I was
> programming using a callback API that could only return an integer. The
> standard way of indicating an error was to return -1. But what happens if
> -1 is a legitimate return value, e.g
In article ,
David Robinow wrote:
> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
> > More than "not required", it was "not relevant". This led to one of the
> > most infamous programming blunders in the early days of the space program,
> > when one programmer accidentially typed a period
On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
> In article ,
> David Robinow wrote:
>
>> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
>> > More than "not required", it was "not relevant". This led to one of the
>> > most infamous programming blunders in the early days of the space pr
Now tell me:
what ahat this mobs of yellow, africans, asiats, are doing in
Stockholm?
Do you think your govs let me in just to vist England, Norway? Never.
Its all conditionally. But the fact is. IS.
You roll our world into abyss of stupidity
--
http://mail.python.org/mailman/listinfo/python-list
I am thinking of installing a python webserver I coded in every computer at
my work. This would allow me to run specific tasks in them, like creating
backups, installing things, etc. Is there another way to run programs in
remote computers? Thanks for your opinions.
--
View this message in contex
Take a look at ssh
Sent from my iPhone 3GS.
On Jan 4, 2010, at 12:50 AM, rieh25 wrote:
I am thinking of installing a python webserver I coded in every
computer at
my work. This would allow me to run specific tasks in them, like
creating
backups, installing things, etc. Is there another w
n00m wrote:
> Ok, let me evolve a bit my thought.
> Guido is Eropean Culture.
> Now say what was invented by Japanese, by Chinese?
> Nothing.
> Barbaric cultures, they are animals inborn animals.
> Russian Sikorsky built choppers for Eisenhower.
> Look at letter "S" on them -- its his name
> What y
Thanks, I had forgotten about it. I'll investigate if there are ways to
automate using it to run programs in several computers at the same time.
Rodrick Brown wrote:
>
> Take a look at ssh
>
> Sent from my iPhone 3GS.
>
> On Jan 4, 2010, at 12:50 AM, rieh25 wrote:
>
>>
>> I am thinking of i
On Sun, Jan 03, 2010 at 10:18:18PM EST, Ben Finney wrote:
> Chris Jones writes:
[..]
> > Sorry you missed my point.
>
> I didn't, since I attempted to bring it back on topic by expunging the
> off-topic part of your message.
Er.. what's 'off-topic' about mentioning that a couple of trolls on
David Robinow wrote:
> On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
>> In article ,
>> David Robinow wrote:
>>
>>> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
More than "not required", it was "not relevant". This led to one of the
most infamous programming blunders in the
On Sun, 03 Jan 2010 22:36:44 -0500, Roy Smith wrote:
> In article ,
> Steven D'Aprano wrote:
>
>> This last one can be *very* problematic. In the early 1990s, I was
>> programming using a callback API that could only return an integer. The
>> standard way of indicating an error was to return -1
On Sun, 03 Jan 2010 23:42:44 -0500, David Robinow wrote:
> On Sun, Jan 3, 2010 at 10:42 PM, Roy Smith wrote:
>> In article ,
>> David Robinow wrote:
>>
>>> On Sun, Jan 3, 2010 at 8:09 PM, Tim Roberts wrote:
>>> > More than "not required", it was "not relevant". This led to one of
>>> > the mo
rieh25 wrote:
> Thanks, I had forgotten about it. I'll investigate if there are ways to
> automate using it to run programs in several computers at the same time.
>
>
> Rodrick Brown wrote:
>> Take a look at ssh
>>
There are. Take a look at paramiko if you want to interface with SSH
within pyth
Hello All
Happy New Year!
i have some question about python mechanize 's proxy support.
im making some web client script, and i would like to insert proxy support
function into my script.
for example ,if i have such like following some script.
how can i add proxy support into my mechanize sc
This
py> [1,2,3] + (4,5)
Traceback (most recent call last):
File "", line 1, in
TypeError: can only concatenate list (not "tuple") to list
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
66 matches
Mail list logo