On 4/3/10 12:09 PM, mcanjo wrote:
I have an executable (I don't have access to the source code) that
processes some data. I double click on the icon and a Command prompt
window pops up. The program asks me for the input file, I hit enter,
and then it asks me for and output filename, I hit enter a
On Sep 11, 3:53 am, eb303 wrote:
> For the OP: the problem comes from the tcl/tk level. Running a tcl
> script just opening a window from the terminal shows the same
> behaviour. You might want to forward the question to the tcl guys.
Done:
https://sourceforge.net/mailarchive/forum.php?thread_nam
David wrote:
> transport.connect(username = username, pkey = mykey)
>
> I get a "AuthenticationException: Authentication failed." exception.
>
>
> My ~/.ssh/id_rsa is correct because if, at console, I type
>
> bags...@bagvapp:~$ sftp bags...@192.168.92.129
> Connecting to 192.168.92.129...
> sf
ryniek90 wrote:
> So maybe someone, someday decide to
> put in Python an alternative, really great implementation of scanf() ?
My idea of a "great scanf() function" would be a clever combination of
re.match(), int(), and float().
j
--
http://mail.python.org/mailman/listinfo/python-list
Aweks wrote:
> what do you use?
WingIDE has excellent Python support (it's a Python IDE, after all), and the
latest version has full support for git.
j
--
http://mail.python.org/mailman/listinfo/python-list
I couldn't find a library providing a bijective map data structure
(allowing for constant-time lookups by value) in the few minutes I
looked, so I took a few more minutes to code one up:
http://bitbucket.org/jab/toys/src/tip/bijection.py
Is this at all worth releasing? Comments and suggestions wel
On Nov 19, 7:05 pm, Steven D'Aprano wrote:
> If I want a mapping a <-> b, I generally just create a dict {a:b, b:a}.
> What is the advantages or disadvantages of your code over the simplicity
> of the dict approach?
Well for one, you don't have to manually update the mapping from b ->
a if ever t
On Nov 19, 9:17 pm, Carl Banks wrote:
> Apart from the GPL
what Ben said :)
> it seems perfectly fine to release, and looks like
> an interesting strategy. I've wanted one of those once in a while,
> never enough to bother looking for one or writing one myself.
glad to hear it! i'll release it
On Nov 20, 3:09 pm, Terry Reedy wrote:
> Joshua Bronson wrote:
> > Anyone have any other feedback? For instance, is offering the __call__
> > syntax for the inverse mapping wonderful or terrible, or maybe both?
>
> Terrible ;-)
>
> Use standard subscripting with slices,
On Nov 20, 3:09 pm, Terry Reedy wrote:
> Use standard subscripting with slices, and only that, to both get and set.
i did this for __delitem__ too, so you can do e.g. del m[:'abc'].
> In fact, to emphasize the symmetry of the bijective map, consider
> disallowing m[key] as ambiguous and require
NiklasRTZ wrote:
> If you
> know
> a good light IDE with hg, please inform. Topic handled earlier, still
> undecided
> http://groups.google.com/group/google-appengine-python/browse_thread/...
> Thanks in advance
> Niklas Rosencrantz
WingIDE support Hg, as well as svn, git, and many others.
j
--
Hey Raymond,
Thanks for your thoughtful reply! I think your idea for a class-
generation approach in the spirit of namedtuple is brilliant; looking
forward to coding this up and seeing how it feels to use it.
(By the way, it occurred to me that "bijection" is perhaps the wrong
term to use for thi
On Nov 24, 6:49 pm, Gregory Ewing wrote:
> Joshua Bronson wrote:
> > So I'm
> > thinking of renaming the class injectivedict or idict instead of
> > bijection. Is that crazy?)
>
> I think you'd be better off calling it something more
> down-to-earth
On Nov 24, 10:28 pm, Joshua Bronson wrote:
> bidict it is!
now available at http://bitbucket.org/jab/toys/src/tip/bidict.py
and now featuring new shiny namedbidict goodness!
as always, feedback welcome.
josh
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 27, 9:36 pm, "Gabriel Genellina"
wrote:
> En Fri, 27 Nov 2009 15:12:36 -0300, Francis Carr
> escribió:
>
> > I was really inspired by this discussion thread! :-)
>
> > After much tinkering, I think I have a simpler solution. Just make
> > the inverse mapping accessible via an attribute,
On Nov 27, 1:12 pm, Francis Carr wrote:
> I was really inspired by this discussion thread! :-)
>
> After much tinkering, I think I have a simpler solution. Just make
> the inverse mapping accessible via an attribute, -AND- bind the
> inverse of -THAT- mapping back to the original. The result is
On Dec 1, 2:11 pm, Raymond Hettinger wrote:
> [Joshua Bronson]
>
> > Raymond, do you think there might be any future in including a built-
> > in bidict data structure in Python?
>
> I don't think so. There are several forces working against it:
>
> * the recip
On Dec 1, 8:17 pm, a...@pythoncraft.com (Aahz) wrote:
> In article
> <85100df7-a8b0-47e9-a854-ba8a8a2f3...@r31g2000vbi.googlegroups.com>,
> Joshua Bronson wrote:
> >I noticed the phonebook example in your ActiveState recipe and thought
> >you might consider ch
On Dec 1, 9:03 pm, Chris Rebert wrote:
> Reminds me of this quite funny blog post:
> "Gay marriage: the database engineering perspective"
> http://qntm.org/?gay
amazing
--
http://mail.python.org/mailman/listinfo/python-list
script for merging AWStats Cache files.
Download: http://azariah.com/open_source.html
ABOUT THE AUTHOR
Joshua Kugler (jos...@azariah.com) is a programmer and system administator
with over 10 years of industory experience. He is currently looking for a
job. Happen to have one you
Greetings all!
So I'm reading through the manual and I get to the point where it talks
about packages and how to import them. namely section 6.4 in the
tutorial. I wont repeat the section here, but I want to understand
whats going on in the following (as typed on my computer).
Python 2.6.4
Gary Herron wrote:
Joshua Kordani wrote:
Greetings all!
So I'm reading through the manual and I get to the point where it
talks about packages and how to import them. namely section 6.4 in
the tutorial. I wont repeat the section here, but I want to
understand whats going on i
I recently implemented A* search in Python using the heapq module and
in my first pass, to accomplish the decrease-key operation I resorted
to doing a linear scan of the list to find the position of the key in
the heap, and then calling the private undocumented method
heapq._siftdown at this positi
Thanks for the responses!
On Thu, Jan 14, 2010 at 12:23 AM, Daniel Stutzbach
wrote:
> Your guess is correct. Someday I'd like to rewrite HeapDict in C for speed,
> but I haven't been able to find the time (and no one has offered to pay me to
> make the time ;) ).
Daniel, did you realize you c
On Sun, Jan 17, 2010 at 11:30 PM, Raymond Hettinger
wrote:
>
> > Raymond, do you think this technique is worth documenting in the heapq
> > module? It'd be too bad if any future users incorrectly think that it
> > won't meet their needs the way I did.
>
> Yes. Please assign a tracker issue to me
Emanuele D'Arrigo wrote:
c = "/a"
d = "/a"
c == d
> True # all good so far
c is d
> False # ek!
>
> Why c and d point to two different objects with an identical string
> content rather than the same object?
Because you instantiated two difference
dot wrote:
> has anyone experience with installing Python and pywin32 to Windows XP
> Pro running in a VMware environment?
>
> At the end of installing pywin32 I get following error:
>
>
> Traceback (most recent call last):
Akira Kitada wrote:
> The loop has to be:
> """
k = d.firstkey()
while k != None:
> ...print k
> ...k = d.nextkey(k)
> key2
> key1
> """
Why not
for key in d.keys():
print key
That worked for me.
j
--
http://mail.python.org/mailman/listinfo/python-list
Joana wrote:
> I mantain Python on Windows, all installed packages are under c:
> \Python25\Lib\site-packages. Now I have to build C libraries used by
> python extensions and I am using cygwin, but I don't know how to
> install the module in Windows directory.
I have used MingW to do this. Might
> The good thing about python is : it 'tastes' like what it was being
> advertised
+1 QOTW
--
http://mail.python.org/mailman/listinfo/python-list
Jon Harrop wrote:
No. Most programmers still care about performance and performance means
mutable state.
[ Citation needed ].
Most programmers I've met could care less about performance.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
--
Paul Moore wrote:
> The SQLite documentation mentions a flag, SQLITE_OPEN_READONLY, to
> open a database read only. I can't find any equivalent documented in
> the Python standard library documentation for the sqlite3 module (or,
> for that matter, on the pysqlite library's website).
>
> Is it pos
Roger Binns wrote:
> Joshua Kugler wrote:
>> BTW, APSW is written by the same author as pysqlite.
> Not even remotely true :-)
Sorry about that...since pysqlite and APSW are both discusses on the
pysqlite list, I had made an incorrect assumption. Oops.
j
--
http://mail.python
Joshua Kugler wrote:
> Sorry about that...since pysqlite and APSW are both discusses on the
> pysqlite list, I had made an incorrect assumption. Oops.
"are both discusses?" Yeef, I must have been out of it. Discussed, thank
you. :)
j
--
http://mail.python.org/mailman/listinfo/python-list
Dr. Phillip M. Feldman wrote:
>
> "As far as I know, there is no programming language which treats scalars
> like ints as if they were
> vectors of length 1"
>
> Actually, Matlab does:
>
>>> length(5)
> ans =
> 1
>>>
Oddly enough, so does Perl:
$ print length(44)
2
(that's in the Zoidb
On Jul 22, 7:55 am, Duncan Booth wrote:
> I find it interesting that the heapq functions tell you in the
> documentation that they aren't suitable for use where n==1 or where n is
> near the total size of the sequence whereas random.sample() chooses what it
> thinks is the best algorithm based on
According to http://docs.python.org/library/heapq.html, Python 2.5
added an optional "key" argument to heapq.nsmallest and
heapq.nlargest. I could never understand why they didn't also add a
"key" argument to the other relevant functions (heapify, heappush,
etc). Say I want to maintain a heap of (x
On Jul 31, 2:02 pm, Jonathan Gardner
wrote:
> On Jul 31, 10:44 am, Joshua Bronson wrote:
>
> > Say I want to maintain a heap of (x, y) pairs sorted only by
> > first coordinate. Without being able to pass key=itemgetter(0), won't
> > heapifying a list of such pai
Xavier Ho wrote:
> On Thu, Aug 6, 2009 at 11:51 AM, Sergey Simonenko
> wrote:
>
>> I subclass builtin 'dict' in my application and experience some problems
>> with it.
>>
>
> You should subclass collections.UserDict, and not the default dict class.
> Refer to the collections module.
Are you ref
Jonathan Fine wrote:
> Hi
>
> I'm writing a talk that compares embed and extend, and wondered if
> anyone here ever used the Python *embedded* in a database server.
> http://twistedmatrix.com/users/glyph/rant/extendit.html
>
> Web frameworks (such as Django) use extend, to import an extensi
On Aug 3, 1:36 pm, Raymond Hettinger wrote:
> [Joshua Bronson]:
>
> > According tohttp://docs.python.org/library/heapq.html, Python 2.5
> > added an optional "key" argument to heapq.nsmallest and
> > heapq.nlargest. I could never understand why they didn'
If you try something like:
$ python -m Tkinter -c 'Tkinter._test()'
in Terminal on OS X, you'll notice that the window that is spawned
does not get focus, rather focus remains in Terminal. Furthermore, if
you hit Command+Tab to switch focus to the Python process, you'll
notice that for some reaso
Hey Kevin,
Thanks for your quick reply.
On Sep 10, 10:12 am, Kevin Walzer wrote:
> On 9/10/09 1:27 AM, Joshua Bronson wrote:
> > If you try something like:
>
> > $ python -m Tkinter -c 'Tkinter._test()'
>
> > in Terminal on OS X, you'll notice that t
"Yo dawg I heard you like browsers, so we put a browser in your browser
so you can browse while you browse!" -- Xibit
On 6/6/2010 8:52 AM, Irmen de Jong wrote:
On 6-6-2010 14:32, Lie Ryan wrote:
On 06/06/10 22:09, Petite Abeille wrote:
On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote:
Y
Benjamin Kaplan wrote:
On Wed, Jun 16, 2010 at 12:21 PM, Mark Lawrence wrote:
On 16/06/2010 18:56, Alan Harris-Reid wrote:
Any idea how we get rid of this 'noise'? Will it eventually go away if
we ignore it, or is there anything the moderators can do to clean-up
this (normally) wonder
I've just tried Pyglet on my computer, a lower-end laptop at that, and going
though the Pyglet tutorials I've tried this:
import pyglet
> window = pyglet.window.Window()
> @window.event
def on_key_press(symbol, modifiers):
print 'A key was pressed'
> @window.event
def on_draw():
Jean-Michel Pichavant wrote:
Robert Kern wrote:
On 7/23/10 7:08 PM, Lawrence D'Oliveiro wrote:
In message,
Robert Kern
wrote:
There are also utilities for mounting ISOs directly without burning
them
to a physical disk.
You need special utilities to do this??
On at least some versions of
The first thing that is generically tried when wishing to measure how
long certain parts take is to record your own time snapshots in the code
yourself. take the current time before an operation, take it after,
subract, report it to yourself.
Also, try working with an array that is actually b
On Aug 25, 1:44 pm, John Passaniti wrote:
> On Aug 24, 9:05 pm, Hugh Aguilar wrote:
>
> > What about using what I learned to write programs that work?
> > Does that count for anything?
>
> It obviously counts, but it's not the only thing that matters. Where
> I'm employed, I am currently managin
On Aug 25, 4:01 pm, John Passaniti wrote:
> On Aug 25, 5:01 pm, Joshua Maurice wrote:
>
> > I agree. Sadly, with managers, especially non-technical
> > managers, it's hard to make this case when the weasel
> > guy says "See! It's working.".
&
I see. To make sure all my modules imported * are included in the
pydocs, I'll add:
__all__ = dir()
to the end of my __init__.py file.
Sometimes I implement a module with submodules, and flatten them out
in __init__.py so the user sees it all as one single module. For
example, module 'foobar' may
>>> r'\'
File "", line 1
r'\'
^
SyntaxError: EOL while scanning single-quoted string
>>> r'\\'
''
Does that seem wrong to anybody else? Shouldn't the first one be
syntactically correct?
-jag
--
http://mail.python.org/mailman/listinfo/python-list
Skip Montanaro pobox.com> writes:
> josh> Shouldn't datetime have strptime?
> If someone wants to get their feet wet with extension module
> programming
> this might be a good place to start. Mostly, I think nobody who has
> needed/wanted it so far has the round tuits available to spend on the
>
Howdy --
I have a class that has an attribute that is a dictionary that contains
an object that has a kword argument that is a lambda. Confused yet?
Simplified example:
import copy
class Foo:
def __init__(self, fn=None):
self.fn = fn
class Bar:
d = {'foobar':
So this part makes total sense to me:
>>> d = {}
>>> for x in [1,2,3]:
... d[x] = lambda y: y*x
...
>>> d[1](3)
9
Because x in the lambda definition isn't evaluated until the lambda is
executed, at which point x is 3.
Is there a way to specifically hard code into that lambda definition the
c
lambda is going to have to take arbitrary arguments, so I can't
specify x=x before the arbitrary arguments (otherwise, it gets
overridden) and I can't specify it afterward (syntax error). :-/ Thanks!
-jag
On Thu, 2005-10-06 at 16:27 -0400, Jp Calderone wrote:
> On Thu, 06 Oct 2005 16:1
I'm a bit baffled by something...
In a script I wrote, I have defined a function that runs
urllib2.urlopen() on a urllib2.Request object and returns the file-like
object. The code that calls this function attempts to build a
csv.DictReader object based on that file-like object, but an error
Anybody have an idea for how to do python mixins that don't down-call?
Thanks
(
Mixins from different vendors might use the same method names for unrelated
features, but should continue to work sensibly.
It's fine to have one mixin method override another in its "public" interface,
but overridin
I thought I would
post this here first before seeking more experienced ears for this particular
strangness.
I have Python 2.4.2
installed from source on a dual processor dell server. These are x86_64
processors (verified by /bin/arch) (aka emt64 extensions).
uname -a
gives
Linux eps-li
, January 20, 2006 4:00 PM
To: python-list@python.org
Subject: Re: Strange python behavior with modules on an emt64 box
[Joshua Luben]
> I thought I would post this here first before seeking more experienced
> ears for this particular strangness.
>
> I have Python 2.4.2 installed from
, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
and
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-247-1442 x131--
http://mail.python.o
Use *NIX magic. Make a named pipe to a python program that pushes stdin
to syslog and when you execute your program, redirect stdout to the
named pipe.
-jag
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-247-1442 x131
On Apr 8, 2005, at 10:52 AM, Neal
Try:
filter(lambda x: x.find(searchstring) != -1, lines)
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-247-1442 x131
On Apr 8, 2005, at 12:17 PM, jeremit0 wrote:
I have read a text file using the command
lines = myfile.readlines()
and now I want to seach
try:
filter(lambda x: lines[x].find(searchstring) != -1, range(len(lines)))
That will return a list with the indices of every line containing a hit
for your search string.
-jag
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-247-1442 x131
On Apr 8, 2005, a
ps_headers = fs.info().headers
https_mimetype = fs.info().type
-jag
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-247-1442 x131
On Apr 8, 2005, at 2:13 PM, Hasan D wrote:
I'm new on this httplib and urllib. Actually I dont know what should i
use.
I wa
rror
class inherits from the generic Exception class).
-jag
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-247-1442 x131
On Apr 8, 2005, at 3:29 PM, SuperJared wrote:
I'm new to Python, well versed in PHP and a bit of Perl.
I've written a simple back
It all really, really, really depends on your script processing the
form. My suggestion is to use the openssl s_client program, manually
submit your data, and see what your server is responding with.
-jag
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-24
>>> {'a':1,'b':'2','c':[3,4]}.keys()
['a', 'c', 'b']
How come? :-)
-jag
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brain
Well, I compiled a fresh version of Python 2.3.5 from python.org to
test the datetime theory... and I'm still getting 150sec execution
times. :-/ I'm gonna test the string vs. strop now...
-jag
<>Joshua Ginsberg -- [EMAIL PROTECTED]
Brainstorm Internet Network Operations
970-
Ron Garret wrote:
> My question is: is this supposed to be happening? Or is this an
> indication that something is wrong, and if so, what?
You are probably just hitting a different instance of Apache, thus the
different process ID.
j
--
http://mail.python.org/mailman/listinfo/python-list
Bob Kline wrote:
> [Didn't realize the mirror didn't work both ways]
>
> We just upgraded Python to 2.6 on some of our servers and a number of our
> CGI scripts broke because the cgi module has changed the way it handles
> POST requests.
> When the 'action' attribute was not present in the form
You also might want to look at http://wwwsearch.sourceforge.net/mechanize/
It will do most of the hard stuff for you (sending form elements, keeping
track of cookies, etc.).
j
john.weather...@gmail.com wrote:
> Hello,
>
> I'm having trouble using urllib2 (maybe) when trying to log into a web
>
Xah Lee wrote:
In many languages, they don't have namespace and is often a well known
sour point for the lang. For example, Scheme has this problem up till
R6RS last year. PHP didn't have namespace for the past decade till
about this year. Javascript, which i only have working expertise,
didn't h
Some investigation today revealed that Cookie.py thinks these are valid
characters for names and values of cookies:
_LegalCharsPatt = r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=]"
The rest, presumably being encoded via %NN.
I notice that (), {}, and others made the list, but not [].
Is the
On Dec 30 2008, 8:07 am, "andyh...@gmail.com"
wrote:
> Hi,
>
> Can anybody recommend an approach for loading and parsing Excel
> spreadsheets in Python. Any well known/recommended libraries for this?
>
> The only thing I found in a brief search
> washttp://www.lexicon.net/sjmachin/xlrd.htm,
> but
I'm brand new to USENET so please bear with me.
I'm writing a specialized to-do list app. I'm using Django but this is
not a question about Django. It has to have recurring tasks set by the
managers for the employees to then check off.
I've got pretty much everything in the app worked out, except
pepitovadecurt wrote:
> Hi I need to access to the Google Calendar under python.
> Is posible?
You mean this?
http://code.google.com/apis/calendar/developers_guide_python.html
j
--
http://mail.python.org/mailman/listinfo/python-list
Pat wrote:
>> Rewrite everything in python. Save yourself now...while you still
>> can.
>>
>> ~Sean
>
> Trust me. Sean is absolutely correct. I'm currently in the process of
> converting a large Perl project to Python (and learning Python at the
> same time) and the improvement in code is incred
bryan rasmussen wrote:
> As per the subject, anyone know of a version of fcgi.py out there
> somewhere that works on windows yet.
They might have ported a version for Python 2.6. Versions <= 2.5 didn't
have a socket.fromfd() on Windows, so FCGI and SCGI wouldn't work.
j
--
http://mail.python.o
Mike Kent wrote:
> To followup on this:
>
> Terry: Yes, I did in fact miss the 'buffer' parameter to open.
> Setting the buffer parameter to 0 did in fact fix the test code that I
> gave above, but oddly, did not fix my actual production code; it
> continues to get the data as first read, rather
Christian Heimes wrote:
> You can use MinGW32 to compile the extension, too. Or use the free
> toolchain as described at
> http://wiki.python.org/moin/Building_Python_with_the_free_MS_C_Toolkit
That page has a link to the Microsoft Visual C++ Toolkit 2003 page, which
then says it's been discontinu
walterbyrd wrote:
> Python also seems to require some sort of "long running processes" I
> guess that the python interpretor has to running all of time.
What you probably don't realize, is that in 99.9% of the situations you've
come across, PHP is already a process running all the time. It's call
Ivan Voras wrote:
> Is there a straightforward way to convert an XML-RPC server application
> (written for SimpleXMLRPCServer) to use WSGI so that it can be used as s
> fastcgi server? By "straightforward" I mean something simple, without
> using some external framework.
>
> Alternatively, I don't
Furkan Kuru wrote:
> Hello,
>
> I have been developing an application in C++ that embeds Python
> interpreter. It takes advantage of too many modules from Python.
> When I want to package this application, I need to add too many files
> (.pyc) from Python/lib folder together with Python25.dll.
> I
Hello, here is my current code:
import urllib, urllib2, cookielib
class wrapper:
def __init__(self):
self.setupCookies()
def request(self, address, postData=None, headers={ }):
if not postData == None:
postData = urllib.urlencode(postData)
req = urllib
Chris wrote:
> On Feb 13, 11:20 am, "Juha S." <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I'm trying to use the Python profilers to test my code, but I get the
>> following output for cProfile.run() at the interpreter:
>>
>> Traceback (most recent call last):
>> File "", line 1, in
>> File "/usr/
Pradnyesh Sawant wrote:
> Hello,
> I have a small program which does 'import hashlib'. This program runs fine
> with python2.5. But when I try running the same program through
> mod_python, I get the error: 'ImportError: No module named hashlib' in the
> apache2 error.log
>
> Searching online sug
James Yu wrote:
> Hi folks,
>
> I prepared a python script for dynamically get the absolute paths of the
> files in certain folder.
> Then I tried to invoke that function from my web server in a .psp file
> like this:
>
> 1
> 2
> 3 asdfasdfasdfa
> 4
> 5 <%
>
> What modules are you __import__ing, and what is platform-dependent in
> each?
The only thing we're importing __import__ are some modules of ours, with no
sytem dependent code in them at all. Some of them are even empty modules,
as was suggested by one response (for benchmarking purposes).
Turn
Ok, so we have this code:
t = timeit.Timer(stmt='r()', setup='from __main__ import r')
sys.path.insert(0,'/path/to/code')
def r():
for m in ['three','module','names']:
try:
x = __import__(m)
except ImportError, e:
if not e.message.startswith('No module
[I tried googling for this, didn't find anything relevant.]
We've recently been doing some profiling on a project of ours. It runs
quite fast on Linux but *really* bogs down on Windows 2003. We initially
thought it was the simplejson libraries (we don't use the C extensions) but
profiling proved
John Machin wrote:
> On Dec 1, 2:12 pm, Joshua Kugler <[EMAIL PROTECTED]> wrote:
>> x = __import__(m)
>
> Have you ever tried print m, x.__file__ here to check that the modules
> are being found where you expect them to be found?
No, I haven't, but I do
Shane Geiger wrote:
> Best, is naturally, a somewhat subjective evaluation. That being said,
> configparser is well regarded. I have also seen these two options that
> you might want to check out:
>
> http://wiki.woodpecker.org.cn/moin/Dict4Ini
> http://www.voidspace.org.uk/python/configobj.htm
[EMAIL PROTECTED] wrote:
> i tried a couple python json libraries. i used simplejson on the
> server and was using cjson on the client, but i ran into this issue.
> i'm now using simplejson on both sides, but i'm still interested in
> this issue. did i do something wrong? is there a bug in one of
Tangen, Erik wrote:
> Did you ever get a solution to this?
> I am also in need of this solution.
> Thanks,
> Erik
Can you clarify? What is a DOS error? You mean an error in reading or
writing a file? That would be an IOError exception. If a file is not
found, or you can't read it, that's an O
Jack Holt wrote:
> Hello there.
> I'm a PHP fan but a Python newbie. I wrote anapplication in Python
> that needs to read a cookie setup from a PHP page. Is itpossible to do it?
>
> If not, what if I create a TXT file - as well as a cookie - thatcontains
> the cookie's data? Will python be able to
Standard disclaimer: read, googled, read some more. If you have a link,
please free free to point me there.
I'm using HTTPlib to construct some functional tests for a web app we're
writing. We're not using urllib2 because we need support for PUT and
DELETE methods, which urllib2 does not do.
We
python.jiang wrote:
> hello friends, the question had show bellow, any friend can tell me why.
> thanks.
>
> list:
> def test():
> exec "import sys"
> a=range(15)
> b=[13,3]
> c=filter(lambda x: x not in b,a)
> return c
> print test()
>
> run result:
> File "a.py", line 2
> exe
Gabriel Genellina wrote:
> On 14 dic, 23:44, Joshua Kugler <[EMAIL PROTECTED]> wrote:
>
>> I'm using HTTPlib to construct some functional tests for a web app we're
>> writing. We're not using urllib2 because we need support for PUT and
>> DELETE meth
Ravi Kumar wrote:
> - your opinion with available PDF Libraries, that are best among. Also
> which library to use for Windows server platform (there is limitation
> on installing long chain libraries that include other deep
> dependencies too). A pure python PDF library would be good, but which
> o
1 - 100 of 668 matches
Mail list logo