[ANN] Pydev and Pydev Extensions 1.0.2 release

2006-02-17 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.0.2 have been released Check http://www.fabioz.com/pydev for details on Pydev Extensions and http://pydev.sf.net has for details on Pydev Highlights in Pydev Extensions: --- - New feature in the debugger: the console is

Dejavu 1.4.0 (Python ORM) release

2006-02-17 Thread Robert Brewer
Title: Dejavu 1.4.0 (Python ORM) release Dejavu 1.4.0 http://projects.amor.org/dejavu/ I'm extremely pleased to announce the release of Dejavu 1.4.0, a pure-Python Object-Relational Mapping library. Dejavu allows you to create, query, and manage persistent data using your existing

ANN: Python Enthought Edition Version 0.9.2 Released

2006-02-17 Thread Travis N. Vaught
Enthought is pleased to announce the release of Python Enthought Edition Version 0.9.2 (http://code.enthought.com/enthon/) -- a python distribution for Windows. This is a kitchen-sink-included Python distribution including the following packages/tools out of the box: Numeric 24.2 SciPy 0.3.3

Re: file.read problem

2006-02-17 Thread wscrsurfdude
Try opening the file in 'rbU' mode. This will use universal newline mode and convert all carriage returns to line feeds. I tried this, but as you say, now there are 0x0A bytes extra in my files, is there also a possibility to let all these things out, and just get the file. I am working on a

Re: getting the line just before or after a pattern searched

2006-02-17 Thread bonono
[EMAIL PROTECTED] wrote: hi i have a file something like this abcdefgh ijklmnopq 12345678 rstuvwxyz . . . 12345678 . whenever i search the file and reach 12345678, how do i get the line just above and below ( or more than 1 line above/below) the pattern 12345678

Re: Databases and python

2006-02-17 Thread Jonathan Gardner
About the filename ID - word ID table: Any good database (good with large amounts of data) will handle the memory management for you. If you get enough data, it may make sense to get bothered with PostgreSQL. That has a pretty good record on handling very large sets of data, and intermediate sets

Re: file.read problem

2006-02-17 Thread wscrsurfdude
Farshid Lashkari wrote: I am working on a script to get parts of raw data out of a file, and the data I read has to be the data written in the file without CR or LF. So you just want to remove all the linefeeds? This should work then: data = data.replace('\n','') -Farshid The problem

Re: Determing whether two ranges overlap

2006-02-17 Thread Paul McGuire
Robin Haswell wrote: Hey guys I was wondering if you could give me a hand with something. If I have two tuples that define a range, eg: (10, 20), (15, 30), I need to determine whether the ranges overlap each other. def overlap(a,b): return a[0] = b[0] = a[1] or b[0] = a[0] = b[1] --

Re: Merging two lists of data (Pythonic way)

2006-02-17 Thread Steven D'Aprano
On Thu, 16 Feb 2006 12:30:47 -0800, SMB wrote: I know I could do this with two for loops, but am looking for a better solution maybe involving list comprehension. What's wrong with for loops? Why do you think they are unPythonic? -- Steven. --

Re: pymssql and date format

2006-02-17 Thread Steve Holden
[EMAIL PROTECTED] wrote: hi i am using pymmsql to query a date column in MSSQL database table. However the result shows for example (datetime.datetime(2006, 2, 16, 17, 50, 19) which is supposed to be 2006-02-16 17:50:19.000 anyway to correct query a date column using pymssql so that it gives

Re: Question about xmlrpc and threading

2006-02-17 Thread Martin P. Hellwig
David Hirschfield wrote: cut My question was whether this is allowed? Can two calls be made via the same ServerProxy instance while a request is already underway? Clearer? -Dave cut Much, and my preliminary answer is, I have no clue :-) But knowing that python will throw an exceptions

Re: mod_python and open HTTP connection

2006-02-17 Thread Kane
Does mod_python time out after a minute ? No, but the browser may timeout. Sending a periodic bit-o-data on a long running page is a good idea anyway (so the user knows it is still working). If I leave an HTTP connection open so that the content keeps loading inside the browser window

Installing python on lynxOS

2006-02-17 Thread Bryce Cooper
I'm trying to install python2.4.2 onto lynxOS 4.0.0. with gcc 2.95.3. I was wondering if anyone who has done this before could give me some pointers.I'm currently getting the following error when running make: gcc -o python Module/python.o libpython2.4.a -lsocket -lm called2:ld returned 1 exit

Re: calculating on matrix indices

2006-02-17 Thread Kirk McDonald
Brian Blais wrote: Hello, In my attempt to learn python, migrating from matlab, I have the following problem. Here is what I want to do, (with the wrong syntax): from numpy import * t=arange(0,20,.1) x=zeros(len(t),'f') idx=(t5) tau=5 x[idx]=exp(-t[idx]/tau) # ---this line is

Re: Seaching Active Directory via ADO

2006-02-17 Thread LittlePython
To be more clear, something like this example but in python. I have tryed to convert something very simular to this but have failed. -- SCRIPT CONFIGURATION -- strBase= LDAP://BaseDN; strFilter = Filter; strAttrs = AttrList; strScope = Scope ' -- END CONFIGURATION -

Re: Mac OS X Installation Problem

2006-02-17 Thread Alex Martelli
Matt wrote: Hi Everybody, 1) Does OS X have a thing like the Add/Remove Programs control panel on Windows XP? Nope. You install stuff by running packages (installers) or dragging .app files to Applications, uninstall it normally by dragging them to Trash. My Tiger system had Python

