Thanks a million, runpy is exactly what I was looking for!
I will send you a link to what I'm using it for when it's done. Then you'll
understand ;)
-- Jonas
On Tue, Oct 5, 2010 at 1:06 PM, Thomas Jollans wrote:
> On Tuesday 05 October 2010, it occurred to Jonas Galvez
Is there a way to "inject" something into a module right before it's loaded?
For instance, a.py defines "foo". b.py print()s "foo".
I want to load b.py into a.py, but I need to let b.py know about "foo"
before it can execute.
Is this any way to achieve this?
-- Jonas
--
http://mail.python.org/
Bingo, that was it. Thanks!
-- Jonas
On Sat, Sep 25, 2010 at 4:05 PM, Shashwat Anand wrote:
>
>
> On Sun, Sep 26, 2010 at 12:32 AM, Jonas Galvez wrote:
>
>> Just installed Python2.7 on my OSX Leopard with make altinstall.
>>
>> No missing dependencies, but I
Just installed Python2.7 on my OSX Leopard with make altinstall.
No missing dependencies, but I have one annoying problem: the delete key
prints '^H' on the Python shell.
Does anyone know how to fix that?
Thanks in advance,
-- Jonas
--
http://mail.python.org/mailman/listinfo/python-list
)
file_source=open("google_source.txt", 'w')
file_source.write(urllib2.urlopen(req).read())
file_source.close()
I think Google blocks the User-Agent urllib2 sends.
--Jonas Galvez, http://jonasgalvez.com.br/log
On Thu, Jul 3, 2008 at 3:52 AM, spandana g <[EMAIL PROTECTED]> wrote:
> He
as
suggested previously might be a good solution if you want to preserve
what you've generated, tho.
--Jonas Galvez
--
http://mail.python.org/mailman/listinfo/python-list
aving other child
elements. I believe my xmlbuilder will work well for Atom, XML-RPC,
SOAP etc, but definitely not for HTML! :)
Overriding + is a rather clever way to prevent this (so you can
actually know you're calling it inline), but I don't really see a need
for it for most things XML.
--Jonas Galvez, http://jonasgalvez.com.br/log
--
http://mail.python.org/mailman/listinfo/python-list
as simple as possible, so I wouldn't even have to assign a
variable on the with block ("as something"). I plan to add some
validation and error checking, but for generating feeds for my Atom
store it's reasonably fast and lean (just over 50 lines of code).
--Jonas
03"; />
urn:uuid:1225c695-cfb8-4ebb--80da344efa6a
2003-12-13T18:30:02Z
Some text.
http://github.com/galvez/gae-rest/tree/258066f5e1a32c999e04a9313943fdfa8e64edd9/xmlbuilder.py
--Jonas Galvez
--
http://mail.python.org/mailman/listinfo/python-list
n a Google App
Engine request handler.
So right now I have to apply unquote() twice in order to get the correct
result.
Any clue much appreciated.
--Jonas Galvez
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
> I first used yaml, tried to migrate to syck. What I like about
> syck is that it is faster and doesn't try to create objects but
> only dicts - but it crashed if the number of yaml objects grew
> larger. So I still use yaml.
Hmm.. I've never had any problems with syck.
Andrey Tatarinov wrote:
> It would be great to be able to reverse usage/definition parts
> in haskell-way with "where" keyword.
Hi folks, I really like this idea. But I couldn't help but think
of a few alternative ways. I'm no language design expert by any
means, but I'm a little concerned with
Christopher J. wrote:
> I tried this, but it didn't work:
> conn.request("GET", "/somepage.html", None,
> {"AUTHORIZATION": "Basic username:password"})
Hmm, try this:
import re, base64
userpass = base64.encodestring('user:pass').replace('\n', '')
authd = {'Authorization':'Basic %s' % userpass}
c
Hi list, here's a question about urllib. Is it possible to simply
retrieve the HTTP responde code for a given URL? I don't want to
download the body of the HTTP message. I simply want to check the
response code, like, if it is 200, 301 etc. Something like:
if urllib.urlopen(the_url).response_co
km wrote:
> is there a debian binary of python2.4 ?
Not yet, I guess, but I could easily compile it from the source (I'm
no Linux expert, I simply followed the instructions: ./configure,
make, make install, and voilĂ ). No error messages, no nothing. Only
downside is that /usr/bin/python still poin
15 matches
Mail list logo