Re: import dll instead of pyd

2008-07-24 Thread jrh
Yes it is in the same directory. The problem is it does not seem to look for dll's at all. So is this by design, or am I missing something? On 25 Juli, 10:03, Nick Dumas <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Is this DLL in the same directory as your scrip

Re: Function editing with Vim throws IndentError

2008-07-24 Thread Timothy Grant
On Thu, Jul 24, 2008 at 9:32 PM, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message > <[EMAIL PROTECTED]>, > Matimus > wrote: > > > On Jul 24, 2:54 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > > central.gen.new_zealand> wrote: > >> In message > >> <[EMAIL PROTECTED]>, > >> > >> Matimus wr

2d graphics - what module to use?

2008-07-24 Thread Pierre Dagenais
What is the easiest way to draw to a window? I'd like to draw something like sine waves from a mathematical equation. Newbie to python. -- http://mail.python.org/mailman/listinfo/python-list

Questions on 64 bit versions of Python

2008-07-24 Thread python
Background: I'm going to be processing some raw transaction logs that are 30G in size. As part of this processing I may need to create some very large dictionary structures. I will be running my scripts on a version of Windows 2003 Server Enterprise Edition that supports 16G of RAM. Yes, I could us

Re: Attack a sacred Python Cow

2008-07-24 Thread s0suk3
On Jul 24, 5:01 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message > <[EMAIL PROTECTED]>, Jordan > wrote: > > > Except when it comes to Classes. I added some classes to code that had > > previously just been functions, and you know what I did - or rather, > > fo

Re: pci card adjusting

2008-07-24 Thread Tim Roberts
"Oguz Yarimtepe" <[EMAIL PROTECTED]> wrote: > >I need to adjust the dimming property of my video card. There is >currently a written application called nvclock but it is not >supporting my card right now. So i need to implement the requiered >register jobs on the card. This is already done to a deg

Re: Doubt

2008-07-24 Thread Michael Torrie
You wrote: > How to represent the loop > for ($a = $b; $a<=$c;$a++){ > } in Python As other pointed out, iterating through a list or range is often a far more elegant way to do a loop than a C-style loop. But the C-style for loop is just syntactic sugar for a while loop. In some cases, C-style f

Re: Broken examples

2008-07-24 Thread Tim Roberts
norseman <[EMAIL PROTECTED]> wrote: > >I'm only talking about IPC related. >I have googled, yahooed, and so forth for several months now. ALL >examples I've come across have failed including those pertinent in the >Python doc area. > >Outline: > cd somedir > ls -1 *.xls >thislist

object persistency, store instances relationship externally

2008-07-24 Thread King
This is a new test for object persistency. I am trying to store the relationship between instances externally. It's not working as expected. May be I am doing it in wrong way. Any suggestions? import shelve class attrib(object): pass class node(object): def __init__(self): self.

Re: Attack a sacred Python Cow

2008-07-24 Thread Kay Schluehr
On 25 Jul., 03:01, Terry Reedy <[EMAIL PROTECTED]> wrote: > Torsten Bronger wrote: > > Hallöchen! > > > And why does this make the implicit insertion of "self" difficult? > > > I could easily write a preprocessor which does it after all. > > class C(): >def f(): > a = 3 > > Inserting sel

Re: Question about inheritence

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Fredrik Lundh wrote: > Python doesn't really have constructors; when you create an object, > Python first creates the object and then calls the __init__ method, if > available That's the usual meaning of "constructor". It doesn't actually "construct" the object, it

Re: os.walk question

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Fredrik Lundh wrote: > Lanny wrote: > >> How would one make a list of the files in the top directory >> using os.walk. >> >> I need to pick a random file from said list. > > if you want a list of files from a single directory, use listdir, not > walk: > >

Re: Broken examples

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, norseman wrote: > Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, norseman >> wrote: >> >>> The OOo examples do not work. >> >> I have done OOo scripting in Python. What exactly does not work? > > soffice "-accept=socket,host=localhost,port=2002;ur

