An algorithm problem

2006-05-30 Thread Bo Yang
Hi , I have writen a python program to slove a problem described as below: (Forgive my poor English !) Put the 2^n 0 or 1 to form a ring , and we can select any continuous n ones from the ring to constitute a binary number . And obviously we can get 2^n selections , so the question is : Given a n

Re: genexp performance problem?

2006-05-30 Thread Fredrik Lundh
Giovanni Bajo wrote: > > I found this strange: > > > > python -mtimeit "sum(int(L) for L in xrange(3000))" > > 100 loops, best of 3: 5.04 msec per loop > > > > python -mtimeit "import itertools; sum(itertools.imap(int, xrange(3000)))" > > 100 loops, best of 3: 3.6 msec per loop > > > > I

Re: genexp performance problem?

2006-05-30 Thread Fredrik Lundh
Giovanni Bajo wrote: > I found this strange: > > python -mtimeit "sum(int(L) for L in xrange(3000))" > 100 loops, best of 3: 5.04 msec per loop > > python -mtimeit "import itertools; sum(itertools.imap(int, xrange(3000)))" > 100 loops, best of 3: 3.6 msec per loop > > I thought the two construc

Re: Watching serial port activity.

2006-05-30 Thread Sergei Organov
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2006-05-30, TheSeeker <[EMAIL PROTECTED]> wrote: > >> Have you looked into slsnif >> (http://www.dakotacom.net/~ymg/software.html) > > FYI, slsnif won't work for any serial program that needs to use > parity, 7 data bits, or any of the modem control/s

ideas for programs?

2006-05-30 Thread Brandon McGinty
Hi, I've been learning python for the past couple of months and writing misc scripts here and there, along with some web apps. I'm wondering if anyone has ideas of programs I might try my hand at making? I'd appreciate it if they don't use images, because I'm blind. Also, I'm thinking of hiring m

Re: shuffling elements of a list

2006-05-30 Thread greenflame
Thank you all for all of your help. Also I got the shuffle function to work. Do not worry I will be back soon with more shuffling! However, I do not quite understand this DSU that you mention, although it looks useful. -- http://mail.python.org/mailman/listinfo/python-list

Re: shuffling elements of a list

2006-05-30 Thread Scott David Daniels
greenflame wrote: > Zhang Fan wrote: >> ... The random module has a `shuffle' method. It "Shuffle the sequence x >> in place". It may be help for you > > I am sorry but this does not help much. In my version of python (2.3) > this method does not seem to exist. Also from the documentation, it >

Re: shuffling elements of a list

2006-05-30 Thread John Machin
On 31/05/2006 1:18 PM, greenflame wrote: > I would like to make a function that takes a list, more specificaly a > list of strings, and shuffles its elements, like a pile of cards. The > following is a script I tryed to make that implements pile shuffling. > In general, if you can't see why Pytho

Re: shuffling elements of a list

2006-05-30 Thread Ben Finney
"greenflame" <[EMAIL PROTECTED]> writes: > I would like to make a function that takes a list, more specificaly a > list of strings, and shuffles its elements, like a pile of cards. Sounds like a job for (ta-da-daa) DSU[0]. That said, here are some comments on your implementation. > -- >

Re: shuffling elements of a list

2006-05-30 Thread greenflame
Zhang Fan wrote: > On 30 May 2006 20:18:19 -0700, greenflame <[EMAIL PROTECTED]> wrote: > > Second of all, I would like to have > > other methods of shuffling, prefererably riffle shuffling and just > > plain randomly arranging the elements of the list. > > The random module has a `shuffle' method.

Tktable, WinXP and ActiveState Python 2.4.3,x

2006-05-30 Thread jerry . levan
Hi, I have a python app that runs fine on MacOS X and Fedora Core 5. This evening I dragged the folder over to my windows partition and tried to run the rascal. The program starts up fine but at the first call to create a Table object I get Traceback (most recent call last): File "C:\Python24\

Re: shuffling elements of a list

2006-05-30 Thread Zhang Fan
On 30 May 2006 20:18:19 -0700, greenflame <[EMAIL PROTECTED]> wrote: > Second of all, I would like to have > other methods of shuffling, prefererably riffle shuffling and just > plain randomly arranging the elements of the list. The random module has a `shuffle' method. It "Shuffle the sequence

shuffling elements of a list

2006-05-30 Thread greenflame
I would like to make a function that takes a list, more specificaly a list of strings, and shuffles its elements, like a pile of cards. The following is a script I tryed to make that implements pile shuffling. -- testdeck = list('qwertyuiop') def pileshuffle(DECK, NUMPILES): """Split

RE: genexp performance problem?

2006-05-30 Thread Delaney, Timothy (Tim)
Kent Johnson wrote: > Reusing the generator doesn't give a correct answer; after the first > sum() the generator is exhausted: Duh - good point. I forgot it was returning a generator object, not generator function. Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: genexp performance problem?

2006-05-30 Thread Kent Johnson
Delaney, Timothy (Tim) wrote: > python -mtimeit "sum(int(L) for L in xrange(3000))" > 100 loops, best of 3: 6.76 msec per loop > > python -mtimeit -s "g = (int(L) for L in xrange(3000))" "sum(g)" > 100 loops, best of 3: 1.09 usec per loop > > The generator comprehension needs to create a new

Re: TIming

2006-05-30 Thread John Bokma
WIdgeteye <[EMAIL PROTECTED]> wrote: > BTW in the time it took me NOT to get an answer for my question in > this so called Python NG, I figured it out for myself. Maybe you want to post the solution in order to help others with similar problems in the future? -- John

Re: TIming

2006-05-30 Thread John Machin
On 31/05/2006 5:50 AM, WIdgeteye wrote: > > This PYTHON NG blows to high heaven. Whats worse, the answers I got were > most likely from people who know SQUAT about Python scripting. That's why > they gave me such lame [expletive deleted] answers. > > Idiots. Kindly refer back to your post of

RE: interactive programme (voice)

2006-05-30 Thread John Bokma
"Bell, Kevin" <[EMAIL PROTECTED]> wrote: > http://www.cs.unc.edu/~parente/tech/tr02.shtml Thanks! -- John MexIT: http://johnbokma.com/mexit/ personal page: http://johnbokma.com/ Experienced programmer available: http://c

Re: how to print newline in xml?

2006-05-30 Thread John Bokma
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > which is already not very readable - but it becomes even worse along > with increasing number of comments How about: armar3 : : XML editor + xpath makes this way more easier to use by humans compared to normal comments. Also, if yo

RE: genexp performance problem?

2006-05-30 Thread Delaney, Timothy (Tim)
Giovanni Bajo wrote: > python -mtimeit "sum(int(L) for L in xrange(3000))" > 100 loops, best of 3: 5.04 msec per loop > > python -mtimeit "import itertools; sum(itertools.imap(int, > xrange(3000)))" 100 loops, best of 3: 3.6 msec per loop > > I thought the two constructs could achieve the same s

genexp performance problem?

2006-05-30 Thread Giovanni Bajo
Hello, I found this strange: python -mtimeit "sum(int(L) for L in xrange(3000))" 100 loops, best of 3: 5.04 msec per loop python -mtimeit "import itertools; sum(itertools.imap(int, xrange(3000)))" 100 loops, best of 3: 3.6 msec per loop I thought the two constructs could achieve the same speed.

Try/Except for ADSI GetObject

2006-05-30 Thread LittlePython
I am a little confused on why I can not detect an object that does not exist with a try and except. If I understand ADSI correctly from what I have read you do not create these objects but rather get them. They already exist. I believe if I do the equivalent in VB I would generate an error when I t

Re: stupid perl question

2006-05-30 Thread John Machin
On 31/05/2006 5:55 AM, Jorgen Grahn wrote: > On Sat, 27 May 2006 11:11:40 +1000, John Machin <[EMAIL PROTECTED]> wrote: > ... >> Yes, you could write out the whitespace characters for the 8-bit >> encoding of your choice, or you could find them using Python (and get >> some possibly surprising an

F2G bug (was Re: How to calc easier the "long" filesize from nFileSizeLow and nFileSizeHigh)

2006-05-30 Thread John Machin
On 30/05/2006 1:55 PM, Roger Upole *top-posted*: > Shift nFileSizeHigh by 32 and add FileSizeLow. Uh-ohh. Here we have yet another manifestation of the Y2K bug's little sibling, the F2G bug. The above doesn't work for 2GB <= filesize < 4GB, 6GB <= filesize < 8GB, etc. See below. > > Rog

Re: Dr. Dobb's Python-URL! - weekly Python news and links (May 30)

2006-05-30 Thread Fuzzyman
Cameron Laird wrote: > QOTW: "Making a user class work anywhere you can put a mapping in Perl is > deep magic, but easy in Python. Creating types that act like files and can be > used wherever a file is used is SOP in Python; I'm not even sure it's > possible in Perl (probably is, but it's again

Re: Strange behavior with iterables - is this a bug?

2006-05-30 Thread [EMAIL PROTECTED]
DOH!! thanks a lot. had to be something stupid on my part. Now I get it :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange behavior with iterables - is this a bug?

2006-05-30 Thread Gary Herron
[EMAIL PROTECTED] wrote: >Ok, I am confused about this one. I'm not sure if it's a bug or a >feature.. but > > List comprehension is a great shortcut, but when the shortcut starts causing trouble, better to go with the old ways. You need to reopen each file each time you want to iterate throu

Re: TIming

2006-05-30 Thread jack2004fb
You can try this EnergyKey http://www30.webSamba.com/SmartStudio This may be help you. Now I always use EnergyKey, it helps me so much in my work. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Philip Smith
Whoops Should have been http://www.python.pwp.blueyonder.co.uk/ Thanks Phil "Philip Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Just to announce that I have posted an experimental version of MPQS which > I am hoping those of a mathematical turn of mind would care to

Re: Watching serial port activity.

2006-05-30 Thread nikie
xkenneth wrote: > Hi, > >I'm writing a couple python applications that use the serial port > (RS-232) quite extensively. Is there any way I can monitor all activity > on the serial port and have it printed as the transactions occur? I'm > trying to reverse engineer a microcontroller serial rou

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Scott David Daniels wrote: >> Sorry, "re-iterables". A file re-iterable is: >> >> class FileReIterable(object): ... >> def __iter__(self): >> self.file.seek(0) >> return iter(self.file) >> >> This works if-and-only-if it is only in

Re: "initializer element is not constant"

2006-05-30 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > When trying to compile python extensions written in C using "python > setup.py build" on cygwin I get the following error: > > foo.c: initializer element is not constant > foo.c: error: (near initialization for `FooType.ob_type') > > I remember someone telling me a long

how to print newline in xml?

2006-05-30 Thread [EMAIL PROTECTED]
I currently use xml.dom.minidom and ext to create a dom-tree which I would write to an xml-file. My intention is to create something like this: but I didn't find any possibility either to put comment directly behind a tag nor did I found how to put a new line like in example betw

Re: Watching serial port activity.

2006-05-30 Thread nikie
xkenneth wrote: > Hi, > >I'm writing a couple python applications that use the serial port > (RS-232) quite extensively. Is there any way I can monitor all activity > on the serial port and have it printed as the transactions occur? I'm > trying to reverse engineer a microcontroller serial rou

RE: interactive programme (voice)

2006-05-30 Thread Bell, Kevin
http://www.cs.unc.edu/~parente/tech/tr02.shtml loads of fun. -- http://mail.python.org/mailman/listinfo/python-list

Re: Way to get an array of latitude/longitude points (tuples) from a trip

2006-05-30 Thread Diez B. Roggisch
kbperry schrieb: > I am not sure if this is the right place for this, but I thought it was > worth a shot. > > What I want: > Enter a From: street address and a To: street address, and then specify > > an interval (say every half mile). Then, I click a submit button, and > it gives me latitude a

Re: Strange behavior with iterables - is this a bug?

2006-05-30 Thread Inyeol Lee
On Tue, May 30, 2006 at 01:11:26PM -0700, [EMAIL PROTECTED] wrote: [...] > >>> RESTART > >>> f1 = open('word1.txt') > >>> f2 = open('word2.txt') > >>> f3 = open('word3.txt') > >>> print [(i1.strip(),i2.strip(),i3.strip(),) for i1 in f1 for i2 in f2 for > >>> i3 in

Re: logging

2006-05-30 Thread ibr
Hello Vinay, On Tue, May 30, 2006 at 09:13:25AM -0700, Vinay Sajip wrote: > [snip] > > [handlers] > > keys=console > [snip] > > [logger_root] > > level=CRITICAL > > handlers=console > > > > [logger_l01] > > level=DEBUG > > qualname=l01 > > handlers=console > > > > [logger_l02] > > level=CRITICAL >

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread [EMAIL PROTECTED]
Scott David Daniels wrote: > Sorry, "re-iterables". A file re-iterable is: > > class FileReIterable(object): > def __init__(self, file): > if isinstance(file, basestring): > self.file = open(file, 'rU') > else: > self.file

Re: interactive programme (voice)

2006-05-30 Thread Bruno Desthuilliers
nigel a écrit : > hi i have wrote an interactive programme,this is a small section of it. > #This is my first programme writing in python > s = raw_input ("hello what's your name? ") > if s=='carmel': >print "Ahh the boss's wife" > if s=='melvyn': > print "your the boss's dad" > if s=='rebe

Re: Strange behavior with iterables - is this a bug?

2006-05-30 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok, I am confused about this one. I'm not sure if it's a bug or a > feature.. but > RESTART f1 = open('word1.txt') f2 = open('word2.txt') f3 = open('word3.txt') print [(i1.stri

Re: create a text file

2006-05-30 Thread Max Erickson
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Max Erickson wrote: > >>> # w is for writing >>> myfile = open('theoutfile',w) >> >> That won't work, the second argument to open needs to be a string: > > w = 'w' > > > Is it inappropriate to call the w on the left side of the equal's sign a stri

Re: os.time()

2006-05-30 Thread Steve Holden
Diez B. Roggisch wrote: > Anthony wrote: > > >>i have a problem with the os.times() command, on different Python >>versions, i get different printout: > > > >>and on the 3 servers, the linux command: $date >>returns the same value. >> >>any suggestions??? >>what is the command that gives m

Re: TIming

2006-05-30 Thread Scott David Daniels
WIdgeteye wrote: > Thank you very much for your participation. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Scott David Daniels wrote: > >> This works with "iterables" (and produces), rather than "iterators", >> which is vital to the operation. >> >> --Scott David Daniels >> [EMAIL PROTECTED] > > Sorry, it doesn't. It works with strings. It doesn't work with file, > it does

"initializer element is not constant"

2006-05-30 Thread emin . martinian
When trying to compile python extensions written in C using "python setup.py build" on cygwin I get the following error: foo.c: initializer element is not constant foo.c: error: (near initialization for `FooType.ob_type') I remember someone telling me a long time ago that this had something to do

interactive programme (voice)

2006-05-30 Thread nigel
hi i have wrote an interactive programme,this is a small section of it. #This is my first programme writing in python s = raw_input ("hello what's your name? ") if s=='carmel': print "Ahh the boss's wife" if s=='melvyn': print "your the boss's dad" if s=='rebecca': print "you must be the

Strange behavior with iterables - is this a bug?

2006-05-30 Thread [EMAIL PROTECTED]
Ok, I am confused about this one. I'm not sure if it's a bug or a feature.. but >>> RESTART >>> f1 = open('word1.txt') >>> f2 = open('word2.txt') >>> f3 = open('word3.txt') >>> print [(i1.strip(),i2.strip(),i3.strip(),) for i1 in f1 for i2 in f2 for i3 >>> in f3]

Re: hyperthreading locks up sleeping threads

2006-05-30 Thread OlafMeding
Update The problem turned out to be the BIOS of the PC we were using. The Python test program has been running fine for 5 days now (after we upgraded the system BIOS) and is still running fine. Sorry, I do not have any information as to what was fixed in the BIOS. Also, I do not know exactly who

Re: TIming

2006-05-30 Thread Jean-Paul Calderone
On Tue, 30 May 2006 14:50:38 -0500, WIdgeteye <[EMAIL PROTECTED]> wrote: > > [snip] > >This PYTHON NG blows to high heaven. Whats worse, the answers I got were >most likely from people who know SQUAT about Python scripting. That's why >they gave me such lame fucking answers. > >Idiots. While that

Re: stupid perl question

2006-05-30 Thread Jorgen Grahn
On Sat, 27 May 2006 11:11:40 +1000, John Machin <[EMAIL PROTECTED]> wrote: ... > Yes, you could write out the whitespace characters for the 8-bit > encoding of your choice, or you could find them using Python (and get > some possibly surprising answers): > > >>> mkws = lambda enc, sz=256: "".join

Re: TIming

2006-05-30 Thread WIdgeteye
On Tue, 30 May 2006 16:15:44 +1000, John McMonagle wrote: > Tue, 2006-05-30 at 00:23 -0500, WIdgeteye wrote: >> On Tue, 30 May 2006 04:34:03 +, Tim Roberts wrote: >> >> > WIdgeteye <[EMAIL PROTECTED]> wrote: >> >>HI, >> >>I am trying to write a little program that will run a program on >> >>s

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread [EMAIL PROTECTED]
Scott David Daniels wrote: > This works with "iterables" (and produces), rather than "iterators", > which is vital to the operation. > > --Scott David Daniels > [EMAIL PROTECTED] Sorry, it doesn't. It works with strings. It doesn't work with file, it doesn't work with iterators I have created.

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread [EMAIL PROTECTED]
This would only work for combinations of identical sets, and also does not seem to work with generated sets, or iterators. Forgetting dice for a moment. Say I have 3 very long files, and i want to generate the combinations of lines in the files. This provides a well known iterator for the exampl

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > However, none of the algo's I have checked will work with generated > sequences, or iterable classes, as posited in my first post. > > While appropriate to the current domain, ie dice. What if you want > combinations of extrememely large lists, say 3 sets of 10 mil item

Re: saving settings

2006-05-30 Thread SuperHik
Diez B. Roggisch wrote: > Grant Edwards wrote: > > >> Documents and settings aren't quite the same thing, but it's a >> valid point. >> >>> Especially not the ones you wrote on that other machine. >>> >>> Seriously: Who is going to copy a executable around? >> I do. I copy putty.exe around all o

Re: Watching serial port activity.

2006-05-30 Thread Grant Edwards
On 2006-05-30, Cameron Laird <[EMAIL PROTECTED]> wrote: >>If you feel like building a kernel, adding a few printk() calls >>to either the low-level serial driver or the tty >>line-discipline layer might do what you want. > . > . > .

Dr. Dobb's Python-URL! - weekly Python news and links (May 30)

2006-05-30 Thread Cameron Laird
QOTW: "Making a user class work anywhere you can put a mapping in Perl is deep magic, but easy in Python. Creating types that act like files and can be used wherever a file is used is SOP in Python; I'm not even sure it's possible in Perl (probably is, but it's again deep magic)." - Mike Meyer ".

Re: Watching serial port activity.

2006-05-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, I confused matters with: > . > . > . >!? I hadn't realized there's no such monitor ... What do you >think of http://wiki.tcl.tk/moni >? Ugh. Please ignore, all; this was a first draft of what was

Re: John Bokma harassment

2006-05-30 Thread John Bokma
[EMAIL PROTECTED] wrote: > I don't get the MySpace OMG reference, but rest assured John, you are > still my favorite > newsnet nazi. I know you have been feeling pretty insecure about this > Xah fellow, but Funny that someone diagnosing insecurity needs to refer to Nazi's in an attempt to promot

Re: John Bokma harassment

2006-05-30 Thread John Bokma
Max M <[EMAIL PROTECTED]> wrote: > John Bokma wrote: >> [EMAIL PROTECTED] wrote: > >> Your first question should be: Is it alright that Xah harasses 5 >> newsgroups? Or maybe work on your spelling, harass is with one r, but >> maybe you didn't read the subject, which wouldn't amaze me, since yo

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > > > Well thanks for the mathematical restatement of my problem. I had > forgotten the proper terms. Searching on those terms generates some > interesting results. > > However, none of the algo's I have checked will work with generated > sequences, or iterable classe

Re: iterator? way of generating all possible combinations?

2006-05-30 Thread [EMAIL PROTECTED]
Well thanks for the mathematical restatement of my problem. I had forgotten the proper terms. Searching on those terms generates some interesting results. However, none of the algo's I have checked will work with generated sequences, or iterable classes, as posited in my first post. While app

Re: Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Robin Becker
Philip Smith wrote: > Just to announce that I have posted an experimental version of MPQS which I > am hoping those of a mathematical turn of mind would care to test, comment > on and maybe contribute to. > > There is work to do but it performs very well. > > The package is available via FTP at

Re: Watching serial port activity.

2006-05-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2006-05-30, xkenneth <[EMAIL PROTECTED]> wrote: > >> I'm using linux. > >[It's generally considered good practice to quote enough context >so that your post makes sense to people without access to older >postings.] > >Und

Re: Very good Python Book. Free download : Beginning Python: From Novice to Professional

2006-05-30 Thread bruno at modulix
Moneyhere wrote: > Good :) > Can someone provide this ebook? . > I'm looking forwards it. > http://www.amazon.com/gp/product/0130410659/002-1715230-0496030?v=glance&n=283155 -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.

Re: create a text file

2006-05-30 Thread Fredrik Lundh
Max Erickson wrote: >> # w is for writing >> myfile = open('theoutfile',w) > > That won't work, the second argument to open needs to be a string: w = 'w' -- http://mail.python.org/mailman/listinfo/python-list

Multiple Polynomial Quadratic Sieve

2006-05-30 Thread Philip Smith
Just to announce that I have posted an experimental version of MPQS which I am hoping those of a mathematical turn of mind would care to test, comment on and maybe contribute to. There is work to do but it performs very well. The package is available via FTP at http://www.pythonstuff.pwp.bluey

Re: logging

2006-05-30 Thread Vinay Sajip
Baurzhan Ismagulov wrote: > Hello Vinay, > Ok, here is my hierarchy: > [snip] > [handlers] > keys=console [snip] > [logger_root] > level=CRITICAL > handlers=console > > [logger_l01] > level=DEBUG > qualname=l01 > handlers=console > > [logger_l02] > level=CRITICAL > qualname=l02 > handlers=console

Re: Python Version Testing Tool?

2006-05-30 Thread Fuzzyman
Michael Yanowitz wrote: > Hello: > >Is there a version testing tool available for Python > such that I can check to see if my code will still run in > versions 2.2, 2.3, 2.4.3, and 1.1 (for example) (or whatever) > without having to install all these different versions on my > computer? > Thi

Re: sybase open client 15_0

2006-05-30 Thread bitsandbytes88
Hi, Thanks for the reply. I have tried that solution - adding syb like sybblk to setup.py, but it didn't change my end result, import sybase fails. I wonder if I need to start fresh. How would I be sure sybase-0.37 is gone? Also, I have 64-bit linux. I have libsybblk64.so for example. I don't

Re: sybase open client 15_0

2006-05-30 Thread bitsandbytes88
Eduardo Gonzalez-Solares wrote: > See: > > http://www.object-craft.com.au/pipermail/python-sybase/2006-May/000471.html > > Dan wrote: > > I'm running SLES 9.3 on Tyan with 2 single core 64-bit Opteron & 8 GB of > > memory and SWAP. > > > > OCS-15_0 > > sybperl-2.18 > > python 2.3.5 > > > > > > > >

Re: How to use tk.call ?

2006-05-30 Thread Eric Brunel
On 30 May 2006 05:51:04 -0700, <[EMAIL PROTECTED]> wrote: > Eric, > > Thanks, your tip did the trick... Is there someplace where tk.call is > discussed? I don't think so. I personnally never find any documentation on it. But there is not much to say: you can just pass regular tcl commands throu

Re: Watching serial port activity.

2006-05-30 Thread Grant Edwards
On 2006-05-30, Peter Corlett <[EMAIL PROTECTED]> wrote: > A dirty hack that might work is to rename /dev/ttyS* off somewhere else and > replace them with named pipes. Have a process monitor the named pipes and > relay data back and forth to the actual serial ports while logging it. The > serial io

Re: Watching serial port activity.

2006-05-30 Thread Grant Edwards
On 2006-05-30, TheSeeker <[EMAIL PROTECTED]> wrote: > Have you looked into slsnif > (http://www.dakotacom.net/~ymg/software.html) FYI, slsnif won't work for any serial program that needs to use parity, 7 data bits, or any of the modem control/status lines. Since all of the serial applications I

webbrowser problems

2006-05-30 Thread Keith Lackey
I’m having trouble trying to pass arguments to a file path url… ie c:/testPython/test.html?testArg=testValue   import webbrowser   webbrowser.open(“c:/testPython/test.html”) # Works webbrowser.open(“c:/testPython/test.html?testArg=testValue”) # Doesn’t Work   webbrowser.get() # Retur

Re: Linking onClick event to other controls on the Frame

2006-05-30 Thread DataSmash
Hi Miki, I appreciate you taking the time to figure out what I was trying to do. This is exactly what I was looking for. I plan on studing this code and looking at the wxpython demo as you mentioned. Thanks again! R.D. Harles -- http://mail.python.org/mailman/listinfo/python-list

Re: Watching serial port activity.

2006-05-30 Thread Peter Corlett
Grant Edwards <[EMAIL PROTECTED]> wrote: [...] > Under Linux there isn't really anything. IIRC, many years ago, somebody > had written a kernel module that inserted itself between application and > serial port and logged operations, but the last time I tried to find it, I > was unsuccessful. A dir

Re: Watching serial port activity.

2006-05-30 Thread TheSeeker
Hi, Have you looked into slsnif (http://www.dakotacom.net/~ymg/software.html) Duane -- http://mail.python.org/mailman/listinfo/python-list

Re: create a text file

2006-05-30 Thread Max Erickson
"per9000" <[EMAIL PROTECTED]> wrote: > # w is for writing > myfile = open('theoutfile',w) That won't work, the second argument to open needs to be a string: myfile = open('theoutfile', 'w') max -- http://mail.python.org/mailman/listinfo/python-list

Re: wait() on Popen4 object from thread?

2006-05-30 Thread Grant Edwards
On 2006-05-30, Grant Edwards <[EMAIL PROTECTED]> wrote: doesn't V > However, the presence/absence of the global affect whether the > OSError happens or not. -- Grant Edwards grante

Re: wait() on Popen4 object from thread?

2006-05-30 Thread Grant Edwards
On 2006-05-30, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 30 May 2006 03:01:54 -, Grant Edwards <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> watching = False > > You do realize that this is a LOCAL definition, and is NOT the same > "watch

Re: Watching serial port activity.

2006-05-30 Thread Grant Edwards
On 2006-05-30, xkenneth <[EMAIL PROTECTED]> wrote: > I'm using linux. [It's generally considered good practice to quote enough context so that your post makes sense to people without access to older postings.] Under Linux there isn't really anything. IIRC, many years ago, somebody had written a

Re: starting some Python script from C#

2006-05-30 Thread Gerard Flanagan
> >> "Gerard Flanagan" <[EMAIL PROTECTED]> je napisao u poruci interesnoj > >> grupi:[EMAIL PROTECTED] > >> > tatamata wrote: > >> >> Hello. > >> >> > >> >> How can I run some Python script within C# program? > >> >> > >> > > >> >

Re: How to use tk.call ?

2006-05-30 Thread jerry . levan
Eric, Thanks, your tip did the trick... Is there someplace where tk.call is discussed? Jerry -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Python OpenGL difficulties

2006-05-30 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > > Mike C. Fletcher wrote: >> [EMAIL PROTECTED] wrote: >> > I'm beginning learning Python and OpenGL in Python. >> > > [...] >> > ImportError: No module named OpenGL.GLUT >> > >> > [EMAIL PROTECTED]/etc/python>$ echo $PYTHONPATH >> > /usr/lib/python2.2/site-packages/Open

Way to get an array of latitude/longitude points (tuples) from a trip

2006-05-30 Thread kbperry
I am not sure if this is the right place for this, but I thought it was worth a shot. What I want: Enter a From: street address and a To: street address, and then specify an interval (say every half mile). Then, I click a submit button, and it gives me latitude and longitude points (in order) fr

Re: saving settings

2006-05-30 Thread Diez B. Roggisch
Grant Edwards wrote: > Documents and settings aren't quite the same thing, but it's a > valid point. > >> Especially not the ones you wrote on that other machine. >> >> Seriously: Who is going to copy a executable around? > > I do. I copy putty.exe around all of the time. I download it every

Re: Is anybody knows about a linkable, quick MD5/SHA1 calculator library ?

2006-05-30 Thread Serge Orlov
DurumDara wrote: > Hi ! > > I need to speedup my MD5/SHA1 calculator app that working on > filesystem's files. > I use the Python standard modules, but I think that it can be faster if > I use C, or other module for it. > > I use FSUM before, but I got problems, because I "move" into "DOS area", >

Re: os.time()

2006-05-30 Thread Steve Holden
Diez B. Roggisch wrote: > Anthony wrote: > > >>i have a problem with the os.times() command, on different Python >>versions, i get different printout: > > > >>and on the 3 servers, the linux command: $date >>returns the same value. >> >>any suggestions??? >>what is the command that gives m

Re: John Bokma harassment

2006-05-30 Thread Mumia W.
David Squire wrote: > Max M wrote: >> John Bokma wrote: >>> [EMAIL PROTECTED] wrote: >> >>> Your first question should be: Is it alright that Xah harasses 5 >>> newsgroups? Or maybe work on your spelling, harass is with one r, but >>> maybe you didn't read the subject, which wouldn't amaze me, si

Re: John Bokma harassment

2006-05-30 Thread Mumia W.
Max M wrote: > John Bokma wrote: >> [EMAIL PROTECTED] wrote: > >> Your first question should be: Is it alright that Xah harasses 5 >> newsgroups? Or maybe work on your spelling, harass is with one r, but >> maybe you didn't read the subject, which wouldn't amaze me, since you >> sound like you

Re: create a text file

2006-05-30 Thread per9000
Hi, This is what I often do: somekindofoutput = '' somekindofoutput += somefunk(somearg) + '\n' # w is for writing myfile = open('theoutfile',w) myfile.write(somekindofoutput) myfile.close() also see http://www.python.org/doc/2.3.5/tut/node9.html or some other documentation /P9k -- http://ma

Re: Is anybody knows about a linkable, quick MD5/SHA1 calculator library ?

2006-05-30 Thread Daniel Dittmar
DurumDara wrote: > Hi ! > > I need to speedup my MD5/SHA1 calculator app that working on > filesystem's files. You could try using threads. This would allow the CPU and the disk to work in parallel. The sha/md5 modules don't seem to release the global interpreter lock, so you won't be able to

Re: John Bokma harassment

2006-05-30 Thread ilitzroth
>Your first question should be: Is it alright that Xah harasses 5 >newsgroups? Or maybe work on your spelling, harass is with one r, but >maybe you didn't read the subject, which wouldn't amaze me, since you >sound like you should be spending time on MySpace OMG!. Dear John, Should I ask myself th

Re: os.time()

2006-05-30 Thread Diez B. Roggisch
Anthony wrote: > i have a problem with the os.times() command, on different Python > versions, i get different printout: > and on the 3 servers, the linux command: $date > returns the same value. > > any suggestions??? > what is the command that gives me the actual time? time.time(), not o

Re: Very good Python Book. Free download : Beginning Python: From Novice to Professional

2006-05-30 Thread Moneyhere
Good :) Can someone provide this ebook? . I'm looking forwards it. -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-30 Thread David Squire
Max M wrote: > John Bokma wrote: >> [EMAIL PROTECTED] wrote: > >> Your first question should be: Is it alright that Xah harasses 5 >> newsgroups? Or maybe work on your spelling, harass is with one r, but >> maybe you didn't read the subject, which wouldn't amaze me, since you >> sound like you

Re: Beginner Python OpenGL difficulties

2006-05-30 Thread jg . campbell . ng
Mike C. Fletcher wrote: > [EMAIL PROTECTED] wrote: > > I'm beginning learning Python and OpenGL in Python. > > [...] > > ImportError: No module named OpenGL.GLUT > > > > [EMAIL PROTECTED]/etc/python>$ echo $PYTHONPATH > > /usr/lib/python2.2/site-packages/OpenGL > > > You should already have site-p

Re: TIming

2006-05-30 Thread bruno at modulix
WIdgeteye wrote: > HI, > I am trying to write a little program that will run a program on > scedule. There are usually existing programs to do so on most platforms (cron on *n*x, the Windows scheduler, etc). -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('

  1   2   >