( WWW.SNEAKERS-IN-CHINA.COM) Nike AF1 x Air Jordan 5. Nike Air Force Ones Shoes & Air Jordan 5.

2008-03-29 Thread sneakers_in_china
(www sneakers-in-china com) wholesale Air Jordan 1 Old Love/New Love Package (www sneakers-in-china com) Nike Air Jordan Retro 1 beginning moments "BMP Package-Old Love New Love Edition" (www sneakers-in-china com) selling Air Jordan DMP Defining Moments Package (www sneakers-in-china com) Air Jord

Re: Where can I find :

2008-03-29 Thread castironpi
On Mar 29, 11:19 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 29 Mar 2008 20:15:59 -0700 (PDT), pythonnubie > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Hi  All : > > Does anyone know where I  can find  either a book or a website  that > > explains  beginni

Re: Serial port error statistics - any comparable data?

2008-03-29 Thread castironpi
On Mar 29, 4:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen schrieb: > > > > > > > Hi, > > > I have been doing some tests on a device that > > we are thinking of incorporating into a product, > > and I have seen that reception on a serial port > > at 115200 baud over abou

Re: Help me on function definition

2008-03-29 Thread castironpi
On Mar 29, 11:45 pm, hdante <[EMAIL PROTECTED]> wrote: > On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote: > > > Hello everyone, > >  Hi, > >  Always avoid reinventing the wheel: > > from Numeric import array, cross_product > a = array([1, 2, 3]) > b = array([4, 5, 6]) > print cross_product(

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 02:11:33 -0300, hdante <[EMAIL PROTECTED]> escribió: > BTW, my opinion is that it's already time that programmer editors > have input methods advanced enough for generating this: > > if x ≠ 0: > ∀y ∈ s: > if y ≥ 0: f1(y) > else: f2(y) Fine if you have the

Re: Problem with python

2008-03-29 Thread castironpi
On Mar 29, 5:33 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Lie wrote: > > On Mar 30, 2:57 am, [EMAIL PROTECTED] wrote: > >> Hi there. > >> I ... started writing simple programs in the python gui...  when I write > >> python code ...[and]... double click it all that happens is a black box

Re: Can anyone help me?

2008-03-29 Thread David
> > What is the collision of spheres? Is it the melding of a sphere of > influence and cosmic sphere? What does it mean to say that such a > collision "doesn't work"? The sphere is the optimal solid for storing > the maximum volume in the minimum area. A sphere can retain the most > heat,

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Carl Banks
On Mar 29, 9:23 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 29 Mar 2008 12:49:05 -0700, Carl Banks wrote: > >> Please set it straight in 3.0, and if not, convince me with a good > >> reason of doing so, so that I can live with it and don't have to spend > >> the rest

Re: html DOM

2008-03-29 Thread David
On Sun, Mar 30, 2008 at 1:09 AM, Sam the Cat <[EMAIL PROTECTED]> wrote: > Is there a package that would allow me the same or similar functionality for > modifying html code via the DOM model as I have in JavaScript ? I'd like to > parse an html file, then modify it and save the result. I am not

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread hdante
On Mar 29, 7:55 am, [EMAIL PROTECTED] wrote: > I don't know if this is the right place to discuss the death of <> in > Python 3.0, or if there have been any meaningful discussions posted > before (hard to search google with '<>' keyword), but why would anyone > prefer the comparison operator != ove

Re: problem with logic in reading a binary file

2008-03-29 Thread hdante
On Mar 29, 3:44 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I am having trouble writing the code to read a binary string. I would > like to extract the values for use in a calculation. > > Any help would be great. I'm too lazy to debug your binary string, but I suggest that y

Re: html DOM

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:19:08 -0300, Michael Wieher <[EMAIL PROTECTED]> escribió: > Was this not of any use? > > http://www.boddie.org.uk/python/HTML.html > > I think, since HTML is a sub-set of XML, any XML parser could be adapted > to > do this... That's not true. A perfectly valid HTML docu

Re: Installing simplejson issues

2008-03-29 Thread blwatson
Rock and roll baby!!! Thanks so much. It took some doing, but many thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me on function definition

2008-03-29 Thread hdante
On Mar 28, 10:47 pm, "aeneng" <[EMAIL PROTECTED]> wrote: > Hello everyone, Hi, Always avoid reinventing the wheel: from Numeric import array, cross_product a = array([1, 2, 3]) b = array([4, 5, 6]) print cross_product(a, b) See: http://numpy.scipy.org/ http://www.scipy.org/ (hint: consid

Re: Passing function objects to timeit

2008-03-29 Thread Steven D'Aprano
On Sun, 30 Mar 2008 00:27:45 -0300, Gabriel Genellina wrote: > En Sat, 29 Mar 2008 23:23:07 -0300, Steven D'Aprano > <[EMAIL PROTECTED]> escribió: > >> The general problem is that I wish to time an arbitrary function with >> arbitrary arguments. The function and arguments are provided to me as >>

Re: Passing function objects to timeit

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:20:34 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote: > >> def main(): >>global func >>func = factory() >>return timeit.Timer('func()', 'from __main__ import func').timeit() > > Alas, this does

Using QSystemTrayIcon with PyQt

2008-03-29 Thread Alex Teiche
Hello, I am pretty new to Python, and have never learned C++. I am trying to implement the following thing into my python application: http://doc.trolltech.com/4.3/qsystemtrayicon.html Through PyQt. I have been using PyQt for awhile and I know how do use it, but I could not get this specific t

Re: Installing simplejson issues

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:39:58 -0300, <[EMAIL PROTECTED]> escribió: > First, thanks for the help. You have solved one problem but created a > new one. Isn't that always how it works? Ouch - yes, sometimes :( > So I copied over the dir, and now I get this error when trying to > import simplejson:

Re: Installing simplejson issues

2008-03-29 Thread blwatson
On Mar 29, 6:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Mar 2008 20:54:36 -0300, <[EMAIL PROTECTED]> escribió: > > > I tried to add the directory "//simplejson" to my sys.path > > in the interpreter, hoping that the call to import simplejson would > > work if the dir was the

Re: Where can I find :

2008-03-29 Thread Gabriel Genellina
En Sun, 30 Mar 2008 00:15:59 -0300, pythonnubie <[EMAIL PROTECTED]> escribió: > Does anyone know where I can find either a book or a website that > explains beginning python by actually building a project line by > line and explaining it indepth . I am primarily interested in > unders

Re: Passing function objects to timeit

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 23:23:07 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > The general problem is that I wish to time an arbitrary function with > arbitrary arguments. The function and arguments are provided to me as > Python objects, but timeit requires strings. Converting the objects

Re: Passing function objects to timeit

2008-03-29 Thread Steven D'Aprano
On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote: > Or maybe: > > def main(): >global func >func = factory() >return timeit.Timer('func()', 'from __main__ import func').timeit() Alas, this does not work, because all the Timer instances share the same state. import time

Where can I find :

2008-03-29 Thread pythonnubie
Hi All : Does anyone know where I can find either a book or a website that explains beginning python by actually building a project line by line and explaining it indepth . I am primarily interested in understading flowcontrol as well as syntax . If it was related to netwoprking th

Re: html DOM

2008-03-29 Thread Michael Wieher
Was this not of any use? http://www.boddie.org.uk/python/HTML.html I think, since HTML is a sub-set of XML, any XML parser could be adapted to do this... I doubt there's an HTML-specific version, but I would imagine you could wrap any XML parser, or really, create your own that derives from the X

html DOM

2008-03-29 Thread Sam the Cat
Is there a package that would allow me the same or similar functionality for modifying html code via the DOM model as I have in JavaScript ? I'd like to parse an html file, then modify it and save the result. I am not trying to do this online, rather I would like to do this on a batch of files

Re: Can anyone help me?

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 21:48:21 -0300, Paul McGuire <[EMAIL PROTECTED]> escribió: > What is the collision of spheres? Is it the melding of a sphere of > influence and cosmic sphere? What does it mean to say that such a > collision "doesn't work"? The sphere is the optimal solid for storing > the

Re: What motivates all unpaid volunteers at Pycon?

2008-03-29 Thread Steve Holden
Tim Chase wrote: >> I was wondering what motivated so many people to give so much to the >> Python community. > > fear, surprise, ruthless efficiency, an almost fanatical devotion > to the BDFL, and nice red uniforms. > > Oh... > NOT THE COMFY CHAIR! (tm) -- Steve Holden+1 571 484 6266

Re: Buffer Overflow with Python 2.5 on Vista in import site

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 17:34:27 -0300, Fuzzyman <[EMAIL PROTECTED]> escribió: > A very odd error with Python 2.5 (both 2.5.1 and 2.5.2 from the > official msi installers and running on Vista under Parallels on the > Mac). It may be actually a Parallels issue - I've installed 2.5.1 on Vista (just o

Re: problem with logic in reading a binary file

2008-03-29 Thread castironpi
On Mar 29, 2:11 pm, Gary Herron <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > > I am having trouble writing the code to read a binary string.  I would > > like to extract the values for use in a calculation. > > > Any help would be great. > > Without having looked at your cod

Re: Passing function objects to timeit

2008-03-29 Thread Steven D'Aprano
On Sat, 29 Mar 2008 21:12:33 -0300, Gabriel Genellina wrote: > En Sat, 29 Mar 2008 07:33:40 -0300, Steven D'Aprano > <[EMAIL PROTECTED]> escribió: > >> The timeit.Timer class times "code snippets" -- you pass it strings >> rather than function objects. That's good for what it's worth, but >> some

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >I don't know if this is the right place to discuss the death of <> in >Python 3.0, or if there have been any meaningful discussions posted >before (hard to search google with '<>' keyword), but why would anyone >prefer the comparison op

Re: Can anyone help me?

2008-03-29 Thread castironpi
On Mar 29, 7:59 pm, [EMAIL PROTECTED] wrote: > I love Paul's response. > > [EMAIL PROTECTED] napisa³(a): > > > > > My crystal ball broke a few days ago due to overuse, but I recall that > OpenGL likes to have power-of-two texture sizes. If that doesn't work, > please trim down your code as far as

Re: Problem with sqlite

2008-03-29 Thread Carsten Haese
On Mar 29, 9:10 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > aiwarrior <[EMAIL PROTECTED]> wrote: > >def get_value( self, column ): > >self.cursor.execute( "SELECT %s FROM database" % column ) > >for n in self.cursor: > > print n > > I suspect you wanted "self.cursor

Re: Installing simplejson issues

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 20:54:36 -0300, <[EMAIL PROTECTED]> escribió: > I tried to add the directory "//simplejson" to my sys.path > in the interpreter, hoping that the call to import simplejson would > work if the dir was there, even though simplejson.py did not exist is > that dir, but the encoder,

Re: Installing simplejson issues

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 19:45:09 -0300, Diez B. Roggisch <[EMAIL PROTECTED]> escribió: >> I suggest that you remove the simplejson-xx.egg file and delete the >> simplejson entry in easy-install.pth (both in your site-packages >> directory) >> Then extract the simplejson directory from inside t

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Steven D'Aprano
On Sat, 29 Mar 2008 12:49:05 -0700, Carl Banks wrote: >> Please set it straight in 3.0, and if not, convince me with a good >> reason of doing so, so that I can live with it and don't have to spend >> the rest of my life in 2.x ;). > > 1. It's not going to change in Python 3.0. > > 2. It's a sil

Re: Problem with sqlite

2008-03-29 Thread Tim Roberts
aiwarrior <[EMAIL PROTECTED]> wrote: > >I'm sorry about not saying showing the libraries. It was not on >purpose. You didn't make any comment on the rest of Gerhard's suggestion, nor does it appear that you took any action to correct them. You should get out of the habit of using extra parenthese

Re: Can anyone help me?

2008-03-29 Thread marek . rocki
I love Paul's response. [EMAIL PROTECTED] napisał(a): > My crystal ball broke a few days ago due to overuse, but I recall that OpenGL likes to have power-of-two texture sizes. If that doesn't work, please trim down your code as far as possible (so that it still displays the error) and post it. -

Re: Can anyone help me?

2008-03-29 Thread Paul McGuire
On Mar 29, 6:37 pm, [EMAIL PROTECTED] wrote: What is the collision of spheres? Is it the melding of a sphere of influence and cosmic sphere? What does it mean to say that such a collision "doesn't work"? The sphere is the optimal solid for storing the maximum volume in the minimum area. A sph

Re: Passing function objects to timeit

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 07:33:40 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > The timeit.Timer class times "code snippets" -- you pass it strings > rather than function objects. That's good for what it's worth, but > sometimes the code you want to time is too big to easily pass as a > stri

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Gabriel Genellina
En Sat, 29 Mar 2008 16:24:01 -0300, Michael Wieher <[EMAIL PROTECTED]> escribió: > to me it seems simple. > > C uses != > > why does C use != because its kind of hard to type the "equal with a > slash" In C, ! by itself is the logical "not", so !(a==b) is the same as (a!=b) and that's ra

Re: Installing simplejson issues

2008-03-29 Thread blwatson
On Mar 29, 3:48 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > I am trying to install the twitter python wrapper...I got that > > installed just fine, but am having serious troubles getting the > > simplejson package to install.  I need help diagnosing wher

Re: Change user on UNIX

2008-03-29 Thread Tim Roberts
"Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > >I'll try to describe what I'm actually trying to implement so that >maybe it can help you understand a little better. >The application is an asynchronous FTP server implementation. >I decided that it would be desirable to change the current >impleme

Can anyone help me?

2008-03-29 Thread castironpi
I have this. 'pycaster.py' works. 'spherecollide.py' doesn't. C:\Documents and Settings\usr\My Documents\inbin\SphereCollide> \programs\python2 5\python SphereCollide.py Traceback (most recent call last): File "SphereCollide.py", line 39, in dlWorld, dlSpheres, dlFakeshadow = Objects.main

Re: pygame handoff

2008-03-29 Thread castironpi
On Mar 28, 5:09 am, [EMAIL PROTECTED] wrote: > Can anyone do a simple pygame render of a rollercoaster in first- > person?  I'll do the generator.  Just for fun for free.  (Ha see > pythaagh.  He bothered to carve it.  Have a nice day.) Does anyone want to team up on this: http://www.pygame.o

pexpect

2008-03-29 Thread Paul Lemelle
I am trying separate a script that users pexpect into various functions within the same expect session. The problem is that the function does not return control back Main. Any insight into this issue would be greatly appreciated. Below is sample code of the problem. Thanks, Paul impo

Re: Installing simplejson issues

2008-03-29 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I am trying to install the twitter python wrapper...I got that > installed just fine, but am having serious troubles getting the > simplejson package to install. I need help diagnosing where this is > failing. I am trying to use: > > http://pypi.python.org/pypi/simpl

Re: Installing simplejson issues

2008-03-29 Thread Diez B. Roggisch
Gabriel Genellina schrieb: > En Fri, 28 Mar 2008 23:23:01 -0300, <[EMAIL PROTECTED]> escribió: > >> On Mar 28, 1:57 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> >> wrote: >>> En Fri, 28 Mar 2008 16:14:07 -0300, <[EMAIL PROTECTED]> escribió: >>> >>> > I am trying to install the twitter python wrappe

Re: Problem with python

2008-03-29 Thread Scott David Daniels
Lie wrote: > On Mar 30, 2:57 am, [EMAIL PROTECTED] wrote: >> Hi there. >> I ... started writing simple programs in the python gui... when I write >> python code ...[and]... double click it all that happens is a black box >> flashes up on the screen, but nothing else!? > > open the program i

Re: Licensing

2008-03-29 Thread DS
Scott David Daniels wrote: > DS wrote: > >> I'm getting ready to publish a first open-source project written in >> python. I am planning to use GPL as the license. However, in my code, >> there is a function that I like from Python Cookbook >> So, my options appear to be: >> 1. Don't u

Re: Licensing

2008-03-29 Thread Scott David Daniels
DS wrote: > I'm getting ready to publish a first open-source project written in > python. I am planning to use GPL as the license. However, in my code, > there is a function that I like from Python Cookbook > So, my options appear to be: > 1. Don't use it. > 2. Use it with no comment --

Re: What motivates all unpaid volunteers at Pycon?

2008-03-29 Thread Tim Chase
> I was wondering what motivated so many people to give so much to the > Python community. fear, surprise, ruthless efficiency, an almost fanatical devotion to the BDFL, and nice red uniforms. Oh... -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and xml

2008-03-29 Thread Konstantin Veretennicov
On Sat, Mar 29, 2008 at 3:57 PM, Doran, Harold <[EMAIL PROTECTED]> wrote: > I am a python neophyte who has used python to parse through text files > using basic functions and no OOP experience. I have a need to process some > xml files and from what I am now reading python is the exact tool I nee

Python vs. Perl, which is better to learn?

2008-03-29 Thread linda vogele
4332951-- http://mail.python.org/mailman/listinfo/python-list

wxPython listctrl

2008-03-29 Thread Gif
I was wondering if there is a way to extract an icon from a file (executable) and then add it in a listctrl. I also 'd like to know if i can shorten the icon in order to fit in a listctrl item. I've managed to get the icon from an icon file and add t as a listctrl item but it remains 32x32. code:

Re: Serial port error statistics - any comparable data?

2008-03-29 Thread Diez B. Roggisch
Hendrik van Rooyen schrieb: > Hi, > > I have been doing some tests on a device that > we are thinking of incorporating into a product, > and I have seen that reception on a serial port > at 115200 baud over about six metres of RS-232 > cable makes mistakes, to the order of 125 lines > with errors

Re: cProfile for python 2.4

2008-03-29 Thread ptrk
On Mar 28, 3:50 pm, David Pratt <[EMAIL PROTECTED]> wrote: > I'd like to compile cProfile for python 2.4. Where can I get it to do > this? I realize it is part of python 2.5. Many thanks. can you use cProfile's predecessor, profile? http://docs.python.org/lib/module-profile.html -- http://mail.p

tkinter coordinates, conversion

2008-03-29 Thread Ron Provost
Is there any way in tkinter to convert between coordinate systems? Specifically, I'm refering to the canvas. I'm getting x and y's back in mouse events and I would like to convert them back to inches 'i', centemeters 'c', millimeters 'm' or points 'p'. Which I wish to use to provided informat

Serial port error statistics - any comparable data?

2008-03-29 Thread Hendrik van Rooyen
Hi, I have been doing some tests on a device that we are thinking of incorporating into a product, and I have seen that reception on a serial port at 115200 baud over about six metres of RS-232 cable makes mistakes, to the order of 125 lines with errors in them out of approximately 18.4 million l

New python forum on CodeGuru!

2008-03-29 Thread Robert Dailey
Hi, I managed to convince the CodeGuru forum administrator to add a Python discussion forum to the community. It's a great success for me, as I really love CodeGuru and their forums. I really encourage everyone to use it, as it will be a great asset to the Python community. The forum will be remov

cProfile for python 2.4

2008-03-29 Thread David Pratt
I'd like to compile cProfile for python 2.4. Where can I get it to do this? I realize it is part of python 2.5. Many thanks. -- http://mail.python.org/mailman/listinfo/python-list

regarding xml elements

2008-03-29 Thread Raj kumar
Hi, I have an xml file in my application, I have created an element using Example goes like this. document.createElement("abc") and i appeneded it by using append() method. But how i can reflect this change to my xml file? and one more thing is i want to create element with some other pa

What motivates all unpaid volunteers at Pycon?

2008-03-29 Thread [EMAIL PROTECTED]
I was impressed and humbled by all the unpaid volunteers at Pycon. I was wondering what motivated so many people to give so much to the Python community. (I have my guesses but I'd rather listen than assume I know.) Any ideas? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Dan Bishop
On Mar 29, 6:08 am, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I don't know if this is the right place to discuss the death of <> in > > Python 3.0, or if there have been any meaningful discussions posted > > before (hard to search google with '<>' keyword), but wh

Re: Problem with sqlite

2008-03-29 Thread Tzury Bar Yochay
after executing insert do conection.commit() -- http://mail.python.org/mailman/listinfo/python-list

Buffer Overflow with Python 2.5 on Vista in import site

2008-03-29 Thread Fuzzyman
A very odd error with Python 2.5 (both 2.5.1 and 2.5.2 from the official msi installers and running on Vista under Parallels on the Mac). 'import site' fails due to a string in sys.path that contains a huge number of null bytes. The error is actually in ntpath - I adjusted it to print the paths i

Re: Finding Full Path to Process EXE

2008-03-29 Thread Michel Claveau - NoSpam SVP ; merci
Hi! Warning : WMI give the "command-line" of a process only for windows > 2000 @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with sqlite

2008-03-29 Thread aiwarrior
On Mar 29, 6:41 pm, Gerhard Häring <[EMAIL PROTECTED]> wrote: > Ok, I'll review your code. > > aiwarrior wrote: > > class db: > > def __init__(self): #constructor > > conn = sqlite3.connect('./db.db') > > conn.isolation_level = None > > Autocommit mode is mostly for newbies who

Re: Error message from function definition

2008-03-29 Thread Terry Reedy
Please do not post same question twice. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me on function definition

2008-03-29 Thread Terry Reedy
"aeneng" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | def cross(u,v) |"""input two vectors u and v in 3-D space, | output a cross product of vector w, in column or in row | accordingly.""" |ppp1,ppp2,ppp3=0.0,0.0,0.0 To add to other comments, remove above which is

Re: Problem with python

2008-03-29 Thread Lie
On Mar 30, 2:57 am, [EMAIL PROTECTED] wrote: > Hi there. > I downloaded python a couple of days ago from the official site and > have started writing simple programs in the python gui (this being my > first attempt at programming ever). The only thing is when I write > python code in a text editor

Problem with python

2008-03-29 Thread mac_the_scotte
Hi there. I downloaded python a couple of days ago from the official site and have started writing simple programs in the python gui (this being my first attempt at programming ever). The only thing is when I write python code in a text editor and save it as a .py file, when I double click it all t

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Carl Banks
On Mar 29, 6:55 am, [EMAIL PROTECTED] wrote: > why would anyone Questions that begin with the words "why would anyone" are almost always betray an arrogance about their own beliefs and an ignorance (or feigning ignorance) of human nature. Wiser folks know better than to phrase this question so ju

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Michael Wieher
to me it seems simple. C uses != why does C use != because its kind of hard to type the "equal with a slash" so if python is supposed to be a simple and easy to use language, use the simple and easy to understand, standard 'not-equal' operator... Idk, maybe there's more to it but simple is

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Lie
On Mar 30, 1:24 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Lie <[EMAIL PROTECTED]> wrote: > > You're forcing your argument too much, both != and <> are NOT standard > > mathematics operators -- the standard not-equal operator is >< -- and > > I can assure you that both != and <> won't be compreh

Re: problem with logic in reading a binary file

2008-03-29 Thread Gary Herron
[EMAIL PROTECTED] wrote: > Hello, > > I am having trouble writing the code to read a binary string. I would > like to extract the values for use in a calculation. > > Any help would be great. > Without having looked at your code an any detail, may I humbly suggest that you throw it all out an

Re: How to insert multiple rows in SQLite Dbase

2008-03-29 Thread Gerhard Häring
Gabriel Genellina wrote: > [...] > and execute: > cur.executemany("insert into log (IP, EntryDate, Requestt, ErrorCode) > values (:ip, :date, :request, :errorcode)", values) It's probably worth mentioning that pysqlite's executemany() accepts anything iterable for its parameter. So you don't need

problem with logic in reading a binary file

2008-03-29 Thread [EMAIL PROTECTED]
Hello, I am having trouble writing the code to read a binary string. I would like to extract the values for use in a calculation. Any help would be great. Here is my function that takes in a string. def parseSequence(data, start): group_num = data[start:start+2] element_num = data[sta

Re: Problem with sqlite

2008-03-29 Thread Gerhard Häring
Ok, I'll review your code. aiwarrior wrote: > class db: > def __init__(self): #constructor > conn = sqlite3.connect('./db.db') > conn.isolation_level = None Autocommit mode is mostly for newbies who forget to call commit. Unfortunately, newbiews find enough other ways to shoot

Licensing

2008-03-29 Thread DS
I'm pretty sure this is the wrong place to ask, but I'm hoping someone will point me in the right direction. I'm getting ready to publish a first open-source project written in python. I am planning to use GPLas the license. However, in my code, there is a function that I like from Python Coo

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Duncan Booth
Lie <[EMAIL PROTECTED]> wrote: > You're forcing your argument too much, both != and <> are NOT standard > mathematics operators -- the standard not-equal operator is >< -- and > I can assure you that both != and <> won't be comprehensible to non- > programmers. My maths may be a bit rusty, but I

Re: Problem with sqlite

2008-03-29 Thread Duncan Booth
aiwarrior <[EMAIL PROTECTED]> wrote: > When i execute this the database doesn't get filled with anything and > the program stays running in memory for ever. That's odd, when I execute the code you posted I just get "NameError: global name 'sqlite3' is not defined". You should always try to post

Re: deleting a line from a file

2008-03-29 Thread Paddy
On Mar 29, 11:13 am, eMko <[EMAIL PROTECTED]> wrote: > Hello, > > In Perl, using a Tie::File module I can easily and comfortably delete > a line from the middle of a text file: > > my @file; > open(DATA, "+<:encoding(utf8):raw" , "file.txt") or return 0; > tie @file, 'Tie::File', \*DATA or re

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Lie
On Mar 29, 5:55 pm, [EMAIL PROTECTED] wrote: > I don't know if this is the right place to discuss the death of <> in > Python 3.0, or if there have been any meaningful discussions posted > before (hard to search google with '<>' keyword), but why would anyone > prefer the comparison operator != ove

Problem with sqlite

2008-03-29 Thread aiwarrior
class db: def __init__(self): #constructor conn = sqlite3.connect('./db.db') conn.isolation_level = None self.cursor = conn.cursor() try: self.cursor.execute("CREATE TABLE database (album,filepath)" ) except: pass def add_entr

Re: Why prefer != over <> for Python 3.0?

2008-03-29 Thread Jeroen Ruigrok van der Werven
-On [20080329 13:01], Paul Rubin ("http://phr.cx"@NOSPAM.invalid) wrote: >Yes, what I mean is that some languages (e.g. Ada, Haskell) use /= for >nonequality. /= is understandable given how it looks like a digraph for ≠ (U+2260) and I am guessing that was the intent. -- Jeroen

Re: Finding Full Path to Process EXE

2008-03-29 Thread misceverything
On Mar 28, 4:53 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > > I would like to write a script that would enumerate all running > > processes and return the full path to the EXE of each running > > process. However, I can't seem to find any good info on how to

Re: Summary of threading for experienced non-Python programmers?

2008-03-29 Thread Paul Rubin
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > In which sense is that different? AFAIK select lets you avoid polling > and provides notifications (possibly with timeouts) for IO-events. So > where exactly is the difference? I read TFA, and it does mention that > select/poll have potential for opt

Re: Summary of threading for experienced non-Python programmers?

2008-03-29 Thread Paul Rubin
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > I appreciate the droll sense of humor, but do you mean to > > assert that asyncore.py supports asynchronous disk file I/O? > > As I said in an answer to the OP, I somewhat glossed over the "file" > and just read IO. And under Posix, python *does*

Re: Psyco alternative

2008-03-29 Thread king kikapu
On 29 Μαρ, 16:03, Luis M. González <[EMAIL PROTECTED]> wrote: > On 27 mar, 13:14, king kikapu <[EMAIL PROTECTED]> wrote: > > > > One reason attention is going to PyPy instead of Psyco... > > > > Jean-Paul > > > I had a look at PyPy, it, indeed, have a very long way to go so we can > > consider it a

ANN: python-ldap-2.3.4

2008-03-29 Thread Michael Ströder
Find a new release of python-ldap: http://python-ldap.sourceforge.net/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g.

Re: Help me on function definition

2008-03-29 Thread castironpi
On Mar 29, 4:18 am, Roel Schroeven <[EMAIL PROTECTED]> wrote: > aeneng schreef: > > > > > > > Hello everyone, > > > I am just starting to use python in numerical cacluation. > > I need you to help me to see what's wrong with the following piece of > > codes, which computes the cross product of two

Python and xml

2008-03-29 Thread Doran, Harold
I am a python neophyte who has used python to parse through text files using basic functions and no OOP experience. I have a need to process some xml files and from what I am now reading python is the exact tool I need to work through this issue. However, as I read online docs and peruse which

[OT] Modesty and apologies [Re: Re; finding euclidean distance,better code?]

2008-03-29 Thread Steven D'Aprano
On Sat, 29 Mar 2008 12:43:22 +0200, Hendrik van Rooyen wrote: > Sorry about having to dispel your illusions, but - [...] > Have you noticed that when people say "Sorry.but" they are not > normally sorry at all? Heh heh heh. Reminds me of a quote from the character Spike of "Buffy the Vam

Re: Psyco alternative

2008-03-29 Thread Luis M . González
On 27 mar, 13:14, king kikapu <[EMAIL PROTECTED]> wrote: > > One reason attention is going to PyPy instead of Psyco... > > > Jean-Paul > > I had a look at PyPy, it, indeed, have a very long way to go so we can > consider it an alternative. To see how it´s going, you can check this out: http://more

Re: finding euclidean distance,better code?

2008-03-29 Thread Steven D'Aprano
On Sat, 29 Mar 2008 13:06:27 +0100, Roel Schroeven wrote: > In any case, I replied because your reaction didn't feel all that gentle > to me; to be honest, it felt rather rude. Are you new to Usenet? :-) No offense taken; I hope Robert didn't take offense either, but took the little dig in the

Re: Summary of threading for experienced non-Python programmers?

2008-03-29 Thread Diez B. Roggisch
Paul Rubin schrieb: > Hrvoje Niksic <[EMAIL PROTECTED]> writes: >> Note that I said "*file* input/output". Twisted and asyncore are >> about asynchronous socket programming that polls over nonblocking file >> descriptors such as found in socket programming, not about wrapping >> aio(3) and the equ

Re: Summary of threading for experienced non-Python programmers?

2008-03-29 Thread Diez B. Roggisch
> I appreciate the droll sense of humor, but do you mean to > assert that asyncore.py supports asynchronous disk file I/O? As I said in an answer to the OP, I somewhat glossed over the "file" and just read IO. And under Posix, python *does* support asynchronous IO using the select-module. If you

Re: Summary of threading for experienced non-Python programmers?

2008-03-29 Thread Diez B. Roggisch
Hrvoje Niksic schrieb: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >>> systems. (In theory, file input/output should also be available as >>> asynchronous code, but async IO is low-level and not available in >>> Python.) While threads shouldn't be considered a replacement for >> I suggest

Re: finding euclidean distance,better code?

2008-03-29 Thread Peter Otten
Steven D'Aprano wrote: > Wikipedia doesn't believe that M-D is the primary or most common name, > and the link you give redirects to "Taxicab distance". Googlefight > agrees: "Taxicab distance" is more than twice as common, and "rectilinear > distance" more than five times as common. Could it be

  1   2   >