Re: Attack a sacred Python Cow

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Jordan wrote: > On Jul 24, 8:01 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: > >> In message >> <[EMAIL PROTECTED]>, >> Jordan wrote: >> >> > Except when it comes to Classes. I added some classes to code that had >> > previously just

Re: Function editing with Vim throws IndentError

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Matimus wrote: > On Jul 24, 2:54 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: >> In message >> <[EMAIL PROTECTED]>, >> >> Matimus wrote: >> > That isn't the standard. With that setup tabs will show up as 4 >> > spaces, and still confu

Re: interpreter vs. compiled

2008-07-24 Thread Tim Roberts
castironpi <[EMAIL PROTECTED]> wrote: > >Compiling a program is different than running it. A JIT compiler is a >kind of compiler and it makes a compilation step. I am saying that >Python is not a compiler and in order to implement JIT, it would have >to change that fact. And I'm saying you are w

.............................on line jobs........................................

2008-07-24 Thread muruges
we are selecting you for this online jobs. For more information see this website in this.. we are selecting you for this online jobs. For more information see this website in this.. Details ..

.............................on line jobs........................................

2008-07-24 Thread muruges
we are selecting you for this online jobs. For more information see this website in this.. we are selecting you for this online jobs. For more information see this website in this.. Details ..

.............................on line jobs........................................

2008-07-24 Thread muruges
we are selecting you for this online jobs. For more information see this website in this.. we are selecting you for this online jobs. For more information see this website in this.. Details ..

Re: Attack a sacred Python Cow

2008-07-24 Thread Benjamin
On Jul 24, 11:43 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > "explicit-is-etc" - just like the remaining of Python's zen - is a > general philosophy statement, not an absolute rule. Another quote states > that practicality beats purity. Very much so. In fact, I'd like you all to take a

Re: Your message to CMake awaits moderator approval

2008-07-24 Thread draeath
On Thu, 24 Jul 2008 18:43:34 -0400, cmake-bounces wrote: > Your mail to 'CMake' with the subject > > Status > > Is being held until the list moderator can review it for approval. > > The reason it is being held: > > Post by non-member to a members-only list > > Either the message will

Re: import dll instead of pyd

2008-07-24 Thread Nick Dumas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is this DLL in the same directory as your script? If not, is it part of your pythonpath? If neither are true, then you won't be able to import it, regardless of whether it's a good file or not. jrh wrote: > Hello, > > From previous posts and document

import dll instead of pyd

2008-07-24 Thread jrh
Hello, >From previous posts and documentation it seems python should be able to import a module that is compiled into a .dll just as well as a .pyd. I have a pyd that works fine, but after renaming it to dll the import fails. Running python with -vv flag indicates it doesn't actually look for the

Re: Is there a metacharacter to match transitions between any two of a set of non intersected char classes?

2008-07-24 Thread MRAB
On Jul 24, 6:48 pm, Peng Yu <[EMAIL PROTECTED]> wrote: > Hi, > > '\b' only match the boundary between alphanumerical char and > nonalphanumerical char. I'm wonder if there is a generic metacharacter > to match the boundary between any non intersected char set defined in > regex and its complement.

Re: file operations.

2008-07-24 Thread Terry Reedy
aditya shukla wrote: Guys thanks for your previous help .I have a doubt again My text file is :- 0\9\10\11|0.50|c:\windows\apppatch/AcLayers.dll ... now this is what happens >>> x=open("c:\\test2.txt","rb") >>> x.readline() '\n' ---? i am not able to understand why is new line charac

Re: Encoding for Devanagari Script.

2008-07-24 Thread Terry Reedy
Atul. wrote: Hello All, I wanted to know what encoding should I use to open the files with Devanagari characters. I was thinking of UTF-8 but was not sure, any leads on this? Anyone used it earlier? You cannot hurt your machine by giving that a try. This is a general comment for all beginne

Re: Attack a sacred Python Cow

2008-07-24 Thread Terry Reedy
Jordan wrote: I wish in retrospect I'd had the time, patience and focus to edit the initial post to make it more measured and less inflammatory, because its clear the tone I will ignore that. > detracts from the argument I'm making, which I feel still stands. class C(): def f(): a =

