Re: calculating on matrix indices

2006-02-16 Thread Robert Kern
Brian Blais wrote: > Colin J. Williams wrote: > >> Brian Blais wrote: >> >>> 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') >>>

Re: Seaching Active Directory via ADO

2006-02-16 Thread LittlePython
Never mind , I know what's wrong ... need to use the right account. It works great and is a great example .. thx "LittlePython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Do you know what this may mean? > > C:\Documents and Settings\Administrator\Desktop\pytest>ADOSeach.py > Tr

Re: Seaching Active Directory via ADO

2006-02-16 Thread LittlePython
Do you know what this may mean? C:\Documents and Settings\Administrator\Desktop\pytest>ADOSeach.py Traceback (most recent call last): File "C:\Documents and Settings\Administrator\Desktop\pytest\ADOSeach.py", lin e 6, in ? rs,rc=c.Execute(""" File "", line 3, in Execute File "C:\Python24

Re: calculating on matrix indices

2006-02-16 Thread Brian Blais
Colin J. Williams wrote: > Brian Blais wrote: >> 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=(t>5)# <---

Re: Open Relay Test

2006-02-16 Thread Steve Holden
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? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden

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

2006-02-16 Thread Alex Martelli
<[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

Re: [Numpy-discussion] Re: calculating on matrix indices

2006-02-16 Thread Bill Baxter
Howdy,On 2/17/06, Brian Blais <[EMAIL PROTECTED]> wrote: Colin J. Williams wrote:> Brian Blais wrote:>> 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(

Re: calculating on matrix indices

2006-02-16 Thread Travis E. Oliphant
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=(t>5) > tau=5 > x[idx]=exp(-t[idx]/tau) # <-

ANN: Release of NumPy 0.9.5

2006-02-16 Thread Travis E. Oliphant
NumPy is the successor to both Numeric and Numarray. It builds from and uses code from both. More information can be found at the following links http://numeric.scipy.org http://www.scipy.org http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103 Highlights of Release:

Re: embedding python in HTML

2006-02-16 Thread Rene Pijlman
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. I've used Cheetah: http://www.cheetahtemplate.org/ Our BDFL seems to

Re: days since epoch

2006-02-16 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > hi > how can i get the number of days since epoch using the time module? > or do i have to manually do the arithmetic? Try the datetime module -- better suited to computing days, than the time module, IMHO. Alex -- http://mail.python.org/mailman/listinfo/python-lis

Re: question about scope

2006-02-16 Thread Sibylle Koczian
John Salerno schrieb: > 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 Pyt

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

2006-02-16 Thread Paul Rubin
"szabi" <[EMAIL PROTECTED]> writes: > 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) f(*a+[4]) seems to work. -- http://mail.python.org/mailman/listinfo/python-list

Re: Copying zlib compression objects

2006-02-16 Thread [EMAIL PROTECTED]
No comments? I found a small bug in TarFile.snapshot() / restore() - they need to save and restore self.inodes as well. -- http://mail.python.org/mailman/listinfo/python-list

Re: looping over more than one list

2006-02-16 Thread Dylan Moreland
> def lowest(s1,s2): > s = "" > for c1,c2 in [x for x in zip(s1,s2)]: > s += lowerChar(c1,c2) > return s > > but it's hardly any more elegant than using a loop counter, and I'm > guessing it's performance is a lot worse - I assume that the zip > operation is extra work? > > Iain

Mac OS X Installation Problem

2006-02-16 Thread Matt
Hi Everybody, 1) Does OS X have a thing like the Add/Remove Programs control panel on Windows XP? My Tiger system had Python v2.3.5 on it and I threw the files in the trash and installed v2.4.1, which is working fine as far as I can tell. However, when I type python at the command line, I get

Re: Databases and python

2006-02-16 Thread Dan Stromberg
On Wed, 15 Feb 2006 23:37:31 -0800, Jonathan Gardner wrote: > I'm no expert in BDBs, but I have spent a fair amount of time working > with PostgreSQL and Oracle. It sounds like you need to put some > optimization into your algorithm and data representation. > > I would do pretty much like you are

Re: Installing python on lynxOS

2006-02-16 Thread Donn Cave
Quoth "Bryce" <[EMAIL PROTECTED]>: | 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 libpy

Numarray - Using Integers Efficiently for Boolean Values

2006-02-16 Thread andrewfelch
Below is the code to/from Boolean arrays and Unsigned integers. On my Pentium 4, functions such as "bitwise_and" are 32 times faster when run on 32-bit integers instead of the entire-byte-consuming-Boolean. Good luck all:-) uint32Mask = numarray.array([0x0001,0x0002,0x0004,0x0008

Re: multiple inheritance

2006-02-16 Thread Thomas Girod
That's perfect. thanks. -- http://mail.python.org/mailman/listinfo/python-list

Sendmail "ok" signal?

2006-02-16 Thread Gaz
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 email is out, another screen appears with an "Ema

Re: %SystemDrive%

2006-02-16 Thread Bryan Olson
Atanas Banov wrote: > Bryan Olson wrote: > >>To get it with the \, you might use: >> >> os.path.abspath(os.environ['SYSTEMDRIVE']) > > > wrong! > the result is incorrect if the current directory is different from the > root. Oops, sorry. I should know better than to code from what I think I

Open Relay Test

2006-02-16 Thread D
Hi all .. how could one test to see if an open relay exists on a specific email server? -- http://mail.python.org/mailman/listinfo/python-list

Re: embedding python in HTML

2006-02-16 Thread John Salerno
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 that mean I need to ha

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

2006-02-16 Thread szabi
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 returns the new value, so that I could write something like thi

Pyserial never read

2006-02-16 Thread luca72
Hello at all sorry for my english but i'm Italian. I use pyserial to communicate via rs232 with an extarnal device called smartmouse. I write the exact line that i want , but when i read i read only the echo ond not the other bytes. When i meke the same project with delphi i solve this problem with

getting the line just before or after a pattern searched

2006-02-16 Thread s99999999s2003
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 and save to variables? thanks -- http://

question about scope

2006-02-16 Thread John Salerno
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 provides." I have trouble

Re: Databases and python

2006-02-16 Thread Dan Stromberg
On Thu, 16 Feb 2006 13:45:28 +, Bryan Olson wrote: > Dan Stromberg wrote: >> I've been putting a little bit of time into a file indexing engine > [...] > >> So far, I've been taking the approach of using a single-table database >> like gdbm or dbhash [...] and making each entry keyed by >> a

Re: Seaching Active Directory via ADO

2006-02-16 Thread Roger Upole
You could also accomplish the same thing using the Command object, but this way is usually more concise for plain Sql. Roger "LittlePython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I notice there is no adodb.command. This is not required? > Thx for the example! > "Ro

Re: Merging two lists of data (Pythonic way)

2006-02-16 Thread Lonnie Princehouse
You might consider writing two classes to represent the values in list1 and list2. It might be more Pythonic than sloshing around all of those lists and dictionaries. But as it is, it looks like you want to find matching pairs of lists and dictionaries from list1 and list2, respectively: # index

Queue.Queue()

2006-02-16 Thread john peter
 what happens behind the scenes when i create a Queue.Queue() without specifying a maxsize?  does a block of space gets allocated initially then dynamically "expanded" as needed?  if so, what is the default size of the initial space? is it always better to specify a big enough maxsize initially

Re: calculating on matrix indices

2006-02-16 Thread Colin J. Williams
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=(t>5)# <---this produces a Boole

calculating on matrix indices

2006-02-16 Thread Brian Blais
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=(t>5) tau=5 x[idx]=exp(-t[idx]/tau) # <---this line is wrong (gives a TypeError) #

Re: question about scope

2006-02-16 Thread John Salerno
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'?

Installing python on lynxOS

2006-02-16 Thread Bryce
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

Seaching Active Directory via ADO

2006-02-16 Thread LittlePython
I am have trouble finding a simple working example of using ADO to search Active Directory. I am hoping someone could point me to a generic working script that connects to AD and pulls up a recordset to help me get started into the right direction in learning ADO, ADSI on Python. -- http://mail

Re: Merging two lists of data (Pythonic way)

2006-02-16 Thread Paul Rubin
"SMB" <[EMAIL PROTECTED]> writes: > What I am doing is looking for a pythonic way to parse the LIST2 "code" > values and make appropriate changes to to each dictionary if the "code" > value is the first element of a list in LIST1. > > The final result may look like this given that the change is

Re: question about scope

2006-02-16 Thread Steven D'Aprano
On Thu, 16 Feb 2006 15:18:29 +, John Salerno wrote: > What's an example of a local scope without > having a function definition? Loops and if statements, perhaps? List comprehensions: [2*x+1 for x in range(50)] Lambdas: map(lambda y: y-2, [1,2,4,8,16,32]) At the moment the x in list compre

Re: Merging two lists of data (Pythonic way)

2006-02-16 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? > That is exactly what I was looking for. I will have to take a look at m

Re: embedding python in HTML

2006-02-16 Thread bruno at modulix
John Salerno wrote: > 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. >

Re: Safe Python Execution

2006-02-16 Thread gene tani
Jean-Paul Calderone wrote: > 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. > >> Basicall

Re: Is empty string cached?

2006-02-16 Thread Farshid Lashkari
> A few comments (which I hope are correct, but which I hope you will read > then mostly ignore since you probably shouldn't be designing based on > this stuff anyway): Thanks for the info Peter. My original question wasn't due to any observed performance problems. I was just being curious :)

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

2006-02-16 Thread szabi
The question was perfectly answered by Heiko Wundram: f(*(a+[4])) I know python is not a lawnmower but a programming language. I can solve a lot of problems, but I prefer short, clear and nice solutions to long and/or too powerful ones. So, my problem with my solution (b = list(a); b.append(4)) wa

mod_python and open HTTP connection

2006-02-16 Thread Charles
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). If I leave an HTTP connection open so that the content keeps loading inside the browser window indefinately, and if I close the browser window, the mod_pyth

Re: looping over more than one list

2006-02-16 Thread Tim Chase
> def lowest(s1,s2): > s = "" > for i in xrange(len(s1)): > s += lowerChar(s1[i],s2[i]) > return s > > this seems unpythonic, compared to something like: > > def lowest(s1,s2): > s = "" > for c1,c2 in s1,s2: > s += lowerChar(c1,c2) > return s If I understa

Re: looping over more than one list

2006-02-16 Thread Alex Martelli
Iain King <[EMAIL PROTECTED]> wrote: ... > This works: > > def lowest(s1,s2): > s = "" > for c1,c2 in [x for x in zip(s1,s2)]: > s += lowerChar(c1,c2) > return s > > but it's hardly any more elegant than using a loop counter, and I'm > guessing it's performance is a lot wor

Re: web crawler in python or C?

2006-02-16 Thread Steven D'Aprano
On Wed, 15 Feb 2006 21:56:52 -0800, 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 an

Re: question about scope

2006-02-16 Thread Fredrik Lundh
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 > the concept of lo

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

2006-02-16 Thread Peter Otten
szabi wrote: > 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 > returns the new value, so that I c

Re: is socket thread safe?

2006-02-16 Thread Carl J. Van Arsdall
Jean-Paul Calderone wrote: > On Wed, 15 Feb 2006 12:59:03 -0800, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> > wrote: > >> Steve Horsley wrote: >> >>> [EMAIL PROTECTED] wrote: >>> >>> thread1: while 1: buf = s.read() process(buf) threa

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

2006-02-16 Thread Diez B. Roggisch
asdsd sir wrote: > Hi!I'm new in Python and i'd like to ask some general questions about > stdin,stdout... > > Firstly... > > if we type like something like : >cat "file.txt"|python somefile.py > > #somefile.py > import sys > text=sys.stdin.read() > > > ...then "sys.stdin.read()"

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

2006-02-16 Thread Heiko Wundram
szabi wrote: > a = [1, 2, 3] > f(*a, 4) f(*(a+[4])) --- Heiko. -- http://mail.python.org/mailman/listinfo/python-list

Re: Determing whether two ranges overlap

2006-02-16 Thread Fredrik Lundh
Robin Haswell wrote: > 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. The algo needs to catch: > > (10, 20) (15, 25) > (15, 25) (10, 20) > (10, 25) (15, 20)

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

2006-02-16 Thread Dan
Hello. If you're new to Python, then input/output isn't the best place to start. Begin with the tutorial: http://docs.python.org/tut/tut.html Other documentation is also linked to from there. However, I will briefly answer your questions. > print "hello"|sys.stdin.read() In Python the | ope

Re: How to run shell commands within python

2006-02-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > (also note that most trivial shell commands are better done in > python. most uses of cat, for example, can be trivially emulated > with one or two lines of python...) Though the knowledge required to do this may be mo

Re: is socket thread safe?

2006-02-16 Thread Carl J. Van Arsdall
Bryan Olson wrote: > Carl J. Van Arsdall wrote: > >> Steve Horsley wrote: >> >> >>> [EMAIL PROTECTED] wrote: >>> >>> >>> thread1: while 1: buf = s.read() process(buf) thread2: while 1: buf = getdata()

RE: Determing whether two ranges overlap

2006-02-16 Thread Tim Golden
[Robin Haswell] | 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. The algo needs to catch: | | (10, 20) (15, 25) | (15, 25) (10, 20) | (10, 25) (15, 2

Re: question about scope

2006-02-16 Thread Fuzzyman
John Salerno wrote: [snip..] > > Thanks guys. It seems like nested functions were what the authors had in > mind, so that makes a lot more sense now. > > But as far as ifs and loops, is there such a thing as scope in them? For > example, if I assign a variable within an if statement, is it usable

Re: Determing whether two ranges overlap

2006-02-16 Thread Steven D'Aprano
On Thu, 16 Feb 2006 15:22:15 +, 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. The algo needs to catch: > > (10, 2

Re: Safe Python Execution

2006-02-16 Thread Alex Martelli
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 to do. > I've written a small amount of code to get custom interprete

Determing whether two ranges overlap

2006-02-16 Thread Robin Haswell
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. The algo needs to catch: (10, 20) (15, 25) (15, 25) (10, 20) (10, 25) (15, 20) and (15, 20) (10, 25) I

[ANN] Pydev and Pydev Extensions 1.0.2 release

2006-02-16 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 available

Re: MySQL

2006-02-16 Thread rodmc
Hi Wolfram, Thanks for the tip, after some server issues I am pleased to say the library appears to work perfectly with MySQL 5. Best, rod -- http://mail.python.org/mailman/listinfo/python-list

Re: Is empty string cached?

2006-02-16 Thread Peter Hansen
Farshid Lashkari wrote: > However, the following commands add to my confusion: > > >> a = 'wtf?' > >> b = 'wtf?' > >> a is b > False > > So how are string literals cached? Is there an explanation somewhere? Is > it some freaky voodoo, and I should just assume that a string literal > will alw

Re: ANN: FreeImagePy 1.2.2

2006-02-16 Thread Michele Petrazzo
Claudio Grondi wrote: > Knowing some details about PIL and as good as no details about > FreeImage, I would like in this context to become enlightened by the > answer to the question, when does it make sense to use FreeImage > instead of PIL? Into some little environments, like tiff with G3/G4

Re: looping over more than one list

2006-02-16 Thread EleSSaR^
Iain King si è profuso/a a scrivere su comp.lang.python tutte queste elucubrazioni: [cut] I think you should take a look at the zip() function. You can use for with it like this: for elem1, elem2, elem3 in zip(list1, list2, list3): -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dal

Re: Encryption

2006-02-16 Thread Larry Bates
dirvine wrote: > HI hope you can help (know you can). > > I am looking for a very strong AIS or better symetrical encryption in > python. Any suggestions ideas welcome. I have spent a lot of time > looking everywhere at pycrypto and many others but is a wee bit of a > minefield out there. Anyone h

Re: ANN: FreeImagePy 1.2.2

2006-02-16 Thread Szabolcs Nagy
eg.: .dds (compressed texture file format) widely used in 3d games but not accessible in pil -- http://mail.python.org/mailman/listinfo/python-list

Installing packages in /usr/local

2006-02-16 Thread Torsten Bronger
Hallöchen! I use the Suse 10.0 RPM of Python 2.4. Unfortunately, it doesn't seem to look for packages in /usr/local because "prefix" and "exec_prefix" in site.py are the same (namely usr/). I have my own packages in /usr/local/lib/python/site-packages. (Due to easier backup, I don't want to cha

Re: Visual Report Editor

2006-02-16 Thread Paul McNett
Pawel wrote: > I plan to make Visual Reporting Editior, a new product for > corporate-class systems. Data will be in XML and in my application, > designer should be able to make fascinating templates of reports. I > will use Python and MSVS 2005 Pro. My question is, which libaries will > be useful

Re: Win32_Process.Create -- not starting process

2006-02-16 Thread 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 why when using the batch

Some general questions about using "stdin","stdout"....

2006-02-16 Thread asdsd sir
Hi!I'm new in Python and i'd like to ask some general questions about stdin,stdout... Firstly... if we type like something like : cat "file.txt"|python somefile.py #somefile.py import sys text=sys.stdin.read() ...then "sys.stdin.read()" will read from "cat"s stdout... However,if i

looping over more than one list

2006-02-16 Thread Iain King
When I loop over one list I use: for item in items: print item but often I want to loop through two lists at once, and I've been doing this like I would in any other language - creating an index counter and incrementing it. For example, (completely arbitrary), I have two strings of the same l

Re: ANN: FreeImagePy 1.2.2

2006-02-16 Thread Andrew Gwozdziewycz
> Knowing some details about PIL and as good as no details about > FreeImage, I would like in this context to become enlightened by the > answer to the question, when does it make sense to use FreeImage instead > of PIL? > From what I know up to now I can't see any use for FreeImage :-( . both fr

Re: web crawler in python or C?

2006-02-16 Thread Andrew Gwozdziewycz
On 15 Feb 2006 21:56:52 -0800, abhinav <[EMAIL PROTECTED]> wrote: > Hi guys.I have to implement a topical crawler as a part of my > project.What language should i implement > C or Python? Why does this keep coming up on here as of late? If you search the archives, you can find numerous posts about

[ANN] pyqonsole-0.2.0

2006-02-16 Thread Alexandre Fayolle
Logilab has released pyqonsole-0.2.0 Pyqonsole is a X Window terminal written in Python. The code is based on konsole, and it uses the Qt toolkit. It is mainly meant for use by Python application developpers who would like to embed a terminal in their application, but it can be used as a not blazi

Re: ANN: FreeImagePy 1.2.2

2006-02-16 Thread Claudio Grondi
Michele Petrazzo wrote: > FreeImagePy 1.2.2 is available at freeimagepy.sf.net > > What is? > It' a python wrapper for FreeImage, Open Source library for developers >who would like to support popular graphics image formats. > > How work? > It use a binary freeimage library present on the

mod_python help!

2006-02-16 Thread treelife
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 Here is some other relevant

Re: Visual Report Editor

2006-02-16 Thread Michele Petrazzo
Pawel wrote: > Hello, Hi Pawel, > I plan to make Visual Reporting Editior, a new product for > corporate-class systems. Data will be in XML and in my application, > designer should be able to make fascinating templates of reports. I > will use Python and MSVS 2005 Pro. What are MSVS 2005 Pro

Re: any ftpd written in python?

2006-02-16 Thread Jean-Paul Calderone
On Thu, 16 Feb 2006 14:07:55 +0800, Kenneth Xie <[EMAIL PROTECTED]> wrote: >I need a simple ftpd example in pure python. Is there already such a >ftpd available? >Thank you very much in advance. Twisted includes an FTP server: [EMAIL PROTECTED]:~$ mkdir a a/b a/c a/d [EMAIL PROTECTED]:~$ mkta

Re: Embedding an Application in a Web browser

2006-02-16 Thread Paul Boddie
Atanas Banov wrote: > paron wrote: > > I forgot -- I like the idea of Kerrigell, too. It runs on top of > > CherryPy, and lets you use python either in the server (which is just a > > little program on your local machine) or embedded in the html pages, or > > in a Kerrigell service, which is an app

OT- wxPython mailing list problems

2006-02-16 Thread Franz Steinhaeusler
Sorry about asking here, but has anyone experienced, that no message can be sent to the mailing list? Neither with Gmane, nor with Google mail. I always get this reply: from [EMAIL PROTECTED] """ Hi. This is the qmail-send program at sunsite.dk. I'm afraid I wasn't able to deliver your messag

Re: Visual Report Editor

2006-02-16 Thread Diez B. Roggisch
Pawel wrote: > Hello, > I plan to make Visual Reporting Editior, a new product for > corporate-class systems. Data will be in XML and in my application, > designer should be able to make fascinating templates of reports. I > will use Python and MSVS 2005 Pro. My question is, which libaries will >

Re: web crawler in python or C?

2006-02-16 Thread gene tani
abhinav wrote: > Hi guys.I have to implement a topical crawler as a part of my > project.What language should i implement Oh, and there's some really good books out there, besides the Orilly Spidering Hacks. Springer Verlag has a couple books on "Text Mining" and at least a couple books with "we

Re: Databases and python

2006-02-16 Thread Bryan Olson
Dan Stromberg wrote: > I've been putting a little bit of time into a file indexing engine [...] > So far, I've been taking the approach of using a single-table database > like gdbm or dbhash [...] and making each entry keyed by > a word, and under the word in the database is a null terminated list

Re: web crawler in python or C?

2006-02-16 Thread gene tani
Paul Rubin wrote: > "abhinav" <[EMAIL PROTECTED]> writes: > > maintaining huge data structures.What should be the language so as > > not to compromise that much on speed.What is the performance of > > python based crawlers vs C based crawlers.Should I use both the > > languages(partly C and pytho

Visual Report Editor

2006-02-16 Thread Pawel
Hello, I plan to make Visual Reporting Editior, a new product for corporate-class systems. Data will be in XML and in my application, designer should be able to make fascinating templates of reports. I will use Python and MSVS 2005 Pro. My question is, which libaries will be useful in my job. I pla

Re: MySQL

2006-02-16 Thread Wolfram Kraus
rodmc wrote: > I need to write a Python application which connects to a MySQL 5.0 > database. Can anyone point me in the right direction or a compatible > library? > > Best, > > rod > See http://sourceforge.net/projects/mysql-python HTH, Wolfram -- http://mail.python.org/mailman/listinfo/pyt

MySQL

2006-02-16 Thread rodmc
I need to write a Python application which connects to a MySQL 5.0 database. Can anyone point me in the right direction or a compatible library? Best, rod -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding an Application in a Web browser

2006-02-16 Thread paron
>From the OP: As for the application it has to be able display simple animated graphics such as circles, lines and squares. However if someone clicks on a shape it should open up another application, such as Word. Thanks, Rod Python Newbie The application itself can sit on the local users compu

Re: Excel and TrackChanges

2006-02-16 Thread pierre_py
If i move the Save after the HighlightChangesOptions it will popup a message saying it can only be used when workbook is saved. The problem is actually not only in python, i figured out that the samples in msdn (which do the same) don't work in VBA also (if i give my macros a shortcut). I have no

Re: apache mod_python problem

2006-02-16 Thread Ido Yehieli
please ignore that last message, the instructions on that webpage worked, it was my fault. Thanks, Ido. -- http://mail.python.org/mailman/listinfo/python-list

Extend/embedd python problem?

2006-02-16 Thread Mile Blenton
Hello all, I am considering python as a 'scripting' language to be used in my application where users must be able to write their own code to access application data, use the application mechanisms to gather various data and basicly must be able to control the application itself. Currently, to

Re: any ftpd written in python?

2006-02-16 Thread garabik-news-2005-05
Kenneth Xie <[EMAIL PROTECTED]> wrote: > I need a simple ftpd example in pure python. Is there already such a > ftpd available? > Thank you very much in advance. self-advertising: http://melkor.dnp.fmph.uniba.sk/~garabik/pyftpd.html it is a bit dated and I do not develop it anymore, but as a base

Re: apache mod_python problem

2006-02-16 Thread Ido Yehieli
Hi Graham, thank you for that link but it didn't help. I've followed the instructions, yet In the 'basic-content-handler' section, after getting to the point where it says to add this to the main Apache configuration file: AllowOverride FileInfo I replaced /some/directory with the correct direc

Re: web crawler in python or C?

2006-02-16 Thread Paul Rubin
"abhinav" <[EMAIL PROTECTED]> writes: > It is DSL broadband 128kbps.But thats not the point. But it is the point. > What i am saying is that would python be fine for implementing fast > crawler algorithms or should i use C.Handling huge > data,multithreading,file handling,heuristics for ranking,a

Re: multiple inheritance

2006-02-16 Thread Thomas Girod
thanks, you pointed exactly on what distrurbed me. I'll see what I can do with cooperative methods. -- http://mail.python.org/mailman/listinfo/python-list

pymssql and date format

2006-02-16 Thread eight02645999
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 the correct date format? thanks

Re: multi/double dispatch, multifunctions once again

2006-02-16 Thread bruno at modulix
AndyL wrote: > Hi, (OT : please repeat the question in the body of the post...) > Where I can find a module supporting that? http://peak.telecommunity.com/DevCenter/PyConGenericFunctions -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL

  1   2   >