ANNOUNCE: awstats_reader 0.5

2009-12-19 Thread Joshua Kugler
a 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

ANNOUNCE: awstats_reader 0.5

2009-12-19 Thread Joshua Kugler
a 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

Re: IDE+hg

2009-11-23 Thread Joshua Kugler
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 --

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-09 Thread Joshua Kugler
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

Re: sftp login without password

2009-10-06 Thread Joshua Kugler
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... sftp I get

Re: Subclassing Python's dict

2009-08-05 Thread Joshua Kugler
Xavier Ho wrote: On Thu, Aug 6, 2009 at 11:51 AM, Sergey Simonenko gfo...@lavabit.comwrote: 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

Re: Do anyone here use Python *embedded* in a database?

2009-08-05 Thread Joshua Kugler
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 extension

Re: len() should always return something

2009-07-27 Thread Joshua Kugler
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 Zoidberg shell) j

Re: Opening a SQLite database in readonly mode

2009-07-09 Thread Joshua Kugler
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

Re: Opening a SQLite database in readonly mode

2009-07-07 Thread Joshua Kugler
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.org/mailman/listinfo

Re: Opening a SQLite database in readonly mode

2009-07-06 Thread Joshua Kugler
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 possible

Re: How does Python's OOP feel?

2009-05-28 Thread Joshua Kugler
The good thing about python is : it 'tastes' like what it was being advertised +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is it that *dbm modules don't provide an iterator? (Language design question)

2009-04-09 Thread Joshua Kugler
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

[issue5522] HTTPRedirectHandler documentation is wrong

2009-03-19 Thread Joshua Kugler
New submission from Joshua Kugler jkug...@bigfoot.com: On the page lib/http-redirect-handler.html it says the signature of redirect_request is: redirect_request( req, fp, code, msg, hdrs) It is actually: redirect_request(req, fp, code, msg, hdrs, newurl) Well, technically the signature

[issue5523] Python bug tracker won't let you edit your profile

2009-03-19 Thread Joshua Kugler
New submission from Joshua Kugler jkug...@bigfoot.com: I tried to edit my e-mail address in the python bug tracker (under Your Details), but when I hit submit, it tells me: You do not have permission to edit user -- components: None messages: 83833 nosy: jkugler severity: normal

Re: VMware and pywin32 error...

2009-03-13 Thread Joshua Kugler
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):

Re: /a is not /a ?

2009-03-06 Thread Joshua Kugler
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 objects.

Re: urllib2 login help

2009-02-23 Thread Joshua Kugler
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

Re: Change in cgi module's handling of POST requests

2009-02-12 Thread Joshua Kugler
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

Re: More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Joshua Kugler
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

Disputing Cookie.py's definition of valid characters

2008-12-11 Thread Joshua Kugler
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 there a

Re: Possible read()/readline() bug?

2008-10-23 Thread Joshua Kugler
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 than

Re: fcgi.py on windows?

2008-10-20 Thread Joshua Kugler
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 --

Re: PYTHON WORKING WITH PERL ??

2008-10-16 Thread Joshua Kugler
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 incredible.

Re: Access to Google Calendar

2008-10-09 Thread Joshua Kugler
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

Re: Python - ubuntu

2008-08-29 Thread Joshua Kugler
A friend of mine told me something about Guido and google developing an Ubuntu distribution based and totaly oriented for the Python appliction development. I googled for it with no results. Is it possible that My Buddy is trying to foole me or is it possible that someone knows something

Re: SimpleJson is slow .... is there any C Compiled version ?

2008-07-28 Thread Joshua Kugler
sanket wrote: Hello All, I have created an API which fetches some data from the database. I am using simplejson to encode it and return it back. Now the problem is that, this API is being called for millions of times in a sequence. I ran a profiler and saw that most of the time is

[issue3384] Documentation for re.findall and re.finditer lacks ordering information

2008-07-19 Thread Joshua Kugler
Joshua Kugler [EMAIL PROTECTED] added the comment: That looks good. Thanks! ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3384 ___ ___ Python-bugs-list mailing

Re: Is re.findall guaranteed to be in order?

2008-07-16 Thread Joshua Kugler
Fredrik Lundh wrote: Joshua Kugler wrote: Experimenting has shown me that re.findall() will return a list with the matches in the order it found them. in the order it found them doesn't really say much, does it? ;-) findall and finditer both scans the string from left to right

Re: Framework recommendations for web service?

2008-07-16 Thread Joshua Kugler
Phillip B Oldham wrote: So, can anyone suggest a lightweight python framework which just does the essentials? web.py is pretty slim (not to be confused with web2py). Pylons isn't very large, depending on what you call essential. j -- http://mail.python.org/mailman/listinfo/python-list

[issue3384] Documentation for re.findall and re.finditer lacks ordering information

