On 10/15/2014 5:40 PM, ryguy7272 wrote:
ImportError: No module named 'urllib2'
I'm telling Python to import because it doesn't exist and it throws an error.
I don't get it; I just don't get it. If I'm working with R, I can import
thousands of libraries with no errors whatsoever. With
On 10/8/2014 10:28 AM, bryanjugglercryptograp...@yahoo.com.dmarc.invalid
wrote:
That doesn't mean to tell a human administrator to regularly restart the
server. It's programmatic and it's a reasonably simple and well-established
design pattern.
I'd call it more a compensation technique
On 9/24/2014 12:33 PM, Milson Munakami wrote:
def tearDown(self):
if self.failed:
return
duration = time.time() - self.startTime_
self.cleanup(True)
if self.reportStatus_:
On 9/13/2014 11:44 PM, Josh English wrote:
I do not know what these three filesare doing, but suddenly they have caught in
a loop every time I try to run some code.
snip
This is where I managed to send a keybord interrupt. I was working just fine,
tweaking a line, running the code,
On 9/11/2014 12:31 PM, osemen tosin wrote:
Hi there,
I tried installing Python and I could not continue without getting this
error.
There is a problem with this installer package. A DLL required for this
install to complete could not be run. Contact your support personnel or
vendor package.
On 8/18/2014 2:09 PM, Grant Edwards wrote:
On 2014-08-18, Ethan Furman et...@stoneleaf.us wrote:
On 08/18/2014 07:51 AM, Grant Edwards wrote:
To all of us out here in user-land a change in the first value in the
version tuple means breakage and incompatibilities. And when the
second value is
On 7/31/2014 2:16 PM, Ian Kelly wrote:
On Thu, Jul 31, 2014 at 1:17 PM, Terry Reedy tjre...@udel.edu wrote:
On 7/31/2014 7:24 AM, Dilu Sasidharan wrote:
I am wondering why the dictionary in python not returning multi value
key error when i define something like
p = {'k':value0,'k':value1}
On 7/30/2014 1:47 PM, guirec.cor...@gmail.com wrote:
That's cool but not very exhaustive. Do you more sources?
I'd normally suggest reviewing the standard library after getting
comfortable with the basics -- see https://docs.python.org/2/library/
But, if you've already done that and want to
On 7/17/2014 11:15 AM, Rick Johnson wrote:
Sadly, all of my calls to improve IDLE have been meet with
rebukes about me whining. The powers that be would wise
to *UTILIZE* and *ENCOURAGE* my participation instead of
*IGNORING* valuable talent and *IMPEDING* the expansion of
this private boys
EVE online uses stackless python
(http://highscalability.com/eve-online-architecture) and has seen a max
of some 40k simultaneous users. You might want to look into how they do it.
Emile
On 7/9/2014 3:36 AM, Arulnambi Nandagoban wrote:
Hello all,
Can anyone tell me the reliability level
On 7/4/2014 7:57 AM, Mark Lawrence wrote:
On 04/07/2014 15:28, Grant Edwards wrote:
On 2014-07-03, Emile van Sebille em...@fenx.com wrote:
snip
Just watch out for mixed tabs and spaces in the same file -- a tab
counts as eight spaces and can be used interchangeably in python2.
Definitely
On 7/3/2014 2:23 PM, Tobiah wrote:
I think your suggestion of having GIT handle the transformations
is the way we'll go. nothing to quibble or worry about. Well put
spaces in the repository since it still seems to be the community's
preference and I'll convert to tabs with GIT on the fly.
On 6/26/2014 11:53 AM, Martin S wrote:
Hi,
I've been following the tutorial here
http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/
But when I get to section 1.10 there is
person = input('Enter your name:')
However this generates an error
person = input('Enter your name: ')
Enter
On 6/2/2014 3:56 PM, Mark Lawrence wrote:
On 02/06/2014 23:01, Hisham Mughal wrote:
HI! plz tell me about books for python
i am beginner of this lang..
Regards,
Hisham
Either http://www.diveintopython.net/ or http://www.diveintopython3.net/
depending on whether you're using Python 2 or 3.
On 5/20/2014 7:25 AM, Pat Fourie wrote:
Good Day all.
I am new to Python.
Welcome --
I need to maintain software written on Python 1.5.2.
I'd point you to the tutorial for a start.
See the docs at https://docs.python.org/release/1.5.2/
I will upgrade after learning more.
My question
On 4/21/2014 7:13 AM, lee wrote:
4, the python standard library by examples
I'd take this on -- it provides a comprehensive overview of what's where
in the standard library which you'll likely use a lot.
which one is suitable for me??
That we can't answer. :)
Emile
--
On 3/12/2014 5:29 AM, zoom wrote:
2. Alternatively, a unique string could be generated to assure that no
same file exists. I can see one approach to this is to include date and
time in the file name. But this seems to me a bit clumsy, and is not
unique, i.e. it could happen (at least in theory)
On 3/5/2014 1:59 AM, loial wrote:
Unfortunately I have to use python 2.6 for this
Did you try it?
Emile
--
https://mail.python.org/mailman/listinfo/python-list
On 2/24/2014 12:31 AM, Karthik Reddy wrote:
I worked as a weblogic administrator and now i am changing to development and i
am very much interested in python . please suggest me what are the
things i need to learn more rather than python to get an I.T job. I came to
know about
On 2/19/2014 2:03 PM, Mircescu Andrei wrote:
If there are only pyc files, the loading time of the application is
much more than if I have pyc and py files. It is behind with 2
minutes more than if it had py files
You may get some clues by starting python as
/path/to/python/python2.7 -vv
You
On 2/16/2014 6:00 AM, F.R. wrote:
Hi all,
Struggling to parse bank statements unavailable in sensible
data-transfer formats, I use pdftotext, which solves part of the
problem. The other day I encountered a strange thing, when one single
figure out of many erroneously converted into letters.
On 2/13/2014 11:59 AM, Zachary Ware wrote:
In a fit of curiosity, I did some timings:
Snip of lots of TMTOWTDT/TIMTOWTDI/whatever... timed examples :)
But I didn't see this one:
s[::len(s)-1]
Emile
--
https://mail.python.org/mailman/listinfo/python-list
On 2/13/2014 1:10 PM, Chris Angelico wrote:
On Fri, Feb 14, 2014 at 8:06 AM, Peter Otten __pete...@web.de wrote:
For the record:
s = x
s[::len(s)-1]
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: slice step cannot be zero
And that, my friends, is a classic
On 1/23/2014 1:15 PM, indar kumar wrote:
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
Hi,
I want to show a code for review but afraid of plagiarism issues. Kindly,
suggest how can I post it for review here without masking it visible for public
On 1/23/2014 1:34 PM, indar kumar wrote:
On Saturday, January 18, 2014 3:21:42 PM UTC-7, indar kumar wrote:
Hi,
I want to show a code for review but afraid of plagiarism issues. Kindly,
suggest how can I post it for review here without masking it visible for public
Just the value
On 1/20/2014 11:34 AM, Matt Watson wrote:
My question to you guys is... for someone like me, what route would you take to
learning Python?
I'd work my way through the tutorial [1] then pick a work based project
and start right in. Ask questions along the way.
Emile
[1]
On 01/18/2014 10:30 AM, Roy Smith wrote:
Pardon me for being cynical, but in the entire history of the universe,
has anybody ever used input()/raw_input() for anything other than a
homework problem?
Yes - routinely.
Emile
--
https://mail.python.org/mailman/listinfo/python-list
On 01/11/2014 09:14 PM, ngangsia akumbo wrote:
From all indication it is a very huge project.
Yep -- I built such a system in the late 70's with a team of seven over
two-three years. Then modifications and improvements continued over the
next 20 years keeping about 2-4 programmers busy
On 01/12/2014 06:37 AM, ngangsia akumbo wrote:
where can i find example source code by topic?
I'd recommend http://effbot.org/librarybook/ even though it's v2
specific and somewhat dated.
Emile
--
https://mail.python.org/mailman/listinfo/python-list
On 01/12/2014 07:36 AM, Paulo da Silva wrote:
Hi!
I am using a python3 script to produce a bash script from lots of
filenames got using os.walk.
I have a template string for each bash command in which I replace a
special string with the filename and then write the command to the bash
script
On 1/8/2014 12:47 PM, Terry Reedy wrote:
For a Python editor, as opposed to a general code editor, the Idle
editor works pretty well and has some advantages with respect to
integration with the interpreter.
While true, ISTM in the past there have been 'leakage' related issues
with idle --
On 1/8/2014 3:46 PM, Terry Reedy wrote:
On 1/8/2014 3:56 PM, Emile van Sebille wrote:
On 1/8/2014 12:47 PM, Terry Reedy wrote:
For a Python editor, as opposed to a general code editor, the Idle
editor works pretty well and has some advantages with respect to
integration with the interpreter
Why not contribute to the planned Stackless 2.8? As I understand their
direction, they'll be backporting certain v3.x features and will be
prepping both SLP and nonSLP versions.
Emile
On 01/06/2014 04:45 AM, Martijn Faassen wrote:
Fellow Pythoneers,
I've started an informal channel
On 01/05/2014 02:32 PM, Serhiy Storchaka wrote:
I wonder why nobody complains about the absent of implicit conversion
between int and str. In PHP you can write 2 + 3 and got 5, but in
Python this is an error. So sad!
I'd want my implicit conversion of 2 + '3' to get '23'
That's why it's not
Anatoli Hristov wrote:
I understand, but in my case I have for sure the field Name in the
second file that contains at least the first or the last name on it...
So probably it should be possible:)
The Name Billgatesmicrosoft contains the word Gates so logically I
might find a solution for it.
brucegoodst...@gmail.com wrote:
Using a decorator works when named arguments are not used. When named arguments
are used, unexpected keyword error is reported. Is there a simple fix?
Extend def wrapper(*args) to handle *kwargs as well
Emile
Code:
-
from functools import wraps
def
On 10/23/2012 4:35 PM, emile wrote:
So, let's see, at that point in time (building backward) you've got
probably somewhere close to 400-500Gb in memory.
My guess -- probably not so fast. Thrashing is sure to be a factor on
all but machines I'll never have a chance to work on.
I went
On 10/21/2012 9:19 PM, Ian Foote wrote:
On 22/10/12 09:03, Emile van Sebille wrote:
So, as OP's a self confessed newbie asking about slicing, why provide an
example requiring knowledge of tee, enumerate, next and izip?
Because not only the newbie will read the thread? I for one
On 10/21/2012 11:33 AM, Vincent Davis wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not :-)
In the end I am going to what to
On 10/21/2012 11:51 AM, Ian Kelly wrote:
On Sun, Oct 21, 2012 at 12:33 PM, Vincent Davis
vinc...@vincentdavis.net wrote:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without
On 10/21/2012 12:06 PM, Ian Kelly wrote:
On Sun, Oct 21, 2012 at 12:58 PM, Vincent Davis
vinc...@vincentdavis.net wrote:
x = 'apple'
for f in range(len(x)-1):
print(x[f:f+2])
@Ian,
Thanks for that I was just looking in to that. I wonder which is faster I
have a large set of strings to
On 10/19/2012 10:08 AM, Pradipto Banerjee wrote:
Hi,
I am trying to read a file into memory. The size of the file is around 1
GB. I have a 3GB memory PC and the Windows Task Manager shows 2.3 GB
available physical memory when I was trying to read the file. I tried to
read the file as follows:
Debashish Saha wrote:
how to insert random error in a programming?
Make the changes late in the day then leave for the weekend?
Emile
--
http://mail.python.org/mailman/listinfo/python-list
someone wrote:
How to initialize my array directly using variables ?
It could also be that I wanted:
test11 = 1
test12 = 1.5
test13 = 2
test21 = 0
test22 = 5
Dx = numpy.matrix('test11 test12 test13; test21 test22 -0.5; 0 -0.5 1.5')
Etc... for many variables...
Appreciate ANY help, thank you
On 9/27/2012 2:58 PM Rikishi42 said...
Inboxes?
What is this, usenet or email ?
Yes. Both.
Emile
--
http://mail.python.org/mailman/listinfo/python-list
On 9/26/2012 6:06 PM Wayne Werner said...
On Sun, 23 Sep 2012, Dwight Hutto wrote:
snip
We're the borg.
Oh, so you *are* a robot. That does explain your posts ;)
Damn. Now I'll forever more hear Stephen Hawkin's voice as I read the
repeated contexts. Maybe that'll help.
EMile
--
On 9/21/2012 2:59 PM Ethan Furman said...
...if my dream job is one that
consists mostly of Python, and might allow telecommuting?
Hi Ethan,
I have an open position in my two man office I've tried to fill a couple
times without success that is predominately python and would allow for
On 9/19/2012 12:50 PM ashish said...
Hi c.l.p folks
Here is my situation
1. I have two machines. Lets call them 'local' 'remote'.
Both run ubuntu both have python installed
2. I have a python script, local.py, running on 'local' which needs to pass
arguments ( 3/4 string arguments,
On 9/13/2012 8:02 AM Ben Finney said...
Howdy all,
What material should a team of programmers read before designing a
database model and export format for sending commerce transactions to a
business accounting system?
The only standard I'm aware of is the EDI specification which I first
On 9/10/2012 7:58 AM Ramchandra Apte said...
On Monday, 10 September 2012 18:51:10 UTC+5:30, Suresh Kumar wrote:
SNIP
delete the original message.
Marking this as abusive in Google Groups - this seems like spam.
Please explain what does this have to do with Python.
Please learn to trim --
On 9/6/2012 10:59 AM tinn...@isbd.co.uk said...
I want to print a series of list elements some of which may not exist,
e.g. I have a line:-
print day, fld[1], balance, fld[2]
fld[2] doesn't always exist (fld is the result of a split) so the
print fails when it isn't set.
I know I could
On 9/4/2012 10:08 AM Sreenath k said...
Error:
Exception in thread Thread-1:
Traceback (most recent call last):
File /usr/lib/python2.7/threading.py, line 551, in __bootstrap_inner
self.run()
File
/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/monitor.py,
line
On 9/3/2012 3:01 AM Vikas Kumar Choudhary said...
Hi
I though of taking time bound input from user in python using input
command.
it waits fro infinite time , but I want to limit the time after that
user input should expire with none.
Please help.
Googling yields
On 8/24/2012 3:03 PM Terry Reedy said...
On 8/24/2012 5:56 PM, Dennis Lee Bieber wrote:
On Fri, 24 Aug 2012 19:03:51 + (UTC), Walter Hurry
walterhu...@lavabit.com declaimed the following in
gmane.comp.python.general:
Google Groups sucks. These are computer literate people here. Why don't
On 8/20/2012 9:34 PM John Nagle said...
After a thread of clueless replies,
s/clueless/unread
Emile
--
http://mail.python.org/mailman/listinfo/python-list
On 8/20/2012 6:31 AM Ganesh Reddy K said...
But, python compilation is not successfully done and showing a failure
log. Below is the capture of the same. Please see failure log shown
in the bottom of this mail.
How to solve the failure modules mentioned in the log ( bsddb185,
dl , imageop,
On 8/20/2012 10:20 AM Walter Hurry said...
On Mon, 20 Aug 2012 19:12:05 +0200, Kwpolska wrote:
snip 300+ lines of non-referred to content replicated by you both
Do you really need to compile python2.6? RHEL has packages for python,
and it's better
s/better/sometimes easier
to use
On 8/20/2012 11:37 AM Walter Hurry said...
On Mon, 20 Aug 2012 11:02:25 -0700, Emile van Sebille wrote:
On 8/20/2012 10:20 AM Walter Hurry said...
I concur, but FYI the version of Python with RHEL5 is 2.4. Still, OP
should stick with that unless there is a pressing reason.
Hence, the 2.6
On 8/20/2012 1:55 PM Walter Hurry said...
On Mon, 20 Aug 2012 12:19:23 -0700, Emile van Sebille wrote:
Package dependencies. If the OP intends to install a package that
doesn't support other than 2.6, you install 2.6.
It would be a pretty poor third party package which specified Python 2.6
On 8/17/2012 12:20 PM wdt...@comcast.net said...
Just installed python 2.7 and using with web2py.
When running python from command line to bring up web2py server, get errors
that python socket and urllib modules cannot be found, can't be loaded. This is
not a web2py issue.
So, on my system
On 8/17/2012 1:41 PM wdt...@comcast.net said...
From cmd prompt - I get this:
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more information.
import urllib
Traceback (most recent call last):
File stdin, line
On 8/17/2012 2:22 PM wdt...@comcast.net said...
Done - tail end of the python path had a missing bit...gr... thanks so much
Well it's bizarre - now it doesn't. did an import sys from within interpreter,
then did import socket. Worked the first time. Restarted and it happened
again.
On 8/16/2012 7:01 AM Gilles said...
On Sun, 12 Aug 2012 02:03:33 +0200, Gilles nos...@nospam.com wrote:
Does it mean that ASO only supports writing Python web apps as
long-running processes (CGI, FCGI, WSGI, SCGI) instead of embedded
Python à la PHP?
I need to get the big picture about the
On 8/6/2012 10:14 AM Tom P said...
On 08/06/2012 06:18 PM, Nobody wrote:
On Mon, 06 Aug 2012 17:52:31 +0200, Tom P wrote:
consider a nested loop algorithm -
for i in range(100):
for j in range(100):
do_something(i,j)
Now, suppose I don't want to use i = 0 and j = 0 as
On 8/6/2012 12:22 PM Grant Edwards said...
On 2012-08-06, Tom P werot...@freent.dd wrote:
snip
ah, that looks good - I guess it works in 2.x as well?
I don't know. Let me test that for you...
snip
Yes, it works in 2.x as well.
:)
And from the docs, all the way back to 2.3!
9.7.
On 8/6/2012 1:46 PM Mok-Kong Shen said...
If I have a string abcd then, with 8-bit encoding of each character,
there is a corresponding 32-bit binary integer. How could I best
obtain that integer and from that integer backwards again obtain the
original string? Thanks in advance.
It's easy to
On 7/29/2012 5:12 PM Rodrick Brown said...
Until the
GIL is fixed I doubt anyone will seriously look at Python as an option
for large enterprise standalone application development.
See openERP -- http://www.openerp.com/ -- they've been actively
converting SAP accounts and have recently
On 7/30/2012 3:56 PM Dan Stromberg said...
On Mon, Jul 30, 2012 at 9:26 PM, Barry Scott ba...@barrys-emacs.org
And of course you can write list comprehensions on as many lines as
it take to make the code maintainable.
Sigh, and I'm also not keen on multi-line list comprehensions,
On 7/29/2012 5:30 AM subhabangal...@gmail.com said...
On Sunday, July 29, 2012 2:57:18 PM UTC+5:30, (unknown) wrote:
Dear Group,
I was trying to convert the list to a set, with the following code:
set1=set(list1)
Thanks for the answer. But my list does not contain another list that is the
On 7/26/2012 5:26 AM Laszlo Nagy said...
I have a program that creates various database objects in PostgreSQL.
There is a DOM, and for each element in the DOM, a database object is
created (schema, table, field, index and tablespace).
I do not want this program to generate very long
On 7/23/2012 7:50 AM Stone Li said...
I'm totally confused by this code:
Code:
a = None
b = None
c = None
d = None
x = [[a,b],
[c,d]]
e,f = x[1]
print e,f
This prints the first None,None
c = 1
d = 2
print e,f
And nothing has happened to e
On 7/23/2012 11:33 AM bruceg113...@gmail.com said...
I tried something similar to the example at
http://stackoverflow.com/questions/4312687/how-to-embed-images-in-email .
Problem is, this line is not understood:
mail.BodyFormat = OlBodyFormat.olFormatHTML
If I read the example
On 7/9/2012 2:22 PM Peter said...
One of my favourite questions when interviewing - and it was 100% reliable :-) -
what are your hobbies?
If the answer included programming then they were hired, if not, then they went to the
B list.
In my experience, anybody who is really interested in
On 7/7/2012 2:05 AM Maurizio Spadaccino said...
Thanks again Emile, I'll try out some examples. I found this one:
http://showmedo.com/videotutorials/video?name=2190050fromSeriesID=219
quite enlightning.
One last doubt is: say the python code gets used by more Excel Users (different
pc), can I
On 7/7/2012 5:03 AM John Pote said...
We are using a virtual web server running some version of Unix. It has
Python versions 2.4,2.6 and 3.1 pre-installed.
(BTW the intention is to use Python for a CGI script.)
When my script imports subprocess I get the traceback
File
On 7/6/2012 1:31 AM Maurizio Spadaccino said...
Could you provide me a more detailed 'how-to' tutorial on implementing a VBA
macro that calls a script or a function from python, or tell me where on the
web I can find it? The OReilly chapter seems a bit hard for me at this stage?
I'm not
On 7/5/2012 12:22 AM Maurizio Spadaccino said...
Hi all
I'm new to Python but soon after a few days of studying its features I
find it my favourite mean of programming scripts to allow for data
storing and mining. My idea would be to inplement python scripts from
inside an excel sheet that
On 6/22/2012 8:58 AM duncan smith said...
Hello,
I have an application that would benefit from collaborative working.
Over time users construct a data environment which is a number of
files in JSON format contained in a few directories
You don't say what your target platform is, but on linux
On 6/22/2012 11:19 AM duncan smith said...
On 22/06/12 17:42, Emile van Sebille wrote:
On 6/22/2012 8:58 AM duncan smith said...
Hello,
I have an application that would benefit from collaborative working.
Over time users construct a data environment which is a number of
files in JSON format
On 6/18/2012 3:16 PM Roy Smith said...
Is there any way to conditionally apply a decorator to a function?
For example, in django, I want to be able to control, via a run-time
config flag, if a view gets decorated with @login_required().
@login_required()
def my_view(request):
pass
class
Or copy a citation from Guido:
http://www.python.org/~guido/Publications.html
Emile
--
http://mail.python.org/mailman/listinfo/python-list
On 6/15/2012 5:18 AM Gonzalo de Soto said...
Dear Python Org,
It wanted to know if already PIL's version is available for Python 3.2.3.
Not yet. See http://www.pythonware.com/products/pil/
Emile
--
http://mail.python.org/mailman/listinfo/python-list
On 6/14/2012 12:27 PM Ben Temperton said...
Hi there,
I am working with mass spectroscopy data in the mzXML format that looks like
this:
mzXML
msRun
scan num=1.../scan
scan num=2.../scan
scan num=3.../scan
scan num=4.../scan
.
/msRun
index
On 6/14/2012 12:57 PM Ryan Clough said...
Hello everyone,
Is anyone familiar with a simple way to parse mbox emails in Python?
import mailbox
help(mailbox)
Help on module mailbox:
NAME
mailbox - Read/write support for Maildir, mbox, MH, Babyl, and MMDF
mailboxes.
Emile
I
use
On 6/12/2012 10:53 AM Julio Sergio said...
snip
So I modified my module:
global something
a = something(5)
def something(i):
return i
And this was the answer I got from the interpreter:
- import tst
Traceback (most recent call last):
File stdin, line 1, inmodule
On 6/8/2012 9:17 AM Daniel Urban said...
On Fri, Jun 8, 2012 at 6:10 PM, Julio Sergiojulioser...@gmail.com wrote:
From a sequence of numbers, I'm trying to get a list that does something to
even
numbers but leaves untouched the odd ones, say:
[0,1,2,3,4,...] == [100,1,102,3,104,...]
I
On 5/24/2012 2:30 PM Paul Rubin said...
Paul Rubinno.email@nospam.invalid writes:
new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list )
Sorry:
new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list))
from itertools import chain
coord_list =
On 5/23/2012 5:23 AM 水静流深 said...
s=[1,2,3]
s.append(5)
s
[1, 2, 3, 5]
s=s.append(5)
s
print s
None
why can't s=s.append(5)
It could, but it doesn't.
,what is the reason?
A design decision -- there's currently a mix of methods that return
themselves and not. Mostly is
On 5/21/2012 5:01 PM pyt...@bdurham.com said...
Wondering if any of you have stumbled across the following behavior:
snip
Any ideas on how I can retrieve timestamps and file sizes like DIR
without raising exceptions?
Beyond the obvious trap the error and use the commands module to run DIR
On 5/12/2012 5:17 AM Jean-Daniel said...
Hello,
I have a long list of n date intervals that gets added or suppressed
intervals regularly. I am looking for a fast way to find the intervals
containing a given date, without having to check all intervals (less
than O(n)).
ISTM the fastest way is
On 5/13/2012 2:25 PM admin lewis said...
Hi,
I want write a bot in python, it should explore a site, click links
and extract some info. I know mechanize but I would like to know if
there is something better for performance.
Have you looked into Scrapy? http://scrapy.org
Emile
--
On 5/11/2012 9:41 AM Ethan Furman said...
Style question:
Since __all__ (if defined) is the public API, if I am using that should
I also still use a leading underscore on my private data/functions/etc?
I would, even if only to alert any future maintainer of the internal vs
exposed nature of
On 5/5/2012 5:12 AM J. Mwebaze said...
This is out of curiosity, i know this can be done with python diffllib
module, but been figuring out how to compute the delta, Consider two
lists below.
s1 = ['e', 'f', 'g', 'A', 'B', 'C', 'D', 'C']
s2 =['e', 'A', 'B', 'f', 'g', 'C', 'D', 'z']
This is the
On 5/5/2012 4:04 AM Peng Yu said...
I agree that people have different opinions on issues like this. But I
think that The Customer Is God. Readers of the doc is the customers,
the writers of the doc is the producers. The opinion of customers
should carry more weight than producers.
Only to a
On 5/4/2012 10:46 AM Tim Chase said...
I hit a few snags testing this on my winxp w/python2.6.1 in that getsize
wasn't finding the file as it was created in two parts with .dat and
.dir extension.
Also, setting key failed as update returns None.
The changes I needed to make are marked
On 5/4/2012 12:49 PM Tim Chase said...
On 05/04/12 14:14, Emile van Sebille wrote:
On 5/4/2012 10:46 AM Tim Chase said...
I hit a few snags testing this on my winxp w/python2.6.1 in that getsize
wasn't finding the file as it was created in two parts with .dat and
.dir extension.
Hrm...must
re.split(':|;|px', width:150px;height:50px;float:right)
You could recognize that the delimiter you want to strip is in fact px;
and not px in and of itself.
So, try:
re.split(':|px;', width:150px;height:50px;float:right)
Emile
--
http://mail.python.org/mailman/listinfo/python-list
On 5/1/2012 10:13 AM Temia Eszteri said...
re.split(':|px;', width:150px;height:50px;float:right)
Emile
That won't work at all outside of the example case. It'd choke on any
attribute seperator that didn't end in px.
It would certainly choke on all delimeters that are not presented in the
On 4/27/2012 11:42 PM Debashish Saha said...
44 sph_yn_P=(l*sph_yn(l,K*R)/(K*R))-sph_yn(l,K*R)
Here you're clearly multiplying by R...
--- 45 Beta_l=l-(K_P*R(sph_jv(l+1,K_P*R))/(sph_jv(l,K_P*R)))
... and here you've got R(...) which is attempting to call R() which
isn't
On 4/23/2012 11:39 AM Chris Rebert said...
On Mon, Apr 23, 2012 at 11:29 AM, Julio Sergiojulioser...@gmail.com wrote:
I want to use the sign function. When I use it in in-line mode works pretty
well:
: sign(-20)
: -1
However, I wrote the following code in a file, say, pp.py
def
101 - 200 of 583 matches
Mail list logo