François Pinard wrote:
> In computer
> science, I often saw old concepts resurrecting with new names, and then
> mistaken for recent inventions. New ideas are not so frequent...
>
"There are very few problems in Computer Science that cannot be solved
with an additional level of indirection."
Out of interest, are there any standard Python modules that do this:
def appendRelativeIncludePath(*relpath):
dir = os.path.abspath(os.path.join(os.path.dirname(__file__), *relpath))
if not dir in sys.path:
sys.path.append(dir)
I ask because I often find myself doing this:
# mypr
There doesnt seem to be a reliable support channel for libgmail so i
figured this group might have some people who could help.
I have the latest version(from cvs) of libgmail.py, lgconstants.py
and mkconstants.py with python version 2.3.3. gmailfs
fails with a login error. I also tried a test logi
[EMAIL PROTECTED] wrote:
> I was wondering if anyone could point me to an example. Currently i
> have a c++ program which calls and c++ dll (i created both). The dll
> uses SendMessage to pass messages back to the calling .exe, and the
> .exe process the messages in it's Windows Procedure function
Michele Simionato wrote:
> This is somewhat in between a bug report and a feature request.
> I was using the new string.Template class and I have run into a
> few issues that I traced back to the usage of the idiom
>
> '%s' % val
>
> in the 'convert' helper function in Template.substitute.
>
> I do
[Tim Peters, on the problem at
http://spoj.sphere.pl/problems/SUPPER/
]
>> Oh, it's not that bad . I took a stab at a Python program for
>> this, and it passed (3.44 seconds).
>> ...
>> I didn't make any effort to speed this, beyond picking a reasonable
>> algorithm, so maybe someone else can
Tim Peters wrote:
> [Bryan Olson, on the problem at
> http://spoj.sphere.pl/problems/SUPPER/
> ]
>
>>I never intended to submit this program for competition. The
>>contest ranks in speed order, and there is no way Python can
>>compete with truly-compiled languages on such low-level code.
Impacket module can helps you to construct the ip/icmp packet structure,
then you can send the packet and wait for the ECHOREPLY by using a
RAW_SOCKET.
Here's an example:
http://oss.coresecurity.com/impacket/ping.py
Cheers
> I need a simple script to run the ping command with some parameters an
Carl Friedrich Bolz wrote:
> a) building LLVM is not _that_ bad (you don't need to build the
> C-frontend, which is the really messy part)
That piece of wisdom must have passed me by last time, when I probably
heeded the scary warning from the configure script and made the mistake
of getting the C
On 9 Sep 2005 03:20:09 -0700, [EMAIL PROTECTED] wrote:
>I was wondering if anyone could point me to an example. Currently i
>have a c++ program which calls and c++ dll (i created both). The dll
>uses SendMessage to pass messages back to the calling .exe, and the
>.exe process the messages in it's
Steve -
>>I have to differentiate between:
>> (NP -x-y)
>>and:
>> (NP-x -y)
>>I'm doing this now using Combine. Does that seem right?
If your word char set is just alphanums+"-", then this will work
without doing anything unnatural with leaveWhitespace:
from pyparsing import *
thing = Word
Mike Meyer wrote:
> Depends on what you want to do with it. If you favor one of the
> package systems (fink, darwinports, emerge), you probably want to use
> that one. That way, you won't have to worry about whether or not
> another package from that system will find the one Python you
> installed
Well, the Matrix matching function now works as described above:
@Arity( MatchMatrix( MatchInteger.n, MatchInteger.n ).x )
Now I am trying to see if I can write the rules for Derviative()...
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Michael Sparks wrote:
>> Well, you did say you want help with locating problems. One problem with
>> this is it doesn't build...
>
> I found that I needed both the libgc and libgc-dev packages for my
> Kubuntu distribution - installing them fixed the include issues that
> you
"Mike P." <[EMAIL PROTECTED]> writes:
> I just got a Mac and was wondering the same thing as the original poster -
> how to move to 2.4, but I found out there was more than one version.
> So in addition to the Apple installation of 2.3, there are 4 versions of
> Python 2.4 (ActivePython, MacPytho
Hi Mark!
Mark Dufour wrote:
>>>After nine months of hard work, I am proud to introduce my baby to the
>>>world: an experimental Python-to-C++ compiler.
>>Wow, looks really cool. But why that instead of Pypy?
>
> I agree with anyone that a JIT compiler that supports the full Python
> semantics (
Hi everyone,
I have created an App that embedds the python interpreter and I am
now in the process of creating an installer. I am currently linking
python24.lib, but it is only 184k and I suspect that it imports other
dlls... I am also using numarray. Does anyone have any experiences in
packaging
Grant Edwards wrote:
> On 2005-09-10, chriss <[EMAIL PROTECTED]> wrote:
>
>>> Take a look at os.popen, os.spawn, or the popen2, and
>>> subprocess modules.
>>>
>>> That last one seems to be gaining popularity.
>>
>> The suggested modules and functions have been deprecated according to the
>> pyt
Trond Eivind Glomsrød wrote:
> I am currently writing a python interface to a C++ library. Some of the
> functions in this library take unicode strings (UTF-8, mostly) as
> arguments.
>
> However, when getting these data I run into problem on python 2.2
> (RHEL3) - while the data is all nice UCS4
Mark Dufour wrote:
> After nine months of hard work, I am proud to introduce my baby to the
> world: an experimental Python-to-C++ compiler.
Good work.
I have good news and bad news.
First the good news: ShedSkin (SS) more or less works on Windows. After
patching gc6.5 for MinGW, building it, an
Fredrik Lundh wrote:
[snip..]
>
> the algorithm is:
>
> x, y = im.size
> if x > size[0]: y = max(y * size[0] / x, 1); x = size[0]
> if y > size[1]: x = max(x * size[1] / y, 1); y = size[1]
> size = x, y
>
> that is, it shrinks the image horizontally first, and it then shrinks the
>
SMC - The State Machine Compiler v. 4.2.0
Requires: Java 1.4.1 SE (Standard Edition) or better.
Download: http://sourceforge.net/projects/smc
Home Page: http://smc.sourceforge.net
=
What's New?
Hello all,
I may well post this a a bug on Monday (after testing with Python 2.3)
- but I thought I'd post here to see if anyone has any ideas.
The basic problem is that under Python 2.4 (and windoze XP SP2)
CGIHTTPServer isn't passing the CGI environment variables to scripts it
runs.
I've chec
"Robert Kern" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In many, many fonts 'l' and '1' look close enough to be easily mistaken
> for one another
In the default font used by Outlook Express, displayed on my 1078x786
screen, the only difference I can see, using a magnifying g
"Michael Sparks" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> That said, if you do describe it that way, it'd be more accurate to
> describe
> the python binary as a compiler/runtime rather than interpreter since
> it'd
> be more accurate.
If Java calls its runtime bytecode in
Michael Sparks wrote:
> Well, you did say you want help with locating problems. One problem with
> this is it doesn't build...
I found that I needed both the libgc and libgc-dev packages for my
Kubuntu distribution - installing them fixed the include issues that
you observed - and it does appear t
On 2005-09-11, M.N.A.Smadi <[EMAIL PROTECTED]> wrote:
> I need a simple script to run the ping command with some parameters and
> be able to read the return value of the ping function. Any pointers will
> be appreciated
http://www.google.com/search?hl=en&q=python+ping
--
Grant Edwards
hi;
I need a simple script to run the ping command with some parameters and
be able to read the return value of the ping function. Any pointers will
be appreciated
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire wrote:
> Thanks for giving pyparsing a try! To see whether your input text
> consumes the whole string, add a StringEnd() element to the end of your
> BNF. Then if there is more text after the parsed text, parseString
> will throw a ParseException.
Thanks, that's exactly what I was
Hi Paul!
Paul Boddie wrote:
> Carl Friedrich Bolz wrote:
>>>. there is no reason why the pypy project can't have a .NET architecture
>>>instead of the java-like arrangement I assume it has now
>>Sorry, I can't really follow you here. In what way does PyPy have a
>>Java-like arrangement?
>
> I ima
Terry Reedy wrote:
[...]
> I am being picky because various people have claimed that Python suffers
> in popularity because it is known as an 'interpreted language'. So maybe
> advocates should be more careful than we have been to not reinforce the
> misunderstanding.
I sometimes wonder if it mig
Mark Dufour wrote:
> With this initial release, I hope to attract other people to help me
> locate remaining problems,
Well, you did say you want help with locating problems. One problem with
this is it doesn't build...
If I try and build (following your instructions), I get presented with a
w
[Tim Peters, on the problem at
http://spoj.sphere.pl/problems/SUPPER/
]
>> ...
[EMAIL PROTECTED]
> INCREDIBLE~
> 241433 2005-09-11 04:23:40 Tim Peters accepted 3.44 7096 PYTH
> BRAVO!
It's different now ;-) I added the two lines
import psyco
psyco.full()
and time dropped to 2.29, while
Carl Friedrich Bolz wrote:
>
> > . there is no reason why the pypy project can't have a .NET architecture
> > instead of the java-like arrangement I assume it has now
>
> Sorry, I can't really follow you here. In what way does PyPy have a
> Java-like arrangement?
I imagine that this remark was mad
Stefano Masini a écrit :
(snip)
> If such a "quick and dirty" section existed, I think it would also
> become a natural randevouz point for innovators.
s/randevouz/rendez-vous/ !-)
pardon-my-french-ly y'rs
--
http://mail.python.org/mailman/listinfo/python-list
I'm looking for a module that is able to create valid BibTex documents.
I'm currently using string substitution to create the content, but it
is not validated in any way.
The only BibTex creation module available in Python (that I can find)
is XdkBibTeX
(http://artis.imag.fr/Membres/Xavier.Decoret
>> After nine months of hard work, I am proud to introduce my baby to the
>> world: an experimental Python-to-C++ compiler.
>Wow, looks really cool. But why that instead of Pypy?
I agree with anyone that a JIT compiler that supports the full Python
semantics (which I thought to be the goal of Py
Kirk Job Sluder wrote:
> Ron Adam <[EMAIL PROTECTED]> writes:
>>I would think that any n digit random number not already in the data
>>base would work for an id along with a randomly generated password
>>that the student can change if they want. The service provider has
>>full access to the data
anybody?
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
adDoc's networker Phil wrote:
>>
>> experimental Python-to-C++ compiler.
>>
>> why that instead of Pypy?
>>
>
> . pypy compiles to llvm (low-level virtual machine) bytecode
> which is obviously not as fast as the native code coming from c++ compilers;
PyPy can currently compile Py
ANNOUNCING twill v0.7.2.
twill is a simple Web scripting language built on top of Python and
John J. Lee's 'mechanize'. It's designed for automated testing of Web
sites, but it should prove useful for anybody who needs to interact
with Web sites (especially those using logins and cookies) on the
Roger wrote:
> I need to calculate the thumbnail sizes PILL will produce from an image.
> In most cases I can divide and round by adding .5, but PIL seems to
> round differently on odd sized images.
>
> For example, I want to reduce an 800x816 image to have a maximum size of
> 697. (697/816) * 80
I need to calculate the thumbnail sizes PILL will produce from an image.
In most cases I can divide and round by adding .5, but PIL seems to
round differently on odd sized images.
For example, I want to reduce an 800x816 image to have a maximum size of
697. (697/816) * 800 = 683.33, so my ro
Mike P. wrote:
> Which one should I go for? What are other people using (i.e. which is the
> most popular version)? Any particular advantages/disadvantages for each
> version?
The official one.
http://python.org/2.4.1/
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass
On Fri, 9 Sep 2005 13:55:03 -0700, Trent Mick wrote:
> [Mike Meyer wrote]
>> stri ker <[EMAIL PROTECTED]> writes:
>>> Has anyone here upgraded from 2.3 to 2.4 on Tiger?
>>> If so how'd ya do it?
>>
>> You don't. You install 2.4 in parallel with 2.3. You can do pretty
>> much whatever you want wit
James wrote:
[James Stroud wrote:]
>>Also, you shouldn't use "1", I mean "l", as a variable name. It gets confusing
>>because "l", I mean "1", looks a lot like "1", I mean "l".
>
> I have seen the same warnning above significantly several times.
> Is this problem originally came from the similari
nice interface, but with 3d apps i prefer cgkit's approach, which has
vec3, vec4, mat3, mat4 and quat types with lots of useful functions for
3d graphics (like mat4.looakAt(pos, target, up) or mat3.toEulerXYZ())
there are other libs with similar types and functions:
cgkit (http://cgkit.sourceforge
Steve Holden wrote:
> Kay Schluehr wrote:
> > Mike Meyer wrote:
> >
> >
> >>Yes, but the function "sorted" is more useful than a list method
> >>"sorted" in a duck typing language.
> >
> >
> > I don't see what this has to do with "duck typing"? sorted() is simply
> > a generic function accepting d
in the regex module re:
Note: Match() is not exactly equivalent to Search() with "^". For
example:
re.search(r'^B', 'A\nB',re.M) # succeeds
re.match(r'B', 'A\nB',re.M) # fails
if without the re.M, would re.search and re.match be equivalent?
i wish to spruce up the rewritten re
Tim Peters;
INCREDIBLE~
> 241433 2005-09-11 04:23:40 Tim Peters accepted 3.44 7096 PYTH
BRAVO!
I just wonder have I grey cells enough for to understand how your
algo works... and hopefully it's not your last solved problem on
the contester.
> I'm pretty sure they're using
> slower HW than mine
> Also, you shouldn't use "1", I mean "l", as a variable name. It gets confusing
> because "l", I mean "1", looks a lot like "1", I mean "l".
I have seen the same warnning above significantly several times.
Is this problem originally came from the similarities between 'l' and
'1'
or from bad looki
Michele Simionato wrote:
from string import Template as T
T("$obj").substitute(obj=())
> TypeError: not enough arguments for format string
> So, take this as a bug report if the behavior is not intended and
> as a feature request if the current behaviour is the intended
> one ;)
I vo
Ouch. That is simple with .split
I must have got confused amongst
slice re etc. searching searching.
Thanks folks. Painless.
--
http://mail.python.org/mailman/listinfo/python-list
This is somewhat in between a bug report and a feature request.
I was using the new string.Template class and I have run into a
few issues that I traced back to the usage of the idiom
'%s' % val
in the 'convert' helper function in Template.substitute.
I do not understand why '%s' % val was used
54 matches
Mail list logo