2008-07-16 Thread Joshua Kugler
New submission from Joshua Kugler [EMAIL PROTECTED]: According to a discussion on comp.lang.python, re.findall and re.finditer scan strings from left to right, and returns them in the order it found them. It would be nice to note that in documentation. -- assignee: georg.brandl

Is re.findall guaranteed to be in order?

2008-07-15 Thread Joshua Kugler
I tried looking through re.py and sre_compile.py, but I can't really see an answer to my question. Experimenting has shown me that re.findall() will return a list with the matches in the order it found them. Am I lucky so far, or does the _sre.c's logic dictate the items will be added in order

Re: Problems Returning an HTTP 200 Ok Message

2008-07-10 Thread Joshua Kugler
Guy Davidson wrote: Hi Folks, I'm having some issues with an small socket based server I'm writing, and I was hoping I could get some help. My code (attached below) us supposed to read an HTTP Post message coming from a power meter, parse it, and return a proper HTTP 200 Ok message. The

Re: Classes for processing/parsing Wiki Markup text

2008-07-01 Thread Joshua Kugler
Michael Mabin wrote: Does anyone know if there are any generally available classes for parsing various wiki markup formats? Several here: http://pypi.python.org/pypi?%3Aaction=searchterm=wikisubmit=search I'm sure you could find a good one, and add your own markup if needed. j --

Re: I Need A Placeholder

2008-06-26 Thread Joshua Kugler
Ampedesign wrote: I'm trying to build a try/except case, and I want to have the except function like such: try: # Do some code here var = 1 # For example except: #Do nothing here The only problem is if I leave a comment only in the except block, I get an

Re: Proof that \ is a better line joiner than parenthetical sets

2008-06-05 Thread Joshua Kugler
John Salerno wrote: According to the Zen of Python, explicit is better than implicit, and the section in the Reference Manual describing the \ line joiner is called Explicit line joining and the section describing parentheticals is called Implicit line joining. So there! ;) However,

Re: Pylons and memory use?

2008-06-05 Thread Joshua Kugler
John Salerno wrote: Hi everyone. I was thinking about signing up with a web host that supports Pylons (among many other things) and one of the differences between the various plans is application memory for long-running processes. The plan I'd like to sign up for has 80MB. Does anyone know if

Re: How to covert ASCII to integer in Python?

2008-05-30 Thread Joshua Kugler
Skonieczny, Chris wrote: YOU SHOULD REMOVE or CORRECT YOUR POST here: http://mail.python.org/pipermail/python-list/2007-February/427841.html It is not true - eg. try : a='P'# P is ASCII , isn't it ? b=int(a) and what you will get ? An error !!! Or probably you yourself

Re: IDE for Python

2008-05-16 Thread Joshua Kugler
Jonathan Barbero wrote: I´m newbie with Python and to learn it better I want to use a good IDE to concentrate on Python power. There is any IDE like Eclipse for Java for Python? If not, what is the best Python´s IDE for you? This is an EFAQ (extremely frequently asked question).

Re: Saving an audio file's waveform into an image

2008-05-12 Thread Joshua Kugler
Julien wrote: Hi, I would like to pull out the waveform of an audio file and save it into an image file, for example in GIF format. Is that achievable, and if so, how? Take a look at http://code.enthought.com/projects/chaco/ One of their examples does exactly this. Last example on this

Re: Setting an attribute without calling __setattr__()

2008-04-29 Thread Joshua Kugler
animalMutha wrote: Consider reading the *second* paragraph about __setattr__ in section 3.4.2 of the Python Reference Manual. if you are simply going to answer rtfm - might as well kept it to yourself. For what it's worth, I (the original poster) am glad he answered that way. It showed me

Setting an attribute without calling __setattr__()

2008-04-25 Thread Joshua Kugler
OK, I'm sure the answer is staring me right in the face--whether that answer be you can't do that or here's the really easy way--but I am stuck. I'm writing an object to proxy both lists (subscriptable iterables, really) and dicts. My init lookslike this: def __init__(self, obj=None):

Re: Setting an attribute without calling __setattr__()

2008-04-25 Thread Joshua Kugler
John Machin wrote: Is there a way to define self.me without it firing __setattr__? Consider reading the *second* paragraph about __setattr__ in section 3.4.2 of the Python Reference Manual. Like I said in my original post, it was probably staring me right in the face. I had read through a bit

Re: Can C.L.P.handle the load?

2008-04-09 Thread Joshua Kugler
Paddy wrote: I'm waiting for the rush of new users to c.l.p :-) If it comes, then aren't regularly posted FAQ's newbie friendly? No, it just means they didn't take the time to read the docs and the FAQ for themselves. :) Is their a good FAQ already around that we can regularly point newbies

Re: Google App Engine