file.read problem

2006-02-17 Thread wscrsurfdude
f = open('myfile,'r') a = f.read(5000) When I do this I get the first 634 bytes. I tried using the: f = open('myfile,'rb') option, but now there are a few 0x0D bytes extra in myfile. 0x0D = Carriage return. How can I make a program that not puts in the 0x0D bytes in windows. In linux the first 2

Re: file.read problem

2006-02-17 Thread Farshid Lashkari
I am working on a script to get parts of raw data out of a file, and the data I read has to be the data written in the file without CR or LF. So you just want to remove all the linefeeds? This should work then: data = data.replace('\n','') -Farshid --

Re: define loop statement?

2006-02-17 Thread Xavier Morel
Rene Pijlman wrote: David Isaac: I would like to be able to define a loop statement (nevermind why) so that I can write something like loop 10: do_something instead of for i in range(10): do_something Possible? If so, how? Yes. By implementing a compiler or an interpreter

SonicWALL Configuration

2006-02-17 Thread D
Is it possible to write a Python script to modify/configure a SonicWALL firewall? Or, has anyone written any useful utilities for the units (i.e. parsing the TSR reports, etc.)? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Seaching Active Directory via ADO

2006-02-17 Thread Roger Upole
It usually means the domain you specified can't be found. Roger LittlePython [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do you know what this may mean? C:\Documents and Settings\Administrator\Desktop\pytestADOSeach.py Traceback (most recent call last): File

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread Ben Finney
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: I rarely do GUIs, and reminded myself today why that is the case (simply, it's not fun). Programming C++ in Python isn't much fun, true. However, it should be pretty easy to write small wrapper over the wxPython api. [...] wxPython is great as it

days since epoch

2006-02-17 Thread eight02645999
hi how can i get the number of days since epoch using the time module? or do i have to manually do the arithmetic? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Databases and python

2006-02-17 Thread Jonathan Gardner
About indexes everywhere: Yes, you don't have to be a DB expert to know that indexes everywhere is bad. But look at this example. There are really two ways that the data is going to get accessed in regular use. Either they are going to ask for all files that have a word (most likely) or they are

Re: days since epoch

2006-02-17 Thread [EMAIL PROTECTED]
As suggested by Alex the datetime module makes this easy: py import datetime py epoch = datetime.datetime.utcfromtimestamp(0) py print epoch 1970-01-01 00:00:00 py today = datetime.datetime.today() py d = today - epoch py print d 13196 days, 9:50:44.266200 py print d.days # timedelta object 13196

Re: file.read problem

2006-02-17 Thread Fredrik Lundh
wscrsurfdude wrote: Try opening the file in 'rbU' mode. This will use universal newline mode and convert all carriage returns to line feeds. I tried this, but as you say, now there are 0x0A bytes extra in my files, is there also a possibility to let all these things out, and just get the

restricted mode (2.4.2)

2006-02-17 Thread Wojciech Pawlikowski
Hey, I work on some project where main part (core) is coded in C (for speed) and the rest is in Python. Python API is used to launch python modules without using any exec() system() calls (thread safe). During debugging I found that many of Python modules fails to work because restricted mode:

Re: embedding python in HTML

2006-02-17 Thread Paul Boddie
Rene Pijlman wrote: John Salerno: [Python alternative for PHP] So to do this with Python, do I simply integrate it into the HTML as above, with no extra steps? You'd need something like the PHP engine, that understands Python rather than PHP. [...] There's also PSP:

Re: Open Relay Test

2006-02-17 Thread Martin P. Hellwig
D wrote: Nope, quite the contrary..I'm looking to write a simple program for a client of mine that will, among other things, verify that their clients' email servers do not have open relays. I usually test it like this: [EMAIL PROTECTED]:~ telnet mail.huygenslyceum.nl smtp Trying

Re: Pulling all n-sized combinations from a list

2006-02-17 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: hi, I'm not sure why this hasn't come up yet, but this seems to beg for list comprehensions, if not generator expressions. All of the following run in under 2 seconds on my old laptop: alph = 'abcdefghijklmnopqrstuvwxyz' len([''.join((a,b,c,d)) for a in alph

Re: Determing whether two ranges overlap

2006-02-17 Thread Robin Haswell
Thanks guys, you've all been very helpful :-) -Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: Job advert: Your help needed

2006-02-17 Thread Paul Rubin
Andrew Koenig [EMAIL PROTECTED] writes: Paul Boots [EMAIL PROTECTED] +354 664 1748 Iceland? really?? Gonna go try to get a chess match? ;-) Mike Jittlov likes the place too. I thought of him immediately but AFAIK he doesn't use Python. --

Re: Seaching Active Directory via ADO

2006-02-17 Thread alex23
Heya, There are a couple of examples on the O'Reilly site. These two are taken from 'Active Directory Cookbook', the first uses a COM object while the second uses a native LDAP module: http://www.rallenhome.com/books/adcookbook/src/18.6-rootdse_python_com.py.txt

Re: Pulling all n-sized combinations from a list

2006-02-17 Thread jess . austin
hi, I'm not sure why this hasn't come up yet, but this seems to beg for list comprehensions, if not generator expressions. All of the following run in under 2 seconds on my old laptop: alph = 'abcdefghijklmnopqrstuvwxyz' len([''.join((a,b,c,d)) for a in alph for b in alph for c in alph for d

PyProtocols, Components, and Inheritance

2006-02-17 Thread Terry Hancock
I've been discussing PyProtocols with a a friend collaborating with me on a SF game project, about the benefits and design concept of component architecture, and I'm a little confused by what I'm learning. I learned the concepts of component architecture from the Zope project, where if I'm not

Re: embedding python in HTML

2006-02-17 Thread Kirk McDonald
John Salerno wrote: bruno at modulix wrote: You've got to understand that Python is *not* a 'ServerPage' language (- php, asp, jsp etc) in itself. Your server can now run python, fine, but *how* ? CGI ? FastCGI ? mod_python ? other ? (hint: it's probably just plain old CGI...) So does

Re: Job advert: Your help needed

2006-02-17 Thread Andrew Koenig
Paul Boots [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul Boots [EMAIL PROTECTED] +354 664 1748 Iceland? really?? -- http://mail.python.org/mailman/listinfo/python-list

define loop statement?

2006-02-17 Thread David Isaac
I would like to be able to define a loop statement (nevermind why) so that I can write something like loop 10: do_something instead of for i in range(10): do_something Possible? If so, how? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: file.read problem

2006-02-17 Thread wscrsurfdude
if it's a binary file, open with mode rb. You are right about opening it in the rb mode (flaw in the start post), but also when I do this in windows in front of every 0x0A is put a 0x0D. I found a explanation why it is working in linux it is below in my post. But what i get of this that in

Re: web crawler in python or C?

2006-02-17 Thread Steve Holden
abhinav wrote: Hi guys.I have to implement a topical crawler as a part of my project.What language should i implement C or Python?Python though has fast development cycle but my concern is speed also.I want to strke a balance between development speed and crawler speed.Since Python is an

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread snoe
[EMAIL PROTECTED] wrote: I rarely do GUIs, and reminded myself today why that is the case (simply, it's not fun). I implemented a simple TreeCtrl, and had to implement my own 'children' method, of all things! Here it is: def children(self,node): c = [] nc,cookie =

Re: question about scope

2006-02-17 Thread bruno at modulix
John Salerno wrote: Here's a sentence from Learning Python: Names not assigned a value in the function definition are assumed to be enclosing scope locals (in an enclosing def), globals (in the enclosing module's namespace) or built-in (in the predefined __builtin__ names module Python

Re: Seaching Active Directory via ADO

2006-02-17 Thread LittlePython
Thanks but I was looking more for ADO com object than ADSI or ldap. For some strange reason it is very hard to locate any working scripts that use ADO to connect and search AD. Is there an issue with ADO and python when connecting to AD? I have try to build one myself with no luck. I think my

Re: Open Relay Test

2006-02-17 Thread Steven D'Aprano
On Fri, 17 Feb 2006 00:40:51 -0500, Steve Holden wrote: D wrote: Hi all .. how could one test to see if an open relay exists on a specific email server? I bet spammers would love someone to answer that question for them. You wouldn't be planning spam, by any chance? The spammers already

Re: Safe Python Execution

2006-02-17 Thread Jean-Paul Calderone
On Thu, 16 Feb 2006 07:59:03 -0800, Alex Martelli [EMAIL PROTECTED] wrote: Graham [EMAIL PROTECTED] wrote: I've been messing around with trying to get a small sandbox like environment where i could execute python code in a safe way. Basically what the old restricted execution module attempted

Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread [EMAIL PROTECTED]
I rarely do GUIs, and reminded myself today why that is the case (simply, it's not fun). I implemented a simple TreeCtrl, and had to implement my own 'children' method, of all things! Here it is: def children(self,node): c = [] nc,cookie = self.GetFirstChild(node)

Is there anything like ASP.NET for Python web apps ?

2006-02-17 Thread rytoy
That is dragging web 'controls' to the page in design mode, binding controls to datasources, and writing code for events like page_load or button1_click ? I need to write a few small cross-platform, data-driven web apps (and I really hate J2EE...) --

Re: define loop statement?

2006-02-17 Thread Georg Brandl
David Isaac wrote: I would like to be able to define a loop statement (nevermind why) so that I can write something like loop 10: do_something instead of for i in range(10): do_something Possible? If so, how? It's not possible to create a new statement, with suite and

Re: Merging two lists of data (Pythonic way)

2006-02-17 Thread Dave Hansen
On Thu, 16 Feb 2006 12:51:24 -0800 in comp.lang.python, SMB [EMAIL PROTECTED] wrote: Jonathan Gardner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] codes = map(lambda x: x[0], list1) for d in list2: if d['code'] in codes: d['VERIFIED'] = 1 Is this what you were looking

Re: file.read problem

2006-02-17 Thread wscrsurfdude
I have the solution, the flaw was not in the opening of the file, but in the writing of the file. Stupid me, i opened it with mode rb, but wrote it with w instead of with wb Everybody thanks for helping me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging two lists of data (Pythonic way)

2006-02-17 Thread Gerard Flanagan
Dave Hansen wrote: On Thu, 16 Feb 2006 12:51:24 -0800 in comp.lang.python, SMB [EMAIL PROTECTED] wrote: Jonathan Gardner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] codes = map(lambda x: x[0], list1) for d in list2: if d['code'] in codes: d['VERIFIED'] = 1 Is

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread Pietro Campesato
As you just said, wxPython is ...(a simple wrapper for a C++ toolkit): it is oriented toward the C++ style/mindset. -- http://mail.python.org/mailman/listinfo/python-list

Re: file.read problem

2006-02-17 Thread Steven D'Aprano
On Fri, 17 Feb 2006 00:15:31 -0800, wscrsurfdude wrote: Farshid Lashkari wrote: I am working on a script to get parts of raw data out of a file, and the data I read has to be the data written in the file without CR or LF. So you just want to remove all the linefeeds? This should work

Re: question about scope

2006-02-17 Thread Fredrik Lundh
John Salerno wrote: I understand what global and built-in are, and I thought I understood the concept of local too, but when I got to this sentence (and the previous sentence), I became confused about the first two scopes. What's the difference between 'local' and 'enclosing functions'?

Re: calculating on matrix indices

2006-02-17 Thread Robert Kern
Brian Blais wrote: Hello, In my attempt to learn python, migrating from matlab, I have the following problem. Here is what I want to do, (with the wrong syntax): from numpy import * t=arange(0,20,.1) x=zeros(len(t),'f') idx=(t5) tau=5 x[idx]=exp(-t[idx]/tau) # ---this line is

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Steven D'Aprano
On Thu, 16 Feb 2006 20:55:42 -0800, seb.haase wrote: I don't think Because this change might break code, it's being introduced very gradually. Python 2.2 begins the transition, but the switch won't be complete until Python 3.0. says enough. I'm not sure what else should be said. Should I

Re: Sendmail ok signal?

2006-02-17 Thread Dan Stromberg
On Thu, 16 Feb 2006 07:36:18 -0800, Gaz wrote: Hey. I looked at the Sendmail help and did not find a property where i can get an ok signal when the email is finally sent. I need something like that to show a Processing, please stand by screen when the server is sending an email, and when the

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread seb . haase
Thanks for the replies, But to point out what the subject of this thread is (sorry for the typo ;-) : There is a PEP (proposal 238) to change Python so that 5/2 WOULD do the true division -- and obviously break lots of code. Just type this in your python interpeter: from __future__ import

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Magnus Lycka
Gregory Piñero wrote: I knew about that approach. I just wanted less typing :-( It's enough to introduce one float in the mix. 1.*a/b or float(a)/b if you don't want one more multiplication. -- http://mail.python.org/mailman/listinfo/python-list

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread [EMAIL PROTECTED]
Ben Finney wrote: The web content is a bit sparse; fortunately the code has seen more love than the web pages. Wax was the focus of a couple of Google Summer of Code projects, and new life seems to have been gained as a result. I'm glad to hear that, however, I just took a look at the

Re: Is there anything like ASP.NET for Python web apps ?

2006-02-17 Thread Ravi Teja
If what you want is a web IDE that supports visual development, no standalone Python IDE has such support. But you can use Python in IDEs that do support these features. 1.) ActiveGrid (http://www.activegrid.com/) - closest visual web IDE where Python is a first class member. 2.) Use ASP.NET with

Re: Python, Forms, Databases

2006-02-17 Thread Jeff Reavis
You should check out Spyce: http://spyce.sourceforge.net/ It will work under CGI as well as Fast CGI, ModPython, or its own built in server. It also has an ASP/JSP like syntax: http://spyce.sourceforge.net/docs/doc-lang_asp.html If you plan on getting a new hosting company you might also want

Re: question about scope

2006-02-17 Thread John Salerno
Fredrik Lundh wrote: John Salerno wrote: But my real question is this, which is related to the above: Name references search at most four scopes: local, then enclosing functions (if any), then global, then built-in. I understand what global and built-in are, and I thought I understood

Re: pythonic way of 'b = list(a); b.append(4)

2006-02-17 Thread Steven D'Aprano
On Thu, 16 Feb 2006 08:04:43 -0800, szabi wrote: Hi! I have a list of three values and want to call a function with four parameters. I would like to write something like: a = [1, 2, 3] f(*a, 4) This is syntactically wrong, so is there a function which appends a value to a list and

Re: question about scope

2006-02-17 Thread Jean-Paul Calderone
On Thu, 16 Feb 2006 15:18:29 GMT, John Salerno [EMAIL PROTECTED] wrote: [snip] I understand what global and built-in are, and I thought I understood the concept of local too, but when I got to this sentence (and the previous sentence), I became confused about the first two scopes. What's the

Re: file.read problem

2006-02-17 Thread Fredrik Lundh
wscrsurfdude wrote: if it's a binary file, open with mode rb. You are right about opening it in the rb mode (flaw in the start post), but also when I do this in windows in front of every 0x0A is put a 0x0D. I found a explanation why it is working in linux it is below in my post. But what

Re: define loop statement?

2006-02-17 Thread Rene Pijlman
David Isaac: I would like to be able to define a loop statement (nevermind why) so that I can write something like loop 10: do_something instead of for i in range(10): do_something Possible? If so, how? Yes. By implementing a compiler or an interpreter for your programming language.

Re: Merging two lists of data (Pythonic way)

2006-02-17 Thread SMB
Jonathan Gardner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] codes = map(lambda x: x[0], list1) for d in list2: if d['code'] in codes: d['VERIFIED'] = 1 Is this what you were looking for? Actually, this is not exactly what I was looking for. I failed to realize what

Re: Evil, evil wxPython (and a glimmer of hope)

2006-02-17 Thread [EMAIL PROTECTED]
snoe wrote: Take a look at dabo, II think they're doing exactly what you're describing. http://blog.dabodev.com/ Dabo appear to be doing way more than what I want, with database access etc. My ideal module, when implemented, would be extremely small as far as the size of code goes. I'm using

RE: Some general questions about using stdin,stdout....

2006-02-17 Thread asdsd sir
thank you very much for your help... my big mistake,was to believe that | is the pipe symbol for both,unix and python... it is really annoying,how such a simple thing can mess things Thank you for clearing this out. _ Free blogging

Re: ANN: Release of NumPy 0.9.5

2006-02-17 Thread Travis E. Oliphant
Thomas Gellekum wrote: Travis E. Oliphant [EMAIL PROTECTED] writes: - Improvements to numpy.distutils Stupid questions: is it really necessary to keep your own copy of distutils and even install it? What's wrong with the version in the Python distribution? How can I disable the

Re: mod_python and open HTTP connection

2006-02-17 Thread grahamd
Charles wrote: Hello, I'm think about using mod_python for a project but I need to make sure: Does mod_python time out after a minute ? (I hope not). Mod_python itself doesn't time out. If such a thing happened it would be because of how Apache, some intermediate proxy or the client is

Re: define loop statement?

2006-02-17 Thread bearophileHUGS
David Isaac: I would like to be able to define a loop statement (nevermind why) so that I can write something like loop 10: do_something instead of for i in range(10): do_something Possible? If so, how? It seems that you are looking for macros; maybe Logix language

Re: Pyserial never read

2006-02-17 Thread jdhmistey
I don't know alot about python but I could help you with english? eventhough it was really good best regards- Just -- http://mail.python.org/mailman/listinfo/python-list

Re: Seaching Active Directory via ADO

2006-02-17 Thread LittlePython
I notice there is no adodb.command. This is not required? Thx for the example! Roger Upole [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here's a short example that uses ADO to search for a user by wildcard. import win32com.client c = win32com.client.Dispatch(ADODB.Connection)

Re: Open Relay Test

2006-02-17 Thread D
Nope, quite the contrary..I'm looking to write a simple program for a client of mine that will, among other things, verify that their clients' email servers do not have open relays. -- http://mail.python.org/mailman/listinfo/python-list

zope 3.2 and imprt errors

2006-02-17 Thread zunbeltz
Hi, I've installed zope3.2 froma tarball. It has been installed in /usrlocal/Zope-3-2. I am developing a package under ~/zope3instance/lib/python/ (which is my instance directory). My PYTHONPATH is:

RE: Win32_Process.Create -- not starting process

2006-02-17 Thread Tim Golden
[abcd] | Tim, | I am skipping using the batch file and only executing the python | script directly...and so far it works fine. | | So now I have: | pid, retVal = | wmi.WMI(1.2.3.4).new(Win32_Process).Create(CommandLine=c: | \python\python.exe | c:\some_script.py) | | Thanks again...not sure

embedding python in HTML

2006-02-17 Thread John Salerno
I'm hoping someone can give me the basics for how to do very simple things with Python scripts from within my HTML. For example, I know that I can do this in PHP: h1Here is a header/h1 ?php include(file.html); ?// include some external html pMore html/p So to do this with Python, do I

preserving POST data

2006-02-17 Thread Steve Young
Lets say that I'm filling out a form and the information gets sent to another server first for some processing(before the one that it "should" go to). But from there, I want that intermediate server to be able to preserve this POST data using python so it can still retrieve the page that was

Merging two lists of data (Pythonic way)

2006-02-17 Thread SMB
I have two lists of data like the following: LIST1 [[5L, 1L, 1L, 'Personal Information'], [14L, 2L, 1L, '']] LIST2 [{'code': 5L, 'name': 'First Name', 'value': [''], 'label': 'First Name', 'width': 0L, 'separator': ',', 'height': 0L, 'type': 2L, 'order': 1L}, {'code': 14L, 'name': 'Last

Re: web crawler in python or C?

2006-02-17 Thread Ravi Teja
This is following the pattern of your previous post on language choice wrt. writing a mail server. It is very common for beginers to over emphasize performance requirements, size of the executable etc. More is always good. Right? Yes! But at what cost? The rule of thumb for all your Python Vs C

Re: define loop statement?

2006-02-17 Thread Xavier Morel
Rene Pijlman wrote: David Isaac: I would like to be able to define a loop statement (nevermind why) so that I can write something like loop 10: do_something instead of for i in range(10): do_something Possible? If so, how? Yes. By implementing a compiler or an interpreter

Re: question about scope

2006-02-17 Thread Brian van den Broek
John Salerno said unto the world upon 16/02/06 09:18 AM: snip Name references search at most four scopes: local, then enclosing functions (if any), then global, then built-in. I understand what global and built-in are, and I thought I understood the concept of local too, but when I got

Re: Seaching Active Directory via ADO

2006-02-17 Thread Roger Upole
Here's a short example that uses ADO to search for a user by wildcard. import win32com.client c = win32com.client.Dispatch(ADODB.Connection) c.Open(Provider=ADSDSOObject) rs,rc=c.Execute( SELECT adspath, title, name From 'LDAP://DC=yourdomain, DC=COM' where objectClass='user' and name='Roger*' )

Re: Seaching Active Directory via ADO

2006-02-17 Thread Rudy Schockaert
You could also use the excellent active_directory module of Tim Golden (http://tgolden.sc.sabren.com/python/active_directory.html)Your query would then become: import active_directoryfor person in active_directory.search (objectClass='user',name='Roger*'): print person.displayName On 2/17/06,

Re: mod_python help!

2006-02-17 Thread Olivier
treelife a écrit : I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req): req.content_type = 'text/plain' req.write(Under Construction) return apache.OK

Re: Does python have an internal list/dictionary of functions?

2006-02-17 Thread Raymond Hettinger
[Carl J. Van Arsdall] basically we have: def functA(): ... pass functA function functA at 80db128 And what I'd like to do is: __internalFuncDict__['functA'] function functA at 80db128 globals()['functA'] -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32_Process.Create -- not starting process

2006-02-17 Thread abcd
Tim Golden wrote: BTW, I would recommend you either to use a raw string for that command line (rc:\python\python.exe c:\xx.py) or to double up your slashes (c:\\python\\python.exe c:\\xx.py). As it happens \p has no special meaning that I'm aware of, but better safe than sorry... i used

Antigen found Exceeded Internet Timeout virus

2006-02-17 Thread ANTIGEN_MAIL
Title: Antigen found Exceeded Internet Timeout virus Antigen for Exchange found Body of Message infected with Exceeded Internet Timeout virus. The file is currently Detected. The message, Re: Jython socket typecasting problems, was sent from [EMAIL PROTECTED] and was discovered in IMC

Re: Open Relay Test

2006-02-17 Thread Ben Finney
D [EMAIL PROTECTED] writes: Hi all .. how could one test to see if an open relay exists on a specific email server? Use the Distributed Sender Blackhole List service: URL:http://dsbl.org/ They have client programs to make it easy to use the service to test mail systems for

Re: embedding python in HTML

2006-02-17 Thread John Salerno
Rene Pijlman wrote: John Salerno: [Python alternative for PHP] So to do this with Python, do I simply integrate it into the HTML as above, with no extra steps? You'd need something like the PHP engine, that understands Python rather than PHP. My web server can run Python, fortunately.

Re: Databases and python

2006-02-17 Thread Dan Stromberg
On Thu, 16 Feb 2006 10:09:42 +0100, Rene Pijlman wrote: Dan Stromberg: is there a python database interface that would allow me to define a -lot- of tables? Like, each word becomes a table, and then the fields in that table are just the filenames that contained that word. Give ZODB a try.

Re: Python advocacy in scientific computation

2006-02-17 Thread Peter Tillotson
Hi, Like it - an area that doesn't come out strongly enough for me is Python's ability to drop down to and integrate with low level algorithms. This allows me to to optimise the key bits of design in python very quickly and then if I still need more poke i can drop down to low level

Re: Some general questions about using stdin,stdout....

2006-02-17 Thread Steve Holden
asdsd sir wrote: thank you very much for your help... my big mistake,was to believe that | is the pipe symbol for both,unix and python... it is really annoying,how such a simple thing can mess things Thank you for clearing this out. It is indeed annoying when assumptions we carry from

Add a month

2006-02-17 Thread novin01
Hi, this is probably a really simple question but... How do you add a month to a datetime date in python? It would be nice if you could do something like: d = datetime.date(2006,2,17) dm = datetime.timedelta(months=1) d_new = d + dm but timedelta doesn't have a 'months' setting. Am I missing

Re: mod_python and open HTTP connection

2006-02-17 Thread Charles
On Thu, 16 Feb 2006 21:35:13 -0300, Kane [EMAIL PROTECTED] wrote: btw, 'ping' as written above is horrible. If a code review turned _that_ up on production someone would be fired, along with whoever hired them, whoever ate lunch with them and anyone that waves goodbye. Really? Wow... Gotta

Does python have an internal list/dictionary of functions?

2006-02-17 Thread Carl J. Van Arsdall
Python Gurus: Let me elaborate a bit more on this question. Basically, I want to know if there is some data structure in python that maps a string function name to an address of a function or something to that nature. If this is confusing, let me describe what I want to do and see if anyone

Terminating a function

2006-02-17 Thread Astan Chee
Hi, Im rather new to threads in python but Im trying to terminate a function call (or the execution of the function) after a certain period of time has passed. Do i need to use threads with this? if i do, how do i go about doing it? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Add a month

2006-02-17 Thread Raymond Hettinger
[EMAIL PROTECTED] Hi, this is probably a really simple question but... How do you add a month to a datetime date in python? It would be nice if you could do something like: d = datetime.date(2006,2,17) dm = datetime.timedelta(months=1) d_new = d + dm but timedelta doesn't have a 'months'

  1   2   3   >