It would be highly appreciated if you could share this announcement
with your colleagues, students and individuals whose research is in
software engineering, software testing, software quality assurance,
software design and related areas.
Call for papers: SETP-10, USA, July 2010
The 2010
Hello,
I'm glad to announce the release of notmm v0.3.4, the Python web
framework for jobless perfectionists with deadlines!
notmm is for those that are getting bored to ride ponies. Snake oil and
batteries are of courses included. Documentation is still being
a project of its own, though..
On Mar 7, 12:34 pm, Steve Holden st...@holdenweb.com wrote:
My own impression of theloggingmodule, formed from trying to use its
documentation in the past, is that it's somewhat unapproachable, and
difficult to use for simple purposes.
I am happy to say that now I see the current (3.1)
hello there
Iam using python 2.5.4
pyserial 2.4
pywin32-214
on windows 7
i hav a small test script written to query a serial device (arduino)
and get back reply appropriately
file: test.py
import serial
print 'hi'
ser=serial.Serial(port='\\.\COM2', baudrate=9600)
ser.close()
On Mar 6, 11:13 pm, Pete Emerson pemer...@gmail.com wrote:
1) In debug mode, send what would have gone to syslog to STDOUT or
STDERR
2) In non-debug mode, use /dev/log or localhost:514 depending on what
is set
3) Allow for multiple levels ofloggingbeyond INFO, WARNING, CRIT ...
essentially
Hi,
Today, I've show this static web site generating tools write in ruby :
* http://webgen.rubyforge.org/index.html
* http://nanoc.stoneship.org/about/
* http://webby.rubyforge.org/tutorial/
I like this tools, I'm wonder if there are similar tools in Python ?
I know Sphinx, but this tools
Hi,
kishore wrote:
hello there
Iam using python 2.5.4
pyserial 2.4
pywin32-214
on windows 7
i hav a small test script written to query a serial device (arduino)
and get back reply appropriately
file: test.py
import serial
print 'hi'
On Mar 9, 11:35 am, tdan df.tr...@gmail.com wrote:
I have been using ElementTree to write an app, and would like to
simply remove an element.
But in ElementTree, you must know both the parent and the child
element to do this.
There is no getparent() function, so I am stuck if I only have an
On Mar 9, 8:57 am, KLEIN Stéphane steph...@harobed.org wrote:
Hi,
Today, I've show this static web site generating tools write in ruby :
*http://webgen.rubyforge.org/index.html
*http://nanoc.stoneship.org/about/
*http://webby.rubyforge.org/tutorial/
I like this tools, I'm wonder if
On Mar 7, 6:23 pm, vsoler vicente.so...@gmail.com wrote:
Hello,
My code snippet reads data from excel ranges. First row and first
column are column headers and row headers respectively. After reding
the range I build a dict.
What is the best approach for this problem? Can anybody help?
Am 09.03.2010 13:02, schrieb Peter Otten:
[sum(a for a,b in zip(x,y) if b==c)/y.count(c)for c in y]
[1.5, 1.5, 8.0, 4.0, 4.0, 4.0]
Peter
... pwned.
Should be the fastest and shortest way to do it.
I tried to do something like this, but my brain hurt while trying to
visualize list
Hi All,
I am writing to you for Packt Publishing, the publishers computer related books.
We are planning to extend our catalogue of cookbooks and are currently inviting
Python fanatics interested in writing a cookbook. So, if you love Python
and are interested in writing a cookbook, please
Hi all,
I'm a newbie of python programming language. I have used c/c++ for 5
years, and one year experience in Lua programming language. Can any one give
me some advice on learning python. Think you for any help!!
best regards!!!
--
http://mail.python.org/mailman/listinfo/python-list
We've decided to build a re-usable *general purpose* PY2EXE
runtime that can be shared by a number of scripts vs.
distributing a monolithic EXE for each of our scripts.
A list of the Python 2.6.4 compatible modules/packages we decided
to include (and exclude) in our runtime follows my signature.
On Mar 8, 2010, at 6:25 AM, Kshipra Singh wrote:
I would be delighted to write a cookbook on the stuff I use every day: python
for administering cloud servers.
Thanks,
S
aka/Steve Steiner
aka/ssteinerX
Hi All,
I am writing to you for Packt Publishing, the publishers computer related
On Mar 8, 10:39 pm, casevh cas...@gmail.com wrote:
[also replying to Geremy since the OP's message doesn't appear...]
On Mar 8, 11:05 am, geremy condra debat...@gmail.com wrote:
On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad miracles...@hotmail.com wrote:
Thanks Geremy,
That has been
John Posner a écrit :
On 3/8/2010 11:55 PM, Gary Herron wrote:
snip
The form of import you are using
from helpers import mostRecent
makes a *new* binding to the value in the module that's doing the
import.
snip
What you can do, is not make a separate binding, but reach into the
helpers
On 3/8/2010 11:55 PM, Gary Herron wrote:
snip
The form of import you are using
from helpers import mostRecent
makes a *new* binding to the value in the module that's doing the
import.
snip
What you can do, is not make a separate binding, but reach into the
helpers module to get the value
mk a écrit :
Bruno Desthuilliers wrote:
Well, Zope is backed by an object database rather than a relational one.
And it ended up being a *major* PITA on all Zope projects I've worked
on...
Care to write a few sentences on nature of problems with zodb? I was
flirting with the thought of
On Mar 9, 2:19 pm, News123 news...@free.fr wrote:
Hi,
kishore wrote:
hello there
Iam using python 2.5.4
pyserial 2.4
pywin32-214
on windows 7
i hav a small test script written to query a serial device (arduino)
and get back reply appropriately
file: test.py
import
On Mar 9, 8:01 pm, kishore kishorei...@gmail.com wrote:
On Mar 9, 2:19 pm, News123 news...@free.fr wrote:
Hi,
kishore wrote:
hello there
Iam using python 2.5.4
pyserial 2.4
pywin32-214
on windows 7
i hav a small test script written to query a serial device (arduino)
On Tue, Mar 9, 2010 at 9:18 AM, John Posner jjpos...@optimum.net wrote:
On 3/8/2010 11:55 PM, Gary Herron wrote:
snip
The form of import you are using
from helpers import mostRecent
makes a *new* binding to the value in the module that's doing the
import.
snip
What you can do, is
KLEIN Stéphane steph...@harobed.org wrote:
Hi,
Today, I've show this static web site generating tools write in ruby :
* http://webgen.rubyforge.org/index.html
* http://nanoc.stoneship.org/about/
* http://webby.rubyforge.org/tutorial/
I like this tools, I'm wonder if there are similar
On Mar 9, 8:01 pm, kishore kishorei...@gmail.com wrote:
On Mar 9, 2:19 pm, News123 news...@free.fr wrote:
Hi,
kishore wrote:
hello there
Iam using python 2.5.4
pyserial 2.4
pywin32-214
on windows 7
i hav a small test script written to query a serial device (arduino)
On Mar 8, 11:14 am, Duncan Booth duncan.bo...@invalid.invalid wrote:
Xah Lee xah...@gmail.com wrote:
For example, consider, if you are within world's top 100th user of
database in terms of database size, such as Google, then it may be
that the off-the-shelf tools may be limiting. But how
Am 08.03.2010 23:34, schrieb dimitri pater - serpia:
Hi,
I have two related lists:
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
what I need is a list representing the mean value of 'a', 'b' and 'c'
while maintaining the number of items (len):
w = [1.5, 1.5, 8, 4, 4, 4]
This
We've decided to build a re-usable *general purpose* PY2EXE
runtime that can be shared by a number of scripts vs.
distributing a monolithic EXE for each of our scripts.
A list of the Python 2.6.4 compatible modules/packages we decided
to include (and exclude) in our runtime follows my signature.
Alex Hall wrote:
Now, though, when I press ctrl-shift-c (keystroke 11), nothing
happens.
Control-C sends a special signal to the console, like Control-Break.
Pressing any other keystroke after that will crash the program
with some sort of Python internal com server exception that I
have
In the source code of PythoidC ( http://pythoidc.googlecode.com ), I wrote a
Parser for C header files with Python regular expression, not only functions
but also structs macros. May be of some help.
Hey All,
I'm new in this community. I am writing a static analyzer for validating C Code
On 9 March 2010 13:51, Lan Qing efi...@gmail.com wrote:
Hi all,
I'm a newbie of python programming language.
Welcome!
I have used c/c++ for 5
years, and one year experience in Lua programming language. Can any one give
me some advice on learning python. Think you for any help!!
I'm only aware of Hyde (http://ringce.com/hyde)
There are also jekyll and cyrax:
http://github.com/mojombo/jekyll/
http://pypi.python.org/pypi/cyrax/0.1.5
I haven't tried any of them, but it looks like cyrax is in active
development and its design was inspired in both jekyll and hyde.
Best
On Mar 8, 8:15 pm, BobAalsma bob.aal...@aalsmacons.nl wrote:
I'm on Mac OS X 10.5.8 and downloaded 2.6.4 Mac Installer Disk Image
as/in(?) the sys admin user. For this user Pyhton 2.6.4 is now the
current version.
I want to use Python outside the sys asdmin user. However, all other
users
On Mar 8, 6:39 pm, John Posner jjpos...@optimum.net wrote:
On 3/8/2010 5:34 PM, dimitri pater - serpia wrote:
Hi,
I have two related lists:
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
what I need is a list representing the mean value of 'a', 'b' and 'c'
while
OK, I golfed it :D
Go ahead and kill me ;)
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
def f(a,b,v={}):
try: v[a].append(b)
except: v[a]=[b]
def g(a): return sum(v[a])/len(v[a])
return g
w = [g(i) for g,i in [(f(i,v),i) for i,v in zip(y,x)]]
print(w is now the
Michael Rudolf wrote:
OK, I golfed it :D
Go ahead and kill me ;)
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
def f(a,b,v={}):
try: v[a].append(b)
except: v[a]=[b]
def g(a): return sum(v[a])/len(v[a])
return g
w = [g(i) for g,i in [(f(i,v),i) for
Michael Rudolf wrote:
Am 09.03.2010 13:02, schrieb Peter Otten:
[sum(a for a,b in zip(x,y) if b==c)/y.count(c)for c in y]
[1.5, 1.5, 8.0, 4.0, 4.0, 4.0]
Peter
... pwned.
Should be the fastest and shortest way to do it.
It may be short, but it is not particularly efficient. A dict-based
I know ctrl-c kills a process in the shell, but these are global
hotkeys and all others work fine. You made me discover something,
though: the error only happens if ctrl-shift-c is pressed when in the
shell from where the program was run; when pressed anywhere else, the
keystroke does nothing at
On Mar 8, 2:34 pm, dimitri pater - serpia dimitri.pa...@gmail.com
wrote:
Hi,
I have two related lists:
x = [1 ,2, 8, 5, 0, 7]
y = ['a', 'a', 'b', 'c', 'c', 'c' ]
what I need is a list representing the mean value of 'a', 'b' and 'c'
while maintaining the number of items (len):
w = [1.5,
On 09/03/2010 13:55, Alex Hall wrote:
Hi all,
In the same program I wrote about yesterday, I have a dictionary of
keystrokes which are captured. I just tried adding a new one, bringing
the total to 11. Here are entries 10 and 11; 10 has been working fine
for months.
10 : (57,
John Posner wrote:
On 3/8/2010 11:55 PM, Gary Herron wrote:
snip
The form of import you are using
from helpers import mostRecent
makes a *new* binding to the value in the module that's doing the
import.
snip
What you can do, is not make a separate binding, but reach into the
helpers module
On 09/03/2010 16:34, Tim Golden wrote:
On 09/03/2010 13:55, Alex Hall wrote:
Hi all,
In the same program I wrote about yesterday, I have a dictionary of
keystrokes which are captured. I just tried adding a new one, bringing
the total to 11. Here are entries 10 and 11; 10 has been working fine
World's Cheapest Rate Hosting, 99.9% Uptime
US Based Dedicated Server, Fast Customer Service
Register Domain only at $1.99 per Year
3 Month Hosting Free with 1 year Package
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 9, 7:21 am, Steve Howell showel...@yahoo.com wrote:
def num_dups_at_head(lst):
assert len(lst) 0
val = lst[0]
i = 1
while i len(lst) and lst[i] == val:
i += 1
return i
def smooth(x, y):
result = []
while x:
cnt = num_dups_at_head(y)
Okay, I changed the keycode from 99 (c) to 107 (k), and the errors
have disappeared. However, now the function that should be called is
not. As I said in a previous message, I have always had trouble with
this sort of keystroke dictionary. It seems like, if a keycode is out
of order or not one
On 3/9/2010 9:48 AM, Bruno Desthuilliers wrote:
John Posner a écrit :
On 3/8/2010 11:55 PM, Gary Herron wrote:
snip
The form of import you are using
from helpers import mostRecent
makes a *new* binding to the value in the module that's doing the
import.
snip
What you can do, is not make a
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte per character) or UTF-8 (and two bytes per character)?
This is python 2.4.3, so I don't have getsizeof available to me.
--
* C. Benson Manica:
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte per character) or UTF-8 (and two bytes per character)?
This is python 2.4.3, so I don't have getsizeof available to me.
Generally,
On 09/03/2010 16:54, C. Benson Manica wrote:
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte per character) or UTF-8 (and two bytes per character)?
This is python 2.4.3, so I don't have getsizeof
On 09-03-2010 18:02, Alf P. Steinbach wrote:
* C. Benson Manica:
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte per character) or UTF-8 (and two bytes per character)?
This is python 2.4.3, so I don't
Hi,
Today, I've show this static web site generating tools writed in ruby :
* http://webgen.rubyforge.org/index.html
* http://nanoc.stoneship.org/about/
* http://webby.rubyforge.org/tutorial/
I like this tools, I'm wonder if there are similar tools in Python ?
I know Sphinx, but this tools
News123 wrote:
Google Adsense wrote:
What to do if anything bites.
Check our bites treatment at
http://...
Pythons don't bite
First, if you have to respond to spam please omit the URL that the
spammer is trying to bring to Google's attention as well as direct readers.
Secondly, do you
On 2010-03-09 00:14 AM, Victor Eijkhout wrote:
I can't find any detailed information about scipy.sparse.
The place to ask would be on scipy-user:
http://www.scipy.org/Mailing_Lists
My specific question: what does for x in A give me when A is a sparse
matrix? It seems to yield all nonzero
Joe Fox schrieb:
Hi,
actually i have simplified my scenario a lot here ,
In my actual case , i have to call a C-api which blocks on c select , in a
separate thread.
my thread is getting struck in that api , and thus blocking all the other
threads.
Can you point to something which
On Jan 11, 2010, at 1:47 PM Nobody nob...@nowhere.com wrote:
On Mon, 11 Jan 2010 10:09:36 +0100, Martin v. Loewis wrote:
In Python 3.1 is there any difference in the buffering behavior of
the
initial sys.stdout and sys.stderr streams?
No.
Were they different at some earlier point in
Justin Ezequiel, 09.03.2010 10:34:
On Mar 9, 11:35 am, tdandf.tr...@gmail.com wrote:
I have been using ElementTree to write an app, and would like to
simply remove an element.
But in ElementTree, you must know both the parent and the child
element to do this.
There is no getparent() function,
En Fri, 26 Feb 2010 19:10:30 -0300, pyt...@bdurham.com escribió:
Is there technique to determine if threads are active in a Python
application?
The only technique I can think of is to check sys.modules for
thread and threading. But this will only show whether these
modules were imported - not
tdan, 09.03.2010 04:35:
I have been using ElementTree to write an app, and would like to
simply remove an element.
But in ElementTree, you must know both the parent and the child
element to do this.
There is no getparent() function, so I am stuck if I only have an
element.
I am iterating over a
On Mar 9, 12:07 pm, Tim Golden m...@timgolden.me.uk wrote:
You can't. You can apply one or more heuristics, depending on exactly
what your requirement is. But any valid ASCII text is also valid
UTF8-encoded text since UTF-8 isn't two bytes per char but a variable
number of bytes per char.
On 3/9/2010 1:14 AM, Victor Eijkhout wrote:
I can't find any detailed information about scipy.sparse.
Scipy questions are best asked on the scipy list, which I suspect you
can also access via news.gmane.org.
My specific question: what does for x in A give me when A is a sparse
matrix?
C. Benson Manica cbman...@gmail.com wrote in message
news:98375575-1071-46af-8ebc-f3c817b47...@q23g2000yqd.googlegroups.com...
The strings come from the same place, i.e. they're exclusively
normal ASCII characters.
In this case then converting them to/from UTF-8 is a no-op, so
it makes no
On Mar 9, 12:24 pm, Richard Brodie r.bro...@rl.ac.uk wrote:
C. Benson Manica cbman...@gmail.com wrote in
messagenews:98375575-1071-46af-8ebc-f3c817b47...@q23g2000yqd.googlegroups.com...
The strings come from the same place, i.e. they're exclusively
normal ASCII characters.
In this case
I like this tools, I'm wonder if there are similar tools in Python ?
Blogofile is a static file blog engine/compiler, inspired by Jekyll.
http://blogofile.com/
http://github.com/EnigmaCurry/blogofile
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-03-09 11:12 AM, Stef Mientki wrote:
On 09-03-2010 18:02, Alf P. Steinbach wrote:
* C. Benson Manica:
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte per character) or UTF-8 (and two bytes per
On 3/9/2010 11:54 AM, C. Benson Manica wrote:
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte per character) or UTF-8 (and two bytes per character)?
Utf-8 is an encoding that uses 1 to 4 bytes per
Op 2010-03-09 18:31, C. Benson Manica schreef:
On Mar 9, 12:24 pm, Richard Brodie r.bro...@rl.ac.uk wrote:
C. Benson Manica cbman...@gmail.com wrote in
messagenews:98375575-1071-46af-8ebc-f3c817b47...@q23g2000yqd.googlegroups.com...
The strings come from the same place, i.e. they're
Peter Otten wrote:
Michael Rudolf wrote:
Am 09.03.2010 13:02, schrieb Peter Otten:
[sum(a for a,b in zip(x,y) if b==c)/y.count(c)for c in y]
[1.5, 1.5, 8.0, 4.0, 4.0, 4.0]
Peter
... pwned.
Should be the fastest and shortest way to do it.
It may be short, but it is not
KLEIN Stéphane, 09.03.2010 09:30:
Today, I've show this static web site generating tools writed in ruby :
* http://webgen.rubyforge.org/index.html
* http://nanoc.stoneship.org/about/
* http://webby.rubyforge.org/tutorial/
I like this tools, I'm wonder if there are similar tools in Python
Dear Colleague,
Within the ICNAAM 2010 - 8th International Conference of Numerical
Analysis and Applied Mathematics (http://www.icnaam.org), to be held
in Rhodes, Greece, on 19-25 September 2010, we are organizing the Mini-
Symposium on “Computational Bioimaging and Visualization”.
Due to your
Thanks a lot everybody for your help, it worked now :)
On Feb 28, 4:12 am, MRAB pyt...@mrabarnett.plus.com wrote:
tarek...@gmail.com wrote:
Hi,
I am currently using oauth2.py library, and it works fine on one of my
PC's (python2.5), but later on when I tried to use it with python2.4
the
I can create ASCII strings containing byte values between 127 and 255.
No, you can't - or what you create wouldn't be an ASCII string, by
definition of ASCII.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy tjre...@udel.edu wrote:
My specific question: what does for x in A give me when A is a sparse
matrix?
Try it and see what you get.
Ah, how do I see what I get? If I print it it looks plausible, but I
don't know how to pull it apart. It doesn't seem to be an array.
Victor.
--
En Tue, 09 Mar 2010 04:51:57 -0300, Faheem faheem_...@yahoo.com escribió:
I'm new in this community. I am writing a static analyzer for validating
C Code using python and for that I'm looking for a python module/API
that will detect Function block of a given C-File. I know simple
function
On 2010-03-09 14:52 PM, Victor Eijkhout wrote:
Terry Reedytjre...@udel.edu wrote:
My specific question: what does for x in A give me when A is a sparse
matrix?
Try it and see what you get.
Ah, how do I see what I get? If I print it it looks plausible, but I
don't know how to pull it
So I have `x', a instance of class `Foo'. I also have class `Bar', a class
extending `Foo' with a couple of methods. I'd like to down cast x as
efficiently as possible. Is it OK to just set `x.__class__ = Bar' and expect
things to work OK in all major versions of CPython?
--
On 09-03-2010 18:36, Robert Kern wrote:
On 2010-03-09 11:12 AM, Stef Mientki wrote:
On 09-03-2010 18:02, Alf P. Steinbach wrote:
* C. Benson Manica:
Hours of Googling has not helped me resolve a seemingly simple
question - Given a string s, how can I tell whether it's ascii (and
thus 1 byte
I'm going crazy.
Using python 2.5.2 on 64 bit Linux.
I have a class which reads CSV files using the CSV DictReader. If I
print the rows, everything works perfectly. If I insert the rows into a
MySQL table using MySQLdb, the DictReader loops back and begins
re-reading from the beginning of the
Hey,
I did a little searching and couldn't really find much recent on this.
The only thing I found was this:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/a696624c92b91181/5b7479fdc3362b83?lnk=gstq=break+named+loop#5b7479fdc3362b83
Basically I'm wondering if there are any
Hi I am a newbie for Python
Here is a question, say I have a list L,
function foo is:
def foo(L):
if L[0] 0: return True
if later I want another function goo which returns True when L[0]
and L[1] are both 0, i.e.,
def goo(L):
if L[0] 0 and L[1] 0: return True
Can anybody tell me
Has anyone ever tried to find the pixel (or point) location of text in
a PDF using Python? I've been using the pyPdf libraries for other
things, and it seems to me that if I can find the bounding box for
text, I should be able to calculate the location.
What I want to do is take a PDF of one of
On Feb 27, 5:29 pm, rantingrick rantingr...@gmail.com wrote:
Great post Kevin! The only thing i would like to add are my two
favorite references for learning Tkinter. They are not geared around
the new ttk stuff, but still 95% relevant to any Tkinter-ing
http://effbot.org/tkinterbook/
Daniel Klein bri...@gmail.com writes:
Basically I'm wondering if there are any plans to implemented named
loops in Python, so I can tell a break command to break out of a
specific loop in the case of nested loops. Currently I'm using boolean
flag variables, but I find that very clumsy.
The
On 3/9/2010 1:36 PM Stef Mientki said...
On 09-03-2010 18:36, Robert Kern wrote:
snip
No, you can't. ASCII strings only have characters in the range 0..127.
You could create Latin-1 (or any number of the 8-bit encodings out
there) strings with characters 0..255, yes, but not ASCII.
On 3/9/2010 1:48 PM Shane said...
Hi I am a newbie for Python
Here is a question, say I have a list L,
function foo is:
def foo(L):
if L[0] 0: return True
if later I want another function goo which returns True when L[0]
and L[1] are both 0, i.e.,
def goo(L):
if L[0] 0 and L[1]
The md5 module is used in build xulrunner and Firefox from source. When I do
run the install its says md5 no such module. I compiled Python 2.6.4 after
installing openssl and BerkleyDB, yet I get this error when compilying Python:
Failed to find the necessary bits to build these modules:
I just saw this thread on the Python-URL.
On Feb 14, 12:39 pm, a...@pythoncraft.com (Aahz) wrote:
Sean DiZazzo =A0half.ital...@gmail.com wrote:
Why did Path() get rejected? Is it the idea itself, or just the
approach that was used? What are the complaints?
You should search for the
I ran a comparison that timed 1e6 file seeks.
The tests were run with Python 2.6.4 and Microsoft Visual C 6.0 on
Windows XP with an Intel 3GHz single processor with hyperthreading.
Results:
C: 0.812 seconds
Python: 1.458 seconds.
difference = 0.646 seconds.
If the file.seek is removed
On 02/09/10 14:00, Phlip wrote:
cut
Ah, now we get down to the root of the problem. Because Python is so
stuck on the one best way to do it mentality, language bigotry
prevented the Committee from picking from among several equally valid
but non-best options. And after 20 years of growth, Python
Dave Angel wrote:
If you assume it's done in a single pass, and you know which byte is the
end of the buffer, I'd think you could learn a lot by just tweaking that
last byte.
I'm sure I would, but unfortunately I can't control the
last byte. The bytes that I can influence are some distance
This is a pretty tight loop:
for i in xrange(100):
f1.seek(0)
But there is still a lot going on, some of which you can lift out of
the loop. The easiest I can think of is the lookup of the 'seek'
attribute on the f1 object. Try this:
f1_seek = f1.seek
for i in xrange(100):
Hi all
I'm having some troubles with writing Knight's tour
(http://en.wikipedia.org/wiki/Knight%27s_tour) solution in Python 3. I'm
using Warnsdorff's algorithm (http://en.wikipedia.org/wiki/Knight%
27s_tour#Algorithm) and I'm wondering why it doesn't work with boards of
certain sizes. I've
Daniel Klein bri...@gmail.com wrote:
Basically I'm wondering if there are any plans to implemented named
loops in Python, so I can tell a break command to break out of a
specific loop in the case of nested loops.
You should be able to do this with the goto module: http://entrian.com/goto/
But
Alex Hall mehg...@gmail.com wrote:
Why would the sequence
matter, or does it not and I am doing something else wrong? Here is a
sample of my dictionary:
Showing us the code that handles the dictionary lookup + function
calling would probably help us a lot more here.
--
Tobiah wrote:
Now that I use python, this is the amount of time
per day that I spend adding forgotten semicolons while
debugging other languages.
What compels you to write Python code without semicolons?
Frederic
Try the C language without semicolons and braces
Hi Kishore,
Have you tried ser=serial.Serial(port='COM2', baudrate=9600) instead
of port='\\.\COM2'?
Also, I'd suggest you temporarily define some other parameters that
now you're leaving to default values. From the documentation of
pyserial:
readline(size=None, eol='\n')
You're sure that your
On Mar 7, 7:09 pm, Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
Given some known data/crc pairs, how feasible is it to
figure out the polynomial being used to generate the crc?
In the case I'm looking at, it appears that the crc
size may be at least 24 bits, so just trying all possible
El 9 mar, 22:57, Robin Rytich escribió:
I'm having some troubles with writing Knight's tour
(http://en.wikipedia.org/wiki/Knight%27s_tour) solution in Python 3. I'm
using Warnsdorff's algorithm (http://en.wikipedia.org/wiki/Knight%
27s_tour#Algorithm) and I'm wondering why it doesn't work with
Hi all,
has anyone managed to integrate pexpect and logging?
I.e., I'd like to be able to pick up the dialog,
commands sent and responses received, in my logging.
I know about the pexpect logfile, and I can log things
to stdout or stderr, but I really need to log using the
python logging
En Tue, 09 Mar 2010 18:41:10 -0300, Daniel Klein bri...@gmail.com
escribió:
Basically I'm wondering if there are any plans to implemented named
loops in Python, so I can tell a break command to break out of a
specific loop in the case of nested loops.
See PEP3136 [1] and its rejection note
En Tue, 09 Mar 2010 18:48:42 -0300, Shane sheng...@gmail.com escribió:
Hi I am a newbie for Python
Here is a question, say I have a list L,
function foo is:
def foo(L):
if L[0] 0: return True
if later I want another function goo which returns True when L[0]
and L[1] are both 0, i.e.,
DATE_TYPE = type(date.today())
def dates_diff(self, *targs):
nargs = len(targs)
if nargs == 0:
return self.enddate - self.startdate
if nargs == 1:
arg = targs[0]
if not isinstance(arg, (list, tuple)) or len(arg) != 2:
raise Exception(
1 - 100 of 196 matches
Mail list logo