>>> import datelib
>>> datelib.datelib().dates_list()
[datetime.date(2009, 3, 10), datetime.date(2009, 4, 10), datetime.date(2009,
5, 10), datetime.date(2009, 6, 10), datetime.date(2009, 7, 10),
datetime.date(2009, 8, 10), datetime.date(2009, 9, 10), datetime.date(2009,
10, 10), datetime.date(2009,
I have another quick question. What would be the best way to implement dates
length function?
or should i just leave that up to the user using the lib?
-Alex Goretoy
--
http://mail.python.org/mailman/listinfo/python-list
Metalone wrote:
>
>static void main(int argc, char *argv[])
As a side note, do you realize that this definition is invalid, in two
ways? "main" cannot be declared "static". The whole reason we use the
special name "main" is so that the startup code in the C run-time can link
to it. If "main" i
En Tue, 09 Mar 2010 18:26:52 -0300, Andrey Fedorov
escribió:
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
thin
>
> 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(
En Tue, 09 Mar 2010 18:48:42 -0300, Shane 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.,
def goo(L):
En Tue, 09 Mar 2010 18:41:10 -0300, Daniel Klein
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 [2]
I think you m
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 library.
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 b
On Mar 7, 7:09 pm, Gregory Ewing 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
> polynomials probably is
On Mar 9, 2010, at 13:26 , Andrey Fedorov wrote:
> 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
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 y
>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
http://pythoidc.
Alex Hall 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.
--
http://mail.python.org/mailman/listinf
Daniel Klein 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 please note t
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 writte
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):
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
ba
On 02/09/10 14:00, Phlip wrote:
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 s
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 the
I just saw this thread on the Python-URL.
On Feb 14, 12:39 pm, a...@pythoncraft.com (Aahz) wrote:
> >> Sean DiZazzo =A0 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 discussiona a
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:
_tki
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
On 3/9/2010 1:36 PM Stef Mientki said...
On 09-03-2010 18:36, Robert Kern wrote:
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.
Probably, an
Daniel Klein 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 usual way to do
On Feb 27, 5:29 pm, rantingrick 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/
> http://infohost.nmt.ed
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 o
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 tel
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=gst&q=break+named+loop#5b7479fdc3362b83
Basically I'm wondering if there are any
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 fil
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 pe
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?
--
http://mail.python.o
On 2010-03-09 14:52 PM, Victor Eijkhout wrote:
Terry Reedy 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 se
En Tue, 09 Mar 2010 04:51:57 -0300, Faheem 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 can be detected using
Terry Reedy 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.
--
Victor
> 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
Thanks a lot everybody for your help, it worked now :)
On Feb 28, 4:12 am, MRAB 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 following line (
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 res
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
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,
Op 2010-03-09 18:31, C. Benson Manica schreef:
> On Mar 9, 12:24 pm, "Richard Brodie" wrote:
>> "C. Benson Manica" 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 c
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 cha
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
> 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 Mar 9, 12:24 pm, "Richard Brodie" wrote:
> "C. Benson Manica" 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 then converting them to/f
"C. Benson Manica" 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 difference at all.
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?
On Mar 9, 12:07 pm, Tim Golden 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.
Hm, well that's v
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
En Fri, 26 Feb 2010 19:10:30 -0300, 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 whether there are a
Justin Ezequiel, 09.03.2010 10:34:
On Mar 9, 11:35 am, tdan 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
On Jan 11, 2010, at 1:47 PM Nobody 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 Python's evolution?
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
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
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.
Second
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 i
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
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 availa
* 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, i
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.
--
http://mail.python.org/mailman/l
On 3/9/2010 9:48 AM, Bruno Desthuilliers wrote:
John Posner a écrit :
On 3/8/2010 11:55 PM, Gary Herron wrote:
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.
What you can do, is not make a separate
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 more
On Mar 9, 7:21 am, Steve Howell 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)
>
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 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
fo
John Posner wrote:
On 3/8/2010 11:55 PM, Gary Herron wrote:
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.
What you can do, is not make a separate binding, but reach into the
helpers module to get t
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, win32con.MOD_CON
On Mar 8, 2: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 maintaining the number of items (len):
> w = [1.5, 1.5, 8, 4, 4, 4]
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 al
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
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
On Mar 9, 8:01 pm, kishore wrote:
> On Mar 9, 2:19 pm, News123 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)
> > > a
On Mar 9, 8:01 pm, kishore wrote:
> On Mar 9, 2:19 pm, News123 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)
> > > a
On Mar 9, 2:19 pm, News123 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
>
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 usi
John Posner a écrit :
On 3/8/2010 11:55 PM, Gary Herron wrote:
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.
What you can do, is not make a separate binding, but reach into the
helpers module to ge
On 3/8/2010 11:55 PM, Gary Herron wrote:
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.
What you can do, is not make a separate binding, but reach into the
helpers module to get the value there. Like
On Mar 8, 10:39 pm, casevh wrote:
> [also replying to Geremy since the OP's message doesn't appear...]
>
> On Mar 8, 11:05 am, geremy condra wrote:
>
>
>
>
>
> > On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad wrote:
> > > Thanks Geremy,
>
> > > That has been an absolute bump... GOD i cant s
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
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 signatur
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
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
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 comprehensi
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
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, win32con.MOD_CONTROL),
11 : (99, win32con.MOD_CONTROL |
On Mar 8, 11:14 am, Duncan Booth wrote:
> Xah Lee 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 many users
> > really have such massive
On 9 March 2010 13:51, Lan Qing 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!!
You'll find some
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
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 signatur
On Mar 8, 6:39 pm, John Posner 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 maintaining
> 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 reg
KLEIN Stéphane 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 tools in Pyth
On Mar 8, 8:15 pm, BobAalsma 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 still use Python 2.5.1 (
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 li
On Tue, Mar 9, 2010 at 9:18 AM, John Posner wrote:
> On 3/8/2010 11:55 PM, Gary Herron wrote:
>
>
>
>> 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.
>>
>
>
>
>
> What you can do, is not make a
On Mar 7, 6:23 pm, vsoler 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?
Have you tried xlrea
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 kind
On Mar 9, 8:57 am, KLEIN Stéphane 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 simil
On Mar 9, 11:35 am, tdan 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
> element.
>
s
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'
> ser=serial.Ser
1 - 100 of 104 matches
Mail list logo