Re: a ConfigParser wtf moment

2005-01-13 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: To avoid this, you need to write something like: . list = [] . for key in configuration.options(core): . list.append((key,configuration.get(core,substitution)) . print list This cause me problems for a different reason, ie., that user vars keys appear in what

Re: how to find site-packages path

2005-01-18 Thread Eric S. Johansson
Michael Hoffman wrote: Philippe C. Martin wrote: I am using my own install script for my software and am looking for a flawless way to figure out where python, and more specifically site-packages is installed. The flawless way would be to use distutils. In fact you shouldn't even need your own

simultaneous multiple requests to very simple database

2005-01-18 Thread Eric S. Johansson
I have an application where I need a very simple database, effectively a very large dictionary. The very large dictionary must be accessed from multiple processes simultaneously. I need to be able to lock records within the very large dictionary when records are written to. Estimated number

Re: simultaneous multiple requests to very simple database

2005-01-18 Thread Eric S. Johansson
Robert Brewer wrote: Eric S. Johansson wrote: I have an application where I need a very simple database, effectively a very large dictionary. The very large dictionary must be accessed from multiple processes simultaneously. I need to be able to lock records within the very large dictionary

anydbm biasing

2005-01-18 Thread Eric S. Johansson
I have a preference for gdbm when building DBM based dictionaries but have found I cannot count on it being there all the time. Therefore, I have created this little tidbit which you call before opening your anydbm database to bias the preference towards gdbm instead of dbhash: # bias DBM

Re: simultaneous multiple requests to very simple database

2005-01-18 Thread Eric S. Johansson
Ricardo Bugalho wrote: On Tue, 18 Jan 2005 17:33:26 -0500, Eric S. Johansson wrote: When I look at databases, I see a bunch of very good solutions that are either overly complex or heavyweight on one hand and very nice and simple but unable to deal with concurrency on the other. two sets

Re: simultaneous multiple requests to very simple database

2005-01-18 Thread Eric S. Johansson
Thomas Bartkus wrote: When you write that super dictionary, be sure to post code! I could use one of those myself. hmmm it looks like you have just flung down the gauntlet of put up or quityerwhinging. I need to get the crude implementation done first but I think I can do it if I can find a

Re: asynchat and threading

2004-11-30 Thread Eric S. Johansson
Jp Calderone wrote: Why not use apt-get? well, I am recommending using apt-get but within entirely different and separate namespace for modules. But on second thought,, it might not be necessary to separate the namespace. If you just need to add the repository for Python modules to the

writing to mailboxes

2004-12-07 Thread Eric S. Johansson
I've been searching around for the equivalent to the mailbox module except with the capability of writing messages as well as reading. If it makes it easier, I only need to write to maildir mailboxes. I found a reference to http://pythonms.sf.net/ Python mail system) but it seems to have

bsddb3 locking questions

2005-12-31 Thread Eric S. Johansson
are there any simple examples of how to do record locking with bsddb3? the bsddb3 documentation is reasonably opaque. For example, the DB initialization requires a DBEnv instance for certain environmental features such as locking. but if you want locking, what happens next? I suspect the

Re: bsddb3 locking questions

2005-12-31 Thread Eric S. Johansson
Eric S. Johansson wrote: are there any simple examples of how to do record locking with bsddb3? got this far with sample code from the activeware site filename = 'fruit' # Get an instance of BerkeleyDB db_env = db.DBEnv() db.set_lk_detect(db.DB_LOCK_YOUNGEST) db_env.open(/tmp/bsddb3

Re: bsddb3 locking questions

2006-01-01 Thread Eric S. Johansson
man, I'm in really bad form replying to myself twice but I'me solved the problem at least in a simple form. Eric S. Johansson wrote: Eric S. Johansson wrote: are there any simple examples of how to do record locking with bsddb3? #!/usr/bin/python from bsddb import db

Re: Berkely DB – many writers, many readers

2005-07-10 Thread Eric S. Johansson
Andy Leszczynski wrote: I need to now option I open the Berkley DB (both db and env) to have configuration for multiple writers and multiple readers. Via multiple processes and multiple threads. No trx needed. the simple answer is you can't. bdbm is probably single writer multiple

Re: anydbm safe for simultaneous writes?

2008-02-29 Thread Eric S. Johansson
chris wrote: I need simple data persistence for a cgi application that will be used potentially by multiple clients simultaneously. So I need something that can handle locking among writes. Sqlite probably does this, but I am using Python 2.4.4, which does not include sqlite. The dbm-style

Re: Backup Script over ssh

2008-02-29 Thread Eric S. Johansson
Gabriel Genellina wrote: En Wed, 27 Feb 2008 13:32:07 -0200, Christian Kortenhorst [EMAIL PROTECTED] escribi�: But there is no rsync for windows without using cygwin That's no big deal; rsync doesn't require tons of libraries, just cygpopt-0.dll and cygwin1.dll. See this page:

Unicode conversion problem (codec can't decode)

2008-04-03 Thread Eric S. Johansson
I'm having a problem (Python 2.4) converting strings with random 8-bit characters into an escape form which is 7-bit clean for storage in a database. Here's an example: body = meta['mini_body'].encode('unicode-escape') when given an 8-bit string, (in meta['mini_body']), the code fragment above

Re: Unicode conversion problem (codec can't decode)

2008-04-04 Thread Eric S. Johansson
Almost there: use string-escape instead; it takes a byte string and returns another byte string in ASCII. perfect. Exactly what I wanted. thank you so very much. I really don't care about the character set used. I'm looking for a matched set of operations that converts the string

gdbm threadsafeness

2008-10-05 Thread Eric S. Johansson
how thread safe is the gdbm module? -- http://mail.python.org/mailman/listinfo/python-list

Re: I built a nice html templater!

2008-10-06 Thread Eric S. Johansson
Steve Holden wrote: Tim Roberts wrote: Derick van Niekerk [EMAIL PROTECTED] wrote: Ok - so it's not really an awesome achievement and only handles basic templating needs (no loops and other programming constructs) but maybe someone will find it useful. sarcasm Sure, that's what the world

in a bit of a quandary about an SMTP receiver

2007-07-15 Thread Eric S. Johansson
I have wasted way too much time on this problem already and I'm hoping it's just that I'm missing some bit of information somewhere. I need an SMTP receiver so I can handle filter requests from a postfix mail server. the asyncore version works fine for one request at a time. This is great

Re: Is Python really a scripting language?

2007-12-15 Thread Eric S. Johansson
John Nagle wrote: Yes. One of the basic design flaws of UNIX was that interprocess communication was originally almost nonexistent, and it's still not all that great. It's easy to run other programs, and easy to send command line parameters, but all you get back is a status code, plus

Re: Is Python really a scripting language?

2007-12-15 Thread Eric S. Johansson
John Nagle wrote: Eric S. Johansson wrote: John Nagle wrote: Yes. One of the basic design flaws of UNIX was that interprocess communication was originally almost nonexistent, and it's still not all that great. It's easy to run other programs, and easy to send command line parameters

Re: Using Python To Change The World :)

2007-11-14 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: Hello, I'm a teen trying to do my part in improving the world, and me and my pal came up with some concepts to improve the transportation system. I have googled up and down for examples of using python to create a city street but I can not find any.

Re: Looking for a good Python environment

2007-11-14 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: Hey, I'm looking for a good Python environment. That is, at least an editor and a debugger, and it should run on Windows. Does anyone have any idea? I've been looking for the equivalent although I want the IDE to run on Windows and to be able to edit/debug/bzr files on

Re: [fcntl]how to lock a file

2006-04-07 Thread Eric S. Johansson
marcello wrote: Hello I need to do this: 1 opening a file for writing/appending 2 to lock the file as for writing (i mean: the program that lock can keep writing, all others programs can't ) 3 wtite and close/unlock http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203 been using

drag and drop to icon

2006-04-12 Thread Eric S. Johansson
I have a small problem that may be best solved by dragging and dropping a mail message to an icon. But I'm honestly not sure what the data will look like from different e-mail clients. Since most of my programming experience is something a user rarely sees, I'm not even sure where to start

Re: drag and drop to icon

2006-04-12 Thread Eric S. Johansson
Diez B. Roggisch wrote: Eric S. Johansson wrote: Drag'n'Drop is highly OS-dependand and clearly out of scope for standard-out-of-the-box python. If you are on macintosh, pyobjc and http://www.cocoadev.com/index.pl?DragAndDrop will certainly help. it does, thank you. as for drag

Re: New Karrigel page in Wikipedia

2006-04-12 Thread Eric S. Johansson
Luis M. González wrote: For those interested in the simplest, easiest and most pythonic web framework out there, there's a new page in Wikipedia: this all depends on your criteria for simplest and easiest. For me HTML is pure hell. I avoid it whenever possible because it literally makes my

Re: New Karrigel page in Wikipedia

2006-04-12 Thread Eric S. Johansson
Ravi Teja wrote: You don't need to do that. You can always use your favorite templating system. I am using Cheetah. actually, I got burned lots of times using template systems. I think I live by the minimum new scar tissue metric. After all, the only intuitive user interface is the

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-28 Thread Eric S. Johansson
Paul McGuire wrote: At first, Guido seemed ambivalent, and commented on the contentiousness of the issue, but it seems that the non-English speakers can more easily find word breaks marked with underscores justification tipped the scale in favor of lower_case_with_underscores. The PEP

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-29 Thread Eric S. Johansson
Warren Stringer wrote: Hi Eric, You make a compelling argument for underscores. I sometimes help a visually impaired friend with setting up his computers. I'm wondering about the aural output to you second example: link.set_parse_action(emit_link_HTML) Does it sound like this:

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: FWIW, even though I think proper-case-with-seperators is greatly preferrable to camelCase, I certainly don't think that speaking the names is a really major point. unless you or someone with working hands helps fix up voicecoder, it is a major point for people like

Re: MoinMoin configuration

2007-06-06 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: I have read through the ACL instructions on MoinMoin's site, but I don't understand how to make it work. See http://moinmoin.wikiwikiweb.de/HelpOnAccessControlLists To me it seems to be saying that you have to create a page before you can set the ACL for it. I

Python editors again (it's not the same old request)

2007-06-10 Thread Eric S. Johansson
I upgraded to version 9.5 and all of my tools which enabled me to program by voice in Emacs are broken. it's one of those dagnabbit a moment's of life. What I am looking for is a Windows based Python Smart editor that uses specific rich text edit controls as specified here:

Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
this morning I was looking at Python and XUL. I was impressed by the very interesting projects that were happening around 2005 but it seems like they have all died. Integrating Python at the Mozilla was also very intriguing as it held the promise of eliminating JavaScript for extension

Re: Python editors again (it's not the same old request)

2007-06-10 Thread Eric S. Johansson
Chris Mellon wrote: wx does (in large part), but most likely the problem is that the rich text control used in most editors is not the win32 rich text control, but instead Scintilla, which is designed for source editing and is much easier to use. Very few editors, of any kind, use the native

Re: Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: I would not completely give up on the idea of Python itself running in the browser, although obviously there have been lots of false starts. http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702

Re: Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702 interesting. Very interesting but I suspect the message is don't hold your breath but don't give up hope. Exactly. :) This is one of those things

Re: Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702 interesting. Very interesting but I suspect the message is don't hold your

Re: [*SPAM*] Python open proxy honeypot

2006-06-13 Thread Eric S. Johansson
Alex Reinhart wrote: Yeah, I just realized that. What would I do to act as an open proxy as well? emulate the Apache proxy capability, especially the reverse proxy. more seriously, what you need to do is from common proxy and web server ports, accept proxy requests with a destination port

question on dict subclassing and overriding __setitems__

2006-06-13 Thread Eric S. Johansson
I apologize if this is an FAQ but googling has not turned up anything, at least to my keywords. I need to parse a configuration file from an existing application and I'm treating it as a dictionary. I created my class with a parent class of dict. Everything works okay except I discover I

Re: question on dict subclassing and overriding __setitems__

2006-06-13 Thread Eric S. Johansson
Diez B. Roggisch wrote: dict.__setitem__(self, index.upper()) = value oh duh. Or better even super(subclass, self).__setitem__(key.upper(), value) hmm. http://fuhm.net/super-harmful/ I think I need to do some more reading. ---eric --

Re: [*SPAM*] Python open proxy honeypot

2006-06-14 Thread Eric S. Johansson
Alex Reinhart wrote: Eric S. Johansson wrote: Alex Reinhart wrote: Yeah, I just realized that. What would I do to act as an open proxy as well? emulate the Apache proxy capability, especially the reverse proxy. more seriously, what you need to do is from common proxy and web server ports

need all python dialog equivalent

2006-06-20 Thread Eric S. Johansson
I'm creating a dialogue style interface for an application on a dedicated system. All I have is basic Python 2.3. Is there anything like an all Python dialog equivalent floating around? I'm currently hacking away in curses but it's taking me a long way down what I fear to be a wrong path.

Re: need all python dialog equivalent

2006-06-21 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: dialog binary is 110 KB. Won't it fit ? missing library. I have ncurses and newt and dialog seems to require something called ncursesw. I've been trying to find the Python newt module as well and that seems to be as invisible as the creature it's named after. --

Re: need all python dialog equivalent

2006-06-21 Thread Eric S. Johansson
Miki wrote: Hello Eric, Is there anything like an all Python dialog equivalent floating around? http://www.pythonware.com/library/tkinter/introduction/ I'm sorry. I should have been more explicit. I need a textbased interface such as the ones you would get with curses and dialogue.

Re: need all python dialog equivalent

2006-06-21 Thread Eric S. Johansson
Fredrik Lundh wrote: Eric S. Johansson wrote: http://excess.org/urwid/ ? I just found that about an hour ago. the demos work on the target system so I'm comfortable enough to go down that path. thank you all. ---eric -- http://mail.python.org/mailman/listinfo/python-list

Re: need all python dialog equivalent

2006-06-22 Thread Eric S. Johansson
Thomas Dickey wrote: Eric S. Johansson [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: dialog binary is 110 KB. Won't it fit ? missing library. I have ncurses and newt and dialog seems to require something called ncursesw. I've been trying to find the Python newt seems to require

Re: list comprehension

2006-06-30 Thread Eric S. Johansson
tac-tics wrote: a wrote: can someone tell me how to use them thanks sigh... You do a google on them: http://docs.python.org/tut/node7.html#SECTION00714 thank you for the reminder. But after reading it, I was left with a question. Why the new syntax for what appears

fine grain logging cotrol

2007-03-22 Thread Eric S. Johansson
I need to to be able to conditionally log based on the method the log statement is in and one other factor like a log level. in order to do so, I need to be able to automatically find out the name of the method and its class but I haven't found out how to do that yet. for example, class

Re: fine grain logging cotrol

2007-03-22 Thread Eric S. Johansson
Peter Otten wrote: Eric S. Johansson wrote: I need to to be able to conditionally log based on the method the log statement is in and one other factor like a log level. in order to do so, I need to be able to automatically find out the name of the method and its class but I haven't found

Re: fine grain logging cotrol

2007-03-23 Thread Eric S. Johansson
Peter Otten wrote: Eric S. Johansson wrote: [in private mail -- please don't, Eric] sorry. my preference is for private mail. it's my way of trying to be kind to others by reducing list clutter. I don't understand. The logging package detects the function name without user intervention

Re: fine grain logging cotrol

2007-03-23 Thread Eric S. Johansson
Peter Otten wrote: Eric S. Johansson wrote: Here is yet another revision of my example then: it's making more and more sense although I don't quite follow 'property' quite yet. But I see that get_logger is invoked prior to the __logger.info call. I was looking at how to implement one

Re: fine grain logging cotrol

2007-03-23 Thread Eric S. Johansson
Gabriel Genellina wrote: I don't get all the details of what's all that stuff for, but from the error and traceback, I think you forgot to create the filter_test instance. That is, change lgr.addFilter(filter_test) to lgr.addFilter(filter_test()) do'h . for some reason, I thought

Re: fine grain logging cotrol

2007-03-24 Thread Eric S. Johansson
Dennis Lee Bieber wrote: On Fri, 23 Mar 2007 21:15:56 -0400, Eric S. Johansson [EMAIL PROTECTED] declaimed the following in comp.lang.python: Gabriel Genellina wrote: I don't get all the details of what's all that stuff for, but from the error and traceback, I think you forgot to create

Re: fine grain logging cotrol

2007-03-24 Thread Eric S. Johansson
Dennis Lee Bieber wrote: On Sat, 24 Mar 2007 11:29:34 -0400, Eric S. Johansson [EMAIL PROTECTED] declaimed the following in comp.lang.python: yes. here is the code that fails. I don't understand why the unbound method. what is really weird is that when I singlestep through the code

Re: fine grain logging cotrol

2007-03-24 Thread Eric S. Johansson
Dennis Lee Bieber wrote: I've never resorted to the debugger -- it's always been faster for me to just wolf-fence* code with print statements... depends on the situation for me. normally I use log statements that turn on or off based on predicates (now I need to figure out how to

organizing collections of small modules

2007-03-25 Thread Eric S. Johansson
I have a bunch of small modules that I use within my application. Most of these modules are single file modules. Currently, I have them set up as stand-alone modules but because it's a royal pain to fetch five or 10 of these modules for each application and tracking whether or not they are

Re: organizing collections of small modules

2007-03-25 Thread Eric S. Johansson
Jorge Godoy wrote: Eric S. Johansson [EMAIL PROTECTED] writes: I have a bunch of small modules that I use within my application. Most of these modules are single file modules. Currently, I have them set up as stand-alone modules but because it's a royal pain to fetch five or 10

Re: How to lock files (the easiest/best way)?

2006-07-16 Thread Eric S. Johansson
Elmo Mäntynen wrote: Is there something better than using fnctl? It seems a bit intimidating with a quick look. try the portlocker wrapper from the active state cookbook. I have a version which has been slightly updated for more modern pythons. I really need to make my darcs repository

Re: What do you want in a new web framework?

2006-08-21 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: hardemr wrote: I've just read all of the answers. Most of yours said that there are many web frameworks ,so it is nonsense to make a new web framework in python. Hardemr, I like Ajacksu's answer, with a twist. Please concnentrate on writing a Visual Studio-like

unifying many packages under one name

2007-08-23 Thread Eric S. Johansson
I have a collection of packages and I want to put them under single unifying name. my goal is to reduce namespace pollution and make all these packages accessible as 'import vvv.aaa'. In more detail, if I have packages 'aaa' and 'bbb', what do I do to put those packages under unifying name

setup.py question

2007-08-29 Thread Eric S. Johansson
I have an environment where I have a bunch of data files or use would like Python application. I want to use the data_files specification of set up to distribute those files. But I also need to change ownership and permissions. I know there's some way to do this because I've done it once

Re: IDE for Python

2007-08-29 Thread Eric S. Johansson
Ben Finney wrote: Stefan Behnel [EMAIL PROTECTED] writes: Neither? Emacs is both editor *and* IDE. I think of it more as feature full but somehow unsatisfying. For example, for those of us PRDs ( Politely Referred to as Disabled) who are trying to program by voice could use an enumeration

building helper executables with distutils

2006-09-04 Thread Eric S. Johansson
I have a module which needs to invoke a suid helper program in order to do what it needs to do. This suid helper program needs to be built and installed at the same time as the module. Is there any way to do this with distutils? I've been looking through the documentation but haven't really

Re: Python blogging software

2006-09-16 Thread Eric S. Johansson
Fuzzyman wrote: Because it is client side (rather than running on the server), it has no built in comments facility. I use Haloscan for comments, but I'm always on the look out for a neat comments system to integrate with Firedrop. I personally prefer the 'client side' approach, as it

sgid and python programs

2006-09-20 Thread Eric S. Johansson
Assuming one can't avoid the need to set the group ID of a Python program, is a wrapper program still considered the best way to do that? the reason I ask is that a few years ago, I picked up a program that was (and maybe still is) shipped with Python as a wrapper for sgid programs. I

Re: R.S.I. solutions?

2006-09-27 Thread Eric S. Johansson
Nick Craig-Wood wrote: This is excellent advice... I was diagnosed with tendonitis over 5 years ago now. I found the medical people generally hopeless, but the physios really know their stuff (this is in the UK also). some know their stuff but a vast majority of them are humming because they

Re: R.S.I. solutions?

2006-09-27 Thread Eric S. Johansson
Dennis Lee Bieber wrote: On Tue, 26 Sep 2006 15:03:41 -0400, Eric S. Johansson [EMAIL PROTECTED] declaimed the following in comp.lang.python: What's really strange is that most people think laptop keyboards are horrible but I absolutely love the ones I've had from Dell and Acer

Re: Making sure script only runs once instance at a time.

2006-09-27 Thread Eric S. Johansson
Hari Sekhon wrote: I have written a script and I would like to ensure that the script is never run more than once at any given time. What is the best way of testing and exiting if there is another version of this script running somewhere on this machine? I guess what I'm asking is how

another distutils question

2006-09-29 Thread Eric S. Johansson
is there anyway I can, in a setup.py file, set and internal equivalent to the '--install-scripts' commandline option? script installation directory but I don't want on the command line where things can go horribly wrong if the user forgets. I would like to create a new default setting for

Re: another distutils question

2006-09-29 Thread Eric S. Johansson
Robert Kern wrote: Eric S. Johansson wrote: is there anyway I can, in a setup.py file, set and internal equivalent to the '--install-scripts' commandline option? Please don't. Hard-coding that interferes with the user's decision of where things should go. Only the user should be making

Re: another distutils question

2006-09-29 Thread Eric S. Johansson
Robert Kern wrote: Okay, if it's just for internal use, then I certainly have no objection. Use a setup.cfg file: http://docs.python.org/inst/config-syntax.html Specifically, use something like the following section: [install] install_scripts=/path/to/scripts/directory thank

Re: another distutils question

2006-09-29 Thread Eric S. Johansson
Robert Kern wrote: Eric S. Johansson wrote: Now I get to puzzle out how to install the CGI plus images plus stylesheets plus plus plus mess. Probably a bit outside of the scope of distutils even if the CGI programs are Python. ;-) I recommend installing the data inside the package

Re: another distutils question

2006-09-29 Thread Eric S. Johansson
Eric S. Johansson wrote: So what I have seen so far says that to be able to take data from a series of directories scatter it to other directories may be out of scope. It's okay. If I have to write a wrapper, it won't be the first time. do'h. http://docs.python.org/dist/node13.html

Re: another distutils question

2006-09-29 Thread Eric S. Johansson
Keith Perkins wrote: On a similar note , I have another question about distutils and data files. I have a little program that uses a txt file to store data, and it works fine running it in it's own folder, if I install through distutils, using sudo to get it to write to the site-packages

Re: another distutils question

2006-09-29 Thread Eric S. Johansson
Robert Kern wrote: Instead, include the default data inside the package (read-only to non-root users). Then allow the script itself to create the directory the first time it is run (read-write, and it should then automatically be accessible to the user that ran the script). You might

Re: Making sure script only runs once instance at a time.

2006-10-02 Thread Eric S. Johansson
MonkeeSage wrote: Here's a class using Fredrik's suggestions to provide generic, cross-platform file locking (only tested on *nix however, with the two test files listed [i.e., run test1.py in one terminal then test2.py in another]): http://pastie.caboo.se/15851 Ps. The lockfile should

Re: httplib and large file uploads

2006-10-02 Thread Eric S. Johansson
Jesse Noller wrote: Hey All, I'm working on an script that will generate a file of N size (where N is 1k-1gig) in small chunks, in memory (and hash the data on the fly) and pass it to an httplib object for upload. I don't want to store the file on the disk, or completely in memory at any

Re: Making sure script only runs once instance at a time.

2006-10-03 Thread Eric S. Johansson
MonkeeSage wrote: Eric S. Johansson wrote: the problem with this solution is that it does not handle the read nonexclusive/write exclusive locking model. In this model, reads don't block, they only register that the request is in process. writes lock request block until all outstanding

Re: CGI - mod_python

2006-10-03 Thread Eric S. Johansson
Thomas Jollans wrote: Not that I know of, but thanks to the WSGI (specified in PEP 333: http://www.python.org/dev/peps/pep-0333/) you should be able to convert your app to WSGI, which will run on mod_python, relatively easily (depending on your code; 'print' won't work anymore) I assume this

distutils:permissions problems

2006-10-09 Thread Eric S. Johansson
I'm developing Python code on multiple VM Ware guest OS running ubuntu. I need to share common file space so that each of these guest instances will have complete access to the to all of the files. The problem is that, because of a quirk (or misfeature) of VM Ware shared filesystem, all of

Re: distutils:permissions problems

2006-10-09 Thread Eric S. Johansson
Martin v. Löwis wrote: Eric S. Johansson schrieb: The problem is that, because of a quirk (or misfeature) of VM Ware shared filesystem, all of the directories and files are owned by root with a 700 permissions. When I run setup.py install, they are installed as root with 700 permissions

Re: Getting a lot of SPAM from this list

2006-10-24 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: Gabriel I use a discardable email address from Yahoo. Spam filtering is Gabriel good, and when you get too much spam, just delete that address Gabriel and create another one. Maybe it's just me, but creating and discarding email addresses makes me think

distutiles extension question

2006-11-06 Thread Eric S. Johansson
How can I limit when my code run only when it's a build or install setup.py command and only after the setup method? I need to do some processing after setup.py runs and I've been successful writing the code to do what I need but the problem is it runs every time I run setup.py regardless of

mini component distribution question

2006-04-19 Thread Eric S. Johansson
as one would expect when creating a body of software, eventually you create a series of relatively generic components you find yourself using over and over again. As a result, I'm finding myself slightly bit by the same problem I have faced multiple times of the past. Namely, how do you

Re: mini component distribution question

2006-04-19 Thread Eric S. Johansson
Ben Finney wrote: Eric S. Johansson [EMAIL PROTECTED] writes: as one would expect when creating a body of software, eventually you create a series of relatively generic components you find yourself using over and over again. As a result, I'm finding myself slightly bit by the same

Re: mini component distribution question

2006-04-19 Thread Eric S. Johansson
Ben Finney wrote: Eric S. Johansson [EMAIL PROTECTED] writes: Ben Finney wrote: setuptools allows downloads and/or installs from any specified location. The Cheeseshop is just a convenient default location. - use easy_install to automatically download and install them when the main

Re: How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namesp

2006-04-20 Thread Eric S. Johansson
alisonken1 wrote: As to the question fail to see how version control relates to code/test separation, the original poster asked several questions, one of which was production/testing code separation. Along with the separation (so while you're testing new functionality, you don't break

Re: mini component distribution question

2006-04-20 Thread Eric S. Johansson
Serge Orlov wrote: How about one? I bundle everything together. Sharing modules at end user host is more difficult because you have to test many combinations. Needless to say, end users also have a strange ability to create untested combinations of modules :) it's the exact same problem.if

Re: Progamming python without a keyboard

2006-05-05 Thread Eric S. Johansson
Rony Steelandt wrote: http://www.newscientisttech.com/article/dn9066 To nice to be true ? its early technology. It's difficult to install and it definitely need some extra horsepower because the two people developing it are also disabled (like me). The only thing I've done to support the

converting to scgi

2006-05-08 Thread Eric S. Johansson
I'm looking for a scgi modules that make it easy to convert a CGI using the standard Python CGI module. I'm hoping for something that will run my program either as scgi or cgi. I did find something called paste which purports to be some sort of CGI Bridge framework but from the documentation,

differences between ubuntu and fedora python

2006-12-06 Thread Eric S. Johansson
fedora [EMAIL PROTECTED] ~]# file /etc/postfix/transport* /etc/postfix/transport:ASCII English text /etc/postfix/transport.db: Berkeley DB (Hash, version 8, native byte-order) # python /usr/lib/python2.4/whichdb.py /etc/postfix/transport UNKNOWN /etc/postfix/transport # python

special editor support for indentation needed.

2008-11-14 Thread Eric S. Johansson
in trying to make programming in Python more accessible to disabled programmers (specifically mobility impaired speech recognition users), and hitting a bit of a wall. The wall (for today) is indentation. I need a method of getting the right indentation without having to speak a bunch of

Re: special editor support for indentation needed.

2008-11-14 Thread Eric S. Johansson
Almar Klein wrote: Hi Eric, First of all, I like your initiative. there's nothing like self interest to drive one's initiative. :-) 14 years with speech recognition and counting. I'm so looking to my 15th anniversary of being injured next year another initiative is exporting the speech

Re: special editor support for indentation needed.

2008-11-14 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: On Nov 14, 4:08 pm, Eric S. Johansson [EMAIL PROTECTED] wrote: Almar Klein wrote: Hi Eric, First of all, I like your initiative. there's nothing like self interest to drive one's initiative. :-) 14 years with speech recognition and counting. I'm so looking to my

Re: special editor support for indentation needed.

2008-11-14 Thread Eric S. Johansson
[EMAIL PROTECTED] wrote: I don't understand. If you don't want to terminate the if, why do you hit backspace? What is it that you would like to have happen? the goal is to make some aspects of indentation behave the same without context dependency. this goal exists for many features of

Re: special editor support for indentation needed.

2008-11-14 Thread Eric S. Johansson
Aaron Brady wrote: On Nov 14, 8:01 pm, Eric S. Johansson [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I don't understand. If you don't want to terminate the if, why do you hit backspace? What is it that you would like to have happen? the goal is to make some aspects of indentation

Re: special editor support for indentation needed.

2008-11-15 Thread Eric S. Johansson
Aaron Brady wrote: You see examples here from time to time that don't follow the rigid C+ + formatting. Some examples: def classmaker( ): class X: something return X class X: class Y: something if something: class X: pass else: def X( ): pass Some

Re: special editor support for indentation needed.

2008-11-15 Thread Eric S. Johansson
John Yeung wrote: This is such a fascinating and compelling thread that it has pulled me out of lurker mode. Eric, I would like to say I also admire your initiative, but even more so your patience. You seem to handle comments of all types gracefully. Should have seen me 20 years ago.

  1   2   >