2008-04-09 Thread Joshua Kugler
Duncan Booth wrote: http://www.techcrunch.com/2008/04/07/google-jumps-head-first-into-web-services-with-google-app-engine/ Python only. What a weird decision. Not business and community-friendly at all. Translation: Not

Re: Easy-to-install-and-use scientific graphics (plotting) package for Python 2.5.1 on Linux Ubuntu 7.1

2008-04-04 Thread Joshua Kugler
Is there an easy scientific graphics (plotting) package for Python 2.5.1 running on Ubuntu Linux 7.1 (Gutsy Gibbon)? A few years ago I used PyLab (a MatLab-like plotting module for Python) on a Windows machine, but I don't know if there is a similar easy-to-install-and-use Python

Re: SoC project: Python-Haskell bridge - request for feedback

2008-03-27 Thread Joshua Kugler
Micha? Janeczek wrote: Hi, I am a student interested in participating in this year's SoC. At http://tsk.ch.uj.edu.pl/~janeczek/socapp.html (and also below in this email) you can find a draft of my project proposal. I'd like to ask you to comment on it, especially the deliverables part.

Not understanding lamdas and scoping

2008-03-26 Thread Joshua Kugler
I am trying to use lamdba to generate some functions, and it is not working the way I'd expect. The code is below, followed by the results I'm getting. More comments below that. patterns = ( ('[sxz]$', '$','es'), ('[^aeioudgkprt]h$', '$', 'es'), ('[^aeiou]y$', 'y$', 'ies'),

Re: Not understanding lamdas and scoping

2008-03-26 Thread Joshua Kugler
George Sakkis wrote: On Mar 26, 5:02 pm, Joshua Kugler [EMAIL PROTECTED] wrote: I am trying to use lamdba to generate some functions, and it is not working the way I'd expect. The code is below, followed by the results I'm getting. More comments below that. (...) So, is there some

Re: Comunicate processes with python

2008-03-18 Thread Joshua Kugler
Adrián Bravo Navarro wrote: Is there any simple way to achieve this goal? We've been thinking of sockets but Im not conviced at all with that. If you want to communicate between processes on the same host, yes, you can use DBus or a couple of the options here:

Re: How to import custom python file in python server page (psp) ?

2008-03-14 Thread Joshua Kugler
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 html 2 headMETA HTTP-EQUIV=Content-Type CONTENT=text/html;

Re: problem with mod_python

2008-02-19 Thread Joshua Kugler
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 suggested

Re: No Module Named pstats

2008-02-13 Thread Joshua Kugler
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 stdin, line 1, in module File

Re: embedded python in c++ packaging

2008-02-07 Thread Joshua Kugler
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. Is

Re: SimpleXMLRPCServer to fastcgi via WSGI?

2008-02-01 Thread Joshua Kugler
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 really

Re: Trying to understand Python web-development

2008-01-29 Thread Joshua Kugler
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 called

Re: Python and binary compatibility

2008-01-25 Thread Joshua Kugler
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 discontinued

Re: Perl Template Toolkit: Now in spicy new Python flavor

2008-01-15 Thread Joshua Kugler
[EMAIL PROTECTED] wrote: I'd like to inform the Python community that the powerful and popular Template Toolkit system, previously available only in its original Perl implementation, is now also available in a beta Python implementation: http://tt2.org/python/index.html I created this

Re: split parameter line with quotes

2008-01-11 Thread Joshua Kugler
teddyber wrote: first i'm a newbie to python (but i searched the Internet i swear). i'm looking for some way to split up a string into a list of pairs 'key=value'. This code should be able to handle this particular example string : qop=auth,auth-int,auth-conf,cipher=rc4-40,rc4-56,rc4,des,

Re: .NET and Python Integration Problem and PDF Library (Need Help and Suggestions)

2007-12-18 Thread Joshua Kugler
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 one.

Re: Handling cookies without urllib2 and cookielib

2007-12-17 Thread Joshua Kugler
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 methods, which urllib2 does not do. We also need client

Re: why this error?

2007-12-16 Thread Joshua Kugler
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 exec import sys

Handling cookies without urllib2 and cookielib

2007-12-14 Thread Joshua Kugler
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.

Re: reading cookies from PHP

2007-12-10 Thread Joshua Kugler
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 open

Re: which configparse?

2007-12-06 Thread Joshua Kugler
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.html +1

Re: JSON

2007-12-06 Thread Joshua Kugler
[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

Re: Capture DOS error???

2007-12-06 Thread Joshua Kugler
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

Re: (More) Re: Is __import__ known to be slow in windows?

2007-12-01 Thread Joshua Kugler
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 know for a fact that the only

Re: Is __import__ known to be slow in windows?

2007-11-30 Thread Joshua Kugler
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).

(More) Re: Is __import__ known to be slow in windows?

2007-11-30 Thread Joshua Kugler
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

Is __import__ known to be slow in windows?

2007-11-30 Thread Joshua Kugler
[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