Re: Attack a sacred Python Cow

2008-07-24 Thread Terry Reedy
Torsten Bronger wrote: Hallöchen! > And why does this make the implicit insertion of "self" difficult? I could easily write a preprocessor which does it after all. class C(): def f(): a = 3 Inserting self into the arg list is trivial. Mindlessly deciding correctly whether or not t

Re: curses problem

2008-07-24 Thread Dan Stromberg
On Thu, 24 Jul 2008 21:28:24 +0200, Dariusz Malec wrote: > forgot to post the code. Server does not allow to post attachments. The > code is here http://www.kos.wsiz.rzeszow.pl/~dmalec/src.zip You might google about SIGWINCH and see where that gets you. Of course, to my great disappointment, pyt

Re: repr(string)

2008-07-24 Thread MRAB
On Jul 23, 4:04 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: > I've been saving data in a file with one line per field. > Now some of the fields may become multi-line strings... > > I was about to start escaping and unescaping linefeeds > by hand, when I realized that repr() and eval() should

Re: Confounded by Python objects

2008-07-24 Thread satoru
On Jul 24, 6:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 24, 11:59 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > tip: if you're not 100% sure why you would want to put an attribute > > on the class level, don't do it. > > The reason I did it was sort of C++ish (that's where

File operations.

2008-07-24 Thread aditya shukla
Guys i just understood the problem.Thanks for all your help Aditya -- http://mail.python.org/mailman/listinfo/python-list

Your message to CMake awaits moderator approval

2008-07-24 Thread cmake-bounces
Your mail to 'CMake' with the subject Status Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of the moderator's dec

file operations.

2008-07-24 Thread aditya shukla
Guys thanks for your previous help .I have a doubt again My text file is :- 0\9\10\11|0.50|c:\windows\apppatch/AcLayers.dll 0\9\10\11|0.50|c:\windows\apppatch/AcRedir.dll 0\9\10|0.66|c:\windows\apppatch/AcSpecfc.dll 0\9|0.83|c:\windows\apppatch/iebrshim.dll 0|0.92|c:\windows\apppatch/pcamain.sdb

Re: Gracefull application exit.

2008-07-24 Thread Cameron Simpson
On 24Jul2008 17:30, Robert Rawlins <[EMAIL PROTECTED]> wrote: | > but mind the caveats: | | Thanks Tim, the main caveat which worries me is the fact that it doesn't get | called when being killed by SIGTERM. When I look at implementing the | application as Daemon will cause complications. | The im

Re: Question about optimization

2008-07-24 Thread Jean-Paul Calderone
On Thu, 24 Jul 2008 17:19:41 -0400, Wei Hao <[EMAIL PROTECTED]> wrote: Hi: I'm pretty new to python and I have some optimization issues. I'll show you the piece of code which is causing it, with pseudo-code before it and comments. I'm accessing a gigantic table (like 15 million rows) in SQL. d

Re: Attack a sacred Python Cow

2008-07-24 Thread castironpi
On Jul 24, 11:43 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Jordan a écrit : > > >> I don't really mind, what you think about my response.  Python will suffer > >> from it as little as it will suffer from your complaints:  These things > >> will not change, whatever any of us says about t

Re: Neat way to get rid of [" "] in sys.argv[n:] returns

2008-07-24 Thread Fredrik Lundh
korean_dave wrote: python test.py "testparameter" I get this output: - ['testparameter'] Is there a way to neatly, in one call to the parameter, to get rid of the [' and '] without bothering to replace() '[ with "" and replace() '] with ''? Since you're using sl

Re: need help with introducing more traffic

2008-07-24 Thread Robert Kern
Fredrik Lundh wrote: (when do we get the ability to edit our c.l.python messages for, say, 30 minutes after they're posted? ;-) The IETF is waiting to borrow Guido's time machine for study before releasing the RFC for NNTTP (Network News Time Travel Protocol). Of course, if you have you get t

Question about optimization

2008-07-24 Thread Wei Hao
Hi: I'm pretty new to python and I have some optimization issues. I'll show you the piece of code which is causing it, with pseudo-code before it and comments. I'm accessing a gigantic table (like 15 million rows) in SQL. d is some dictionary, r is a precompiled regex string Big loop, so I searc

Re: Neat way to get rid of [" "] in sys.argv[n:] returns

2008-07-24 Thread Bruno Desthuilliers
korean_dave a écrit : so, i code this: - #!/usr/bin/python import sys import os for param in os.environ.keys(): print "%20s %s" % (param,os.environ[param]) print(os.environ['PATH']) print(sys.argv[1:]) -- and then when i type in --> pyt

www efukt com - Amazing porn video collection

2008-07-24 Thread babacity2
www efukt com . >>Best Collection of Efukt Videos<< http://vids365.com/watch.php<<< >>FREE www efukt com VIDEOS<<< . www efukt com -- http://mail.python.org/mailman/listinfo/python-list

www Efukt - Amazing porn video collection

2008-07-24 Thread babacity2
www efukt . >>Best Collection of Efukt Videos<< http://vids365.com/watch.php<<< >>FREE www efukt VIDEOS<<< . www efukt -- http://mail.python.org/mailman/listinfo/python-list

Efukt com - Amazing porn video collection

2008-07-24 Thread babacity2
efukt com . >>Best Collection of Efukt Videos<< http://vids365.com/watch.php<<< >>FREE efukt com VIDEOS<<< . efukt com -- http://mail.python.org/mailman/listinfo/python-list

Shown on efukt com - Amazing porn video collection

2008-07-24 Thread babacity2
shown on efukt com . >>Best Collection of Efukt Videos<< http://vids365.com/watch.php<<< >>FREE shown on efukt com VIDEOS<<< . shown on efukt com -- http://mail.python.org/mailman/listinfo/python-list

Peachy18 com - Amazing porn video collection

2008-07-24 Thread babacity2
peachy18 com . >>Best Collection of Peachy18 Videos<< http://vids365.com/watch.php<<< >>FREE peachy18 com VIDEOS<<< . peachy18 com -- http://mail.python.org/mailman/listinfo/python-list

Peachy18 forum - Amazing porn video collection

2008-07-24 Thread babacity2
peachy18 forum . >>Best Collection of Peachy18 Videos<< http://vids365.com/watch.php<<< >>FREE peachy18 forum VIDEOS<<< . peachy18 forum -- http://mail.python.org/mailman/listinfo/python-list

Peachy18 com - Amazing porn video collection

2008-07-24 Thread babacity4
peachy18 com . >>Best Collection of Peachy18 Videos<< http://vids365.com/watch.php<<< >>FREE peachy18 VIDEOS<<< . peachy18 com -- http://mail.python.org/mailman/listinfo/python-list

Peachy18 - Amazing porn video collection

2008-07-24 Thread babacity4
peachy18 . >>Best Collection of Peachy18 Videos<< http://vids365.com/watch.php<<< >>FREE peachy18 VIDEOS<<< . peachy18 -- http://mail.python.org/mailman/listinfo/python-list

www spankwire com - Amazing porn video collection

2008-07-24 Thread babacity4
www spankwire com . >>Best Collection of Spankwire Videos<< http://vids365.com/watch.php<<< >>FREE www spankwire VIDEOS<<< . www spankwire com -- http://mail.python.org/mailman/listinfo/python-list

www Spankwire - Amazing porn video collection

2008-07-24 Thread babacity4
www spankwire . >>Best Collection of Spankwire Videos<< http://vids365.com/watch.php<<< >>FREE www spankwire VIDEOS<<< . www spankwire -- http://mail.python.org/mailman/listinfo/python-list

www Xxxstash - Amazing porn video collection

2008-07-24 Thread babacity4
www xxxstash . >>Best Collection of Xxxstash Videos<< http://vids365.com/watch.php<<< >>FREE www xxxstash VIDEOS<<< . www xxxstash -- http://mail.python.org/mailman/listinfo/python-list

Xxxstash com - Amazing porn video collection

2008-07-24 Thread babacity4
xxxstash com . >>Best Collection of Xxxstash Videos<< http://vids365.com/watch.php<<< >>FREE xxxstash com VIDEOS<<< . xxxstash com -- http://mail.python.org/mailman/listinfo/python-list

Xxxstash - Amazing porn video collection

2008-07-24 Thread babacity4
xxxstash . >>Best Collection of Xxxstash Videos<< http://vids365.com/watch.php<<< >>FREE xxxstash VIDEOS<<< . xxxstash -- http://mail.python.org/mailman/listinfo/python-list

free sextv1 tv - Amazing porn video collection

2008-07-24 Thread babacity4
free sextv1 tv . >>Best Collection of Sextv1 Videos<< http://vids365.com/watch.php<<< >>FREE sextv1 tv VIDEOS<<< . free sextv1 tv -- http://mail.python.org/mailman/listinfo/python-list

sextv1 tv com - Amazing porn video collection

2008-07-24 Thread babacity4
sextv1 tv com . >>Best Collection of Sextv1 Videos<< http://vids365.com/watch.php<<< >>FREE sextv1 tv com VIDEOS<<< . sextv1 tv com -- http://mail.python.org/mailman/listinfo/python-list

sextv1 player - Amazing porn video collection

2008-07-24 Thread babacity4
sextv1 player . >>Best Collection of Sextv1 Videos<< http://vids365.com/watch.php<<< >>FREE sextv1 player VIDEOS<<< . sextv1 player -- http://mail.python.org/mailman/listinfo/python-list

sextv1 net - Amazing porn video collection

2008-07-24 Thread babacity4
sextv1 net . >>Best Collection of Sextv1 Videos<< http://vids365.com/watch.php<<< >>FREE sextv1 net VIDEOS<<< . sextv1 net -- http://mail.python.org/mailman/listinfo/python-list

sextv1 tv - Amazing porn video collection

2008-07-24 Thread babacity4
sextv1 tv . >>Best Collection of Sextv1 Videos<< http://vids365.com/watch.php<<< >>FREE sextv1 tv VIDEOS<<< . sextv1 tv -- http://mail.python.org/mailman/listinfo/python-list

www sextv1 pl - Amazing porn video collection

2008-07-24 Thread babacity4
www sextv1 pl . >>Best Collection of Sextv1 Videos<< http://vids365.com/watch.php<<< >>FREE www sextv1 pl VIDEOS<<< . www sextv1 pl -- http://mail.python.org/mailman/listinfo/python-list

Neat way to get rid of [" "] in sys.argv[n:] returns

2008-07-24 Thread korean_dave
so, i code this: - #!/usr/bin/python import sys import os for param in os.environ.keys(): print "%20s %s" % (param,os.environ[param]) print(os.environ['PATH']) print(sys.argv[1:]) -- and then when i type in --> python test.py "testparamet

Reading a file

2008-07-24 Thread aditya shukla
Thanks a lot guys , i got it now. Aditya -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a file

2008-07-24 Thread Gary Herron
aditya shukla wrote: I have a text file whose contents are like this:- jd|fj|dnv|jd|0.33|c:\\windows\\win32 shcbsbs|nscsjsj|0.93|hsbcjsnc I am trying to read the file like this:- >>> x = open("c:\\a.txt","r") Better to use "rb" (for binary read) rather than "r" mode. >>> x.read() Now, te

Re: Undocumented Python 2.6 change: Py_None vs NULL when C implementation raises exception

2008-07-24 Thread Martin v. Löwis
> I have no plans to track down the exact change in Python code that > caused this. There does not seem to be much point, since according to > Fredrik this seems to be an area that is practically undefined and the > M2Crypto code was clearly buggy. I see, and I agree with Fredrik's analysis. It mi

Re: Reading a file

2008-07-24 Thread Fredrik Lundh
aditya shukla wrote: I have a text file whose contents are like this:- jd|fj|dnv|jd|0.33|c:\\windows\\win32 shcbsbs|nscsjsj|0.93|hsbcjsnc I am trying to read the file like this:- >>> x = open("c:\\a.txt","r") >>> x.read() eh, wouldn't it be easier if you actually read the replies to your

Re: need help with introducing more traffic

2008-07-24 Thread Fredrik Lundh
Fredrik Lundh wrote: "load testing" other people's sites are known as something else, of course. message.replace(" are ", " is ") # do'h! (when do we get the ability to edit our c.l.python messages for, say, 30 minutes after they're posted? ;-) -- http://mail.python.org/mailman/listinfo/

Reading a file

2008-07-24 Thread aditya shukla
I have a text file whose contents are like this:- jd|fj|dnv|jd|0.33|c:\\windows\\win32 shcbsbs|nscsjsj|0.93|hsbcjsnc I am trying to read the file like this:- >>> x = open("c:\\a.txt","r") >>> x.read() the result that i get is ike this:- 'jd|fj|dnv|jd|0.33|c:windowswin32\nshcbsbs|nscsjsj

Re: need help with introducing more traffic

2008-07-24 Thread Fredrik Lundh
Diez B. Roggisch wrote: umm. are you saying that you run ruby-lang.org and want to write a stress tester in Python just for the fun of it, or are we missing something here... This: http://www.pylot.org/ Seems as if he *is* using various languages for fun... "load testing" other people's s

Re: Function editing with Vim throws IndentError

2008-07-24 Thread Matimus
On Jul 24, 2:54 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message > <[EMAIL PROTECTED]>, > > Matimus wrote: > > That isn't the standard. With that setup tabs will show up as 4 > > spaces, and still confuse you. > > Why should that be confusing? The most common

Re: curses problem

2008-07-24 Thread Dariusz Malec
forgot to post the code. Server does not allow to post attachments. The code is here http://www.kos.wsiz.rzeszow.pl/~dmalec/src.zip -- Dariusz Malec http://www.kos.wsiz.rzeszow.pl JID:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

curses problem

2008-07-24 Thread Dariusz Malec
Hi, I'm very new to python and to curses but i guess someone can help me understand the problem: I wrote a little application (attachment) and the problem is when I resize the terminal the sub-window (log window) gets wrong size (rows) and when restoring previous terminal size the window row size

Re: readln() until EOF

2008-07-24 Thread Bruno Desthuilliers
korean_dave a écrit : a = open("Thefile.txt","r") while ?: result = a.readln() I assume you meant "a.readline()" ? Anyway... what do i put in if i want to keep reading line by line until i reach the end of the file? a = open("path/to/file.ext") for line in a: do_something_wit

Re: New to Python, familiar with Perl - Seeking info sources

2008-07-24 Thread Bruno Desthuilliers
Brett Ritter a écrit : After many years happily coding Perl, I'm looking to expand my horizons. [no flames please, I'm pretty aware of Perl's strengths and weaknesses and I'm just here to learn more, not to enter religious debates]. I've gone through some of the online tutorials and I'll be brow

Re: readln() until EOF

2008-07-24 Thread Stephen Johnson
the_file = open(path, 'r') for this_line in the_file: #do stuff with this_line -Steve Johnson On Jul 24, 2008, at 3:09 PM, korean_dave wrote: a = open("Thefile.txt","r") while ?: result = a.readln() what do i put in if i want to keep reading line by line until i reach the e

readln() until EOF

2008-07-24 Thread korean_dave
a = open("Thefile.txt","r") while ?: result = a.readln() what do i put in if i want to keep reading line by line until i reach the end of the file? I don't want to break the loop if there is a blank line, because there will be. Ex. of a file: map1 result1 map2 result 2 map3 result

RE: New to Python, familiar with Perl - Seeking info sources

2008-07-24 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Brett Ritter > Sent: Thursday, July 24, 2008 9:54 AM > To: python-list@python.org > Subject: New to Python, familiar with Perl - Seeking info sources > > After many years happily coding Perl,

Re: Doubt

2008-07-24 Thread Tobiah
>> How to convert the perl notation >> $a = ""; expression in Python ? a = "" >> How to represent the loop >> for ($a = $b; $a<=$c;$a++){ >> >> } in Python for a in range(b, c + 1): do_something() ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/listinfo/pytho

Re: Attack a sacred Python Cow

2008-07-24 Thread Bruno Desthuilliers
Jordan a écrit : I don't really mind, what you think about my response. Python will suffer from it as little as it will suffer from your complaints: These things will not change, whatever any of us says about them. So this discussion unlikely to produce any new insight, especially because this

Re: need help with introducing more traffic

2008-07-24 Thread Diez B. Roggisch
Fredrik Lundh schrieb: leo davis skrev: I found this code snippet(reference http://www.goldb.org) and wish to do more with it than just send out a Http Get request.I would like to introduce more traffic -say by downloading files,crawling through all the links,logging in etc etc,and wish to se

Re: Attack a sacred Python Cow

2008-07-24 Thread Bruno Desthuilliers
Jordan a écrit : Then why do you write, let me quote: """ (snip) coding __eq__ (snip) buys you nothing from the != operator. != isn't (by default) a synonym for the negation of == (unlike in, say, every other language ever); not only will Python let you make them mean different things, without d

Re: instance comparison

2008-07-24 Thread Petite Abeille
On Jul 24, 2008, at 7:53 PM, King wrote: The the class is not subclass of another one. Problem still persist. The code is pretty huge and I am trying to post the information as clear as possible. Mark V. Shaney, from Dissociated Press, I presume? -- PA. http://alt.textdrive.com/nanoki/ -- ht

Re: instance comparison

2008-07-24 Thread Fredrik Lundh
King skrev: The the class is not subclass of another one. Problem still persist. The code is pretty huge and I am trying to post the information as clear as possible. feel free to *add* stuff to the following example until it breaks, if that's easier: >>> class Spam: ... def __init__(se

Re: instance comparison

2008-07-24 Thread King
No, The the class is not subclass of another one. Problem still persist. The code is pretty huge and I am trying to post the information as clear as possible. -- http://mail.python.org/mailman/listinfo/python-list

Is there a metacharacter to match transitions between any two of a set of non intersected char classes?

2008-07-24 Thread Peng Yu
Hi, '\b' only match the boundary between alphanumerical char and nonalphanumerical char. I'm wonder if there is a generic metacharacter to match the boundary between any non intersected char set defined in regex and its complement. For example, I have a few non intersected char sets [a-zA-Z_0-9],

Re: Python Written in C?

2008-07-24 Thread castironpi
On Jul 23, 12:10 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 23 Jul 2008 09:42:29 -0700, castironpi wrote: > > On Jul 23, 9:11 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> On Wed, 23 Jul 2008 14:10:22 +0200, mk wrote: > >> > Marc 'BlackJack' Rintsch wrote: > >>

Re: Attack a sacred Python Cow

2008-07-24 Thread Torsten Bronger
Hallöchen! Sebastian \"lunar\" Wiesner writes: > Torsten Bronger <[EMAIL PROTECTED]>: > >> Bruno Desthuilliers writes: >> >>> Torsten Bronger a écrit : >>> Bruno Desthuilliers writes: [...] Just like this. However, the compiler could add "self" to non-decorated met

Re: Attack a sacred Python Cow

2008-07-24 Thread castironpi
On Jul 24, 11:49 am, "Sebastian \"lunar\" Wiesner" <[EMAIL PROTECTED]> wrote: > Torsten Bronger <[EMAIL PROTECTED]>: > > > > > Hallöchen! > > > Bruno Desthuilliers writes: > > >> Torsten Bronger a écrit : > > >>> Bruno Desthuilliers writes: > > [...] > > How would you handle this case wit

Free Online Trading Courses - Online Trading Academy - Stock Trading ...

2008-07-24 Thread MERLIN
Free Online Trading Courses - Online Trading Academy - Stock Trading ... http://dayonlinetrading.blogspot.com _ -- http://mail.python.org/mailman/listinfo/python-list

Re: Broken examples

2008-07-24 Thread norseman
Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, norseman wrote: The OOo examples do not work. I have done OOo scripting in Python. What exactly does not work? -- http://mail.python.org/mailman/listinfo/python-list === file: z.scr -- #!/bin/bash cd

Re: Attack a sacred Python Cow

2008-07-24 Thread Bruno Desthuilliers
Torsten Bronger a écrit : Hallöchen! Bruno Desthuilliers writes: Torsten Bronger a écrit : Bruno Desthuilliers writes: [...] How would you handle this case with an implicit 'self' : class Foo(object): pass def bar(self): print self Foo.bar = bar Just like this. However, the com

Re: Attack a sacred Python Cow

2008-07-24 Thread alex23
On Jul 25, 1:39 am, Torsten Bronger <[EMAIL PROTECTED]> wrote: > I could easily write a preprocessor which does it after all. Have you considered actually doing so? That might resolve the whole issue, if a tool exists for those who want implicit self. After all, if -you- have the itch... Perhaps

Re: Attack a sacred Python Cow

2008-07-24 Thread Sebastian "lunar" Wiesner
Torsten Bronger <[EMAIL PROTECTED]>: > Hallöchen! > > Bruno Desthuilliers writes: > >> Torsten Bronger a écrit : >> >>> Bruno Desthuilliers writes: >>> [...] How would you handle this case with an implicit 'self' : class Foo(object): pass def bar(self):

Re: New to Python, familiar with Perl - Seeking info sources

2008-07-24 Thread alex23
On Jul 24, 11:53 pm, Brett Ritter <[EMAIL PROTECTED]> wrote: > My question is: What are the best sources to learn best practices or > Are there any good sources to tell me > what Perl habits are good/bad in the Python paradigm? I've never used Perl myself, so I can't comment on the quality, but th

Re: lxml, comparing nodes

2008-07-24 Thread Stefan Behnel
code_berzerker wrote: > Thanks for help. Thats inspiring, tho not exactly what I need, coz > ignoring document order is requirement (ignoring changes in order of > different siblings of the same type, etc). I plan to try something > like that: > > def xmlCmp(xmlStr1, xmlStr2): > et1 = etree.XML(

Re: repr(string)

2008-07-24 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Peter Otten <[EMAIL PROTECTED]> wrote: > David C. Ullrich wrote: > > > In article <[EMAIL PROTECTED]>, > > Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > > >> David C. Ullrich wrote: > >> > >> > I've been saving data in a file with one line per field. > >> > Now

RE: Gracefull application exit.

2008-07-24 Thread Robert Rawlins
> but mind the caveats: Thanks Tim, the main caveat which worries me is the fact that it doesn't get called when being killed by SIGTERM. When I look at implementing the application as Daemon will cause complications. The implementation looks nice and is certainly the way I would like to go, but

Re: repr(string)

2008-07-24 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > David C. Ullrich skrev: > > >> just keep in mind that using eval() on untrusted data isn't a very good > >> idea. > > > > Right. This data comes from me, gets put into a file and then > > read by me. Someone _could_ cor

Re: Gracefull application exit.

2008-07-24 Thread Tim Golden
Robert Rawlins wrote: I’m looking to implement an exit/termination process for an application which can be triggered by A) a keyboard interrupt or B) termination of the application as a Daemon using a signal. I have a whole bunch of tasks I want to perform as a cleanup before the application

Re: Python / PAMIE

2008-07-24 Thread frankrentef
On Jul 24, 10:45 am, Tim Golden <[EMAIL PROTECTED]> wrote: > frankrentef wrote: > > THNX for your response.  Based on the authors code it's very simple. > > > from cPAMIE import PAMIE > > ie=PAMIE () > > > #ie.navigate ("google.com") > > > #ie.linkClick > > #ie.textBoxSet > > #ie.writeScript > > >

Gracefull application exit.

2008-07-24 Thread Robert Rawlins
Chaps, I'm looking to implement an exit/termination process for an application which can be triggered by A) a keyboard interrupt or B) termination of the application as a Daemon using a signal. I have a whole bunch of tasks I want to perform as a cleanup before the application is terminated

  1   2   3   >