Python and SQLite release cycles

2007-10-30 Thread [EMAIL PROTECTED]
Hi, Official Python distro is very stable, with release cycle of around 1 year. However, to include the new version of SQLite, which has a much shorter release cycle, one has to rebuild the main Python distribution (to compile with the new SQLite headers) - this is from Python docs. Therefore, inc

marshal vs pickle

2007-10-30 Thread Evan Klitzke
The documentation for marshal makes it clear that there are no guarantees about being able to correctly deserialize marshalled data structures across Python releases. It also implies that marshal is not a general "persistence" module. On the other hand, the documentation seems to imply that marshal

Re: why did these companies choose Tcl over Python

2007-10-30 Thread Tim Roberts
chewie54 <[EMAIL PROTECTED]> wrote: > >As an electronics engineer I use some very expensive EDA CAD tool >programs that are scriptable using Tcl. I was wondering why these >companies have choose to use Tcl instead of Python. Some of these >are: > > Mentor Graphics ModelTech VHDL and Verilog si

Re: clear shell screen

2007-10-30 Thread Tim Roberts
Shawn Minisall <[EMAIL PROTECTED]> wrote: > >Does anyone know how to clear the shell screen completely ? I tried >import os and then os.system("clear") was said to have worked in Windows >XP, but it's just bringing up another window, then it turns black and >then it closes in within about a sec

jpeg image read class

2007-10-30 Thread [EMAIL PROTECTED]
hi i am new to python and PIL and was trying to write a class to read and write RGB color model jpeg images.. i came up with this class below..i want to know if this is the way to read/write the RGB color model jpeg..if anyone can give feedback (esp on the methods writeImage1( ) and writeImage2(

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-30 Thread wyleu
On 30 Oct, 22:36, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Should I need to download a later version of tkinter and/or should I > > alter setup.py in my python install directory and then remake? > > Neither, nor. You need the Tk header files installed; they probably > come in a package call

Re: A near realtime fs mirror application (for backup, written in Python, by Linux inotify)

2007-10-30 Thread Roc Zhou
Now I meet a strange problem. After the first sync init, it enters to the realtime replication state. I deployed them on 3 machines, and have run near half month. Suddenly one day, a host, I don't know what's wrong, I found fs_mirror get the empty records from its mirrord agent. In normal conditio

Re: choose from a list

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 7:39?pm, barronmo <[EMAIL PROTECTED]> wrote: > I didn't know "result" was a list! I don't use MySQL but that's how others work. Each list item is a record, each record a tuple of field values. > Can all that info be stored in a list? If you don't fetch too many records at once. Th

Re: object inheritance

2007-10-30 Thread Gabriel Genellina
En Wed, 31 Oct 2007 00:36:34 -0300, Anand <[EMAIL PROTECTED]> escribió: >> No, that is an argument for multiple-inheritance, mixin classes etc. You >> know when constructing the object what behaviour you want it to have. It >> isn't an argument for changing the behaviour of an existing object >> d

Re: object inheritance

2007-10-30 Thread Anand
> No, that is an argument for multiple-inheritance, mixin classes etc. You > know when constructing the object what behaviour you want it to have. It > isn't an argument for changing the behaviour of an existing object > dynamically. Partially true. I don't want to change the behavior of an exit

Re: object inheritance

2007-10-30 Thread Anand
On Oct 28, 1:16 am, Pradeep Jindal <[EMAIL PROTECTED]> wrote: > On Friday 26 Oct 2007 6:21:57 pm Anand wrote: > > > > > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > > > Can you tell any specific use case for doing this? > > > I have many implementaions of a db interface. > > >

Re: python in academics?

2007-10-30 Thread Anand
On Oct 30, 6:22 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > On Oct 29, 10:39 pm, sandipm <[EMAIL PROTECTED]> wrote: > > > seeing posts from students on group. I am curious to know, Do they > > teach python in academic courses in universities? > > This came up a while back. See: > > http://ti

Re: Arp request to get MAc Adress with IP address

2007-10-30 Thread Yu-Xi Lim
[EMAIL PROTECTED] wrote: > Hello, > I have a network on same subnet. I have an ip address of a machine. > but i need to get its MAC Adress. > Sendingf ARP request is the way i am taking. > > IS there any other way to get this MAC Adress in python.?? > > Also does python go down to level 2 of TCP/

Re: simple? embedding question

2007-10-30 Thread Gabriel Genellina
En Tue, 30 Oct 2007 16:38:12 -0300, <[EMAIL PROTECTED]> escribió: > On Oct 30, 1:31 pm, [EMAIL PROTECTED] wrote: >> suppose i have imported two modules foo and bar with >> foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar") >> respectively. > > I'm confused. What is the benefit o

Re: Iteration for Factorials

2007-10-30 Thread Gabriel Genellina
En Tue, 30 Oct 2007 15:37:57 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On Oct 30, 10:25 am, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: >> The great part about this recursive solution is that you don't have to >> worry about the stack limit because performance degrades so qui

Re: Built-in functions and keyword arguments

2007-10-30 Thread Gabriel Genellina
En Tue, 30 Oct 2007 14:43:48 -0300, Duncan Booth <[EMAIL PROTECTED]> escribió: > "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > >>> >>> help(int) >>> Help on class int in module __builtin__: >>> >>> class int(object) >>> | int(x[, base]) -> integer >>> ... >>> >> OK, good point. Perhaps it's

Earn Up To 100's of $ per Day with Ease!

2007-10-30 Thread clinton
Tired of business opportunities that do not deliver what they promise? Get Free Advice & a Honest Review on Internet Opportunities that Work! MOre details http://powerfulmoneymakingideas.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: why did these companies choose Tcl over Python

2007-10-30 Thread sndive
On Oct 30, 3:25 pm, chewie54 <[EMAIL PROTECTED]> wrote: > Hello, > > As an electronics engineer I use some very expensive EDA CAD tool > programs that are scriptable using Tcl. I was wondering why these > companies have choose to use Tcl instead of Python. Some of these > are: > >Mentor Grap

Re: simple? embedding question

2007-10-30 Thread sndive
On Oct 30, 6:47 pm, Farshid Lashkari <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > i switched to PyImport_ImportModuleEx per your suggestion but i still > > get > > > Traceback (most recent call last): > > File "", line 1, in ? > > NameError: name '__main__' is not defined > > > i tri

sgmlop - xmlrpclib - bang

2007-10-30 Thread Grzegorz Makarewicz
simple data for simple test - my version fails after 10 loops after removing sgmlop.pyd from DLLs - everything is working as expected mak #python data='''\ mws.ScannerLogout 7 ''' import xmlrpclib def main(): i = 1 while 1: print i

Re: simple? embedding question

2007-10-30 Thread Farshid Lashkari
[EMAIL PROTECTED] wrote: > i switched to PyImport_ImportModuleEx per your suggestion but i still > get > > Traceback (most recent call last): > File "", line 1, in ? > NameError: name '__main__' is not defined > > i tried PyRun_SimpleString("__main__.foo.baz()"); : > Traceback (most recent call

Re: choose from a list

2007-10-30 Thread barronmo
I didn't know "result" was a list! Can all that info be stored in a list? How do the columns work? I was curious to see what the data looked like but I can't seem to print "result" from the prompt. Do variables used inside functions live or die once the function executes? If they die, how do I

Re: redundancy_check

2007-10-30 Thread Gabriel Genellina
En Tue, 30 Oct 2007 09:14:08 -0300, Beema shafreen <[EMAIL PROTECTED]> escribió: > hi everbody, > I have a file, > a b c > 1454VALTGLTVAEYFR8.9954e-07 > 1454VALTGLTVAEYFR0.00404626 > 1498STLTDSLVSK0.00404626 > 1505TIAM

Re: basic threading question

2007-10-30 Thread chris . monsanto
On Oct 30, 7:58 pm, "bambam" <[EMAIL PROTECTED]> wrote: > Are function variables thread safe? > > def f(a): > # whatever > return float(a) > > Is that OK? > > def f(a): > #whatever > b=a: > #whatever: > return float(b) > > Is that OK? > > Steve. Huh? -- http://mail.python

Re: Retrieving all open applications ...

2007-10-30 Thread Gabriel Genellina
En Tue, 30 Oct 2007 06:20:10 -0300, Ajay Deshpande <[EMAIL PROTECTED]> escribió: > I need to retrieve all currently open applications using a python > program. > So my output should be a list of window handles. Is there a module which > I > can use? "applications" or "windows"? You can use

Re: simple? embedding question

2007-10-30 Thread sndive
On Oct 30, 1:26 pm, Farshid Lashkari <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > suppose i have imported two modules foo and bar with > > foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar") > > respectively. > > > Now suppose I have an artitrary python expression to

Re: SOAPpy / WSDL help... please

2007-10-30 Thread sberry
On Oct 30, 4:10 pm, sberry <[EMAIL PROTECTED]> wrote: > I have an Adobe InDesign server running that includes a built-in SOAP > server. The wsdl is located here:http://www.seanberry.com/IDSP.wsdl. > > I have a PHP example that looks like this for calling the SOAP > function runScriptParameters >

basic threading question

2007-10-30 Thread bambam
Are function variables thread safe? def f(a): # whatever return float(a) Is that OK? def f(a): #whatever b=a: #whatever: return float(b) Is that OK? Steve. -- http://mail.python.org/mailman/listinfo/python-list

Re: why did these companies choose Tcl over Python

2007-10-30 Thread MrJean1
That is correct. Tcl has it roots at UC Berkeley and was originally used to provide a command line interface for electronic design automation (EDA) tools. Most commercial EDA vendors at that time were using their own, proprietary command language. Only later became Tcl widely adopted among EDA v

SOAPpy / WSDL help... please

2007-10-30 Thread sberry
I have an Adobe InDesign server running that includes a built-in SOAP server. The wsdl is located here: http://www.seanberry.com/IDSP.wsdl. I have a PHP example that looks like this for calling the SOAP function runScriptParameters //--

Re: choose from a list

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 5:08 pm, barronmo <[EMAIL PROTECTED]> wrote: > Thanks to both of you for the help. I made several of the changes you > suggested and am getting the results in the format I want, eg: > > 0 387 John Smith > 1 453 Jane Smith > 2 975 Joe Smithton > > My plan at this point is, in addit

Re: why did these companies choose Tcl over Python

2007-10-30 Thread Hrvoje Niksic
chewie54 <[EMAIL PROTECTED]> writes: >Mentor Graphics ModelTech VHDL and Verilog simulator >Synopsys Design Compiler and Primetime Static Timing Analyzer >Actel FPGA tools. How old are these tools? Tcl has been around as an extension language for a long time, longer than most curren

Re: why did these companies choose Tcl over Python

2007-10-30 Thread Martin v. Löwis
> I would prefer to use Python but can't deny how popular Tcl is, as > mentioned above, so my question is why wasn't Python selected by > these companies as the choice of scripting languages for their > product? I think this question needs to be answered on a case-by-case basis, but my guess is

Re: Is there a usenet library for Python?

2007-10-30 Thread Jean-Paul Calderone
On Tue, 30 Oct 2007 22:25:28 GMT, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: >Is there a Python library to communicate with a usenet server? I did a >bit of googling and found some sites that suggest that you can roll your own >fairly easily but, mostly, I got a lo

Re: Arp request to get MAc Adress with IP address

2007-10-30 Thread Jonathan Gardner
On Oct 30, 1:57 pm, [EMAIL PROTECTED] wrote: > Hello, > I have a network on same subnet. I have an ip address of a machine. > but i need to get its MAC Adress. > Sendingf ARP request is the way i am taking. > > IS there any other way to get this MAC Adress in python.?? > > Also does python go down

Re: why did these companies choose Tcl over Python

2007-10-30 Thread Jonathan Gardner
On Oct 30, 2:25 pm, chewie54 <[EMAIL PROTECTED]> wrote: > > I would prefer to use Python but can't deny how popular Tcl is, as > mentioned above, so my question is why wasn't Python selected by > these companies as the choice of scripting languages for their > product? > Here are some reasons wh

Re: Is there a usenet library for Python?

2007-10-30 Thread Grant Edwards
On 2007-10-30, Just Another Victim of the Ambient Morality <[EMAIL PROTECTED]> wrote: > Is there a Python library to communicate with a usenet server? Which protocol are you interested in, NNTP (for reading/posting from a client) or the other one that hosts use to transfer news feeds amongst the

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-30 Thread Martin v. Löwis
> Should I need to download a later version of tkinter and/or should I > alter setup.py in my python install directory and then remake? Neither, nor. You need the Tk header files installed; they probably come in a package called libtk8.4-dev or some such in your system. If they are present when se

Is there a usenet library for Python?

2007-10-30 Thread Just Another Victim of the Ambient Morality
Is there a Python library to communicate with a usenet server? I did a bit of googling and found some sites that suggest that you can roll your own fairly easily but, mostly, I got a lot of false positives with talk of Python libraries on usenet and I am really hoping this work has already

Re: Python Interview Questions

2007-10-30 Thread Ben Finney
Krypto <[EMAIL PROTECTED]> writes: > I am now appearing for Job Interviews these days and I am wondering > if anybody of you appeared for a Python Interview. Can you please > share the questions you were asked. That will be great help to me. I've given some interviews for programming positions. I

Re: Python Interview Questions

2007-10-30 Thread Tim Chase
>> Good luck with your interviewing and hope this helped, >> >> -tkc > > Well, I was looking exactly for this. Many thanks to you Tim. After > going through your list I came to know that I know nothing in Python > and have to catch up a whole lot. It was certainly not an exhaustive list of "you m

Re: choose from a list

2007-10-30 Thread barronmo
Thanks to both of you for the help. I made several of the changes you suggested and am getting the results in the format I want, eg: 0 387 John Smith 1 453 Jane Smith 2 975 Joe Smithton My plan at this point is, in addition to printing the results of the query, to create a list with a matc

Re: Metaclass vs Class factory

2007-10-30 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi all, > > I dare risk my brain exploding by reaching for the understanding of > metaclasses. > > At first i thought i almost got them, even if vaguely back in a corner > of my mind, my understanding was that, as classes' class a metaclass > would be able to return

Re: Parsing xml file in python

2007-10-30 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I am a newbie in python > I am trying to parse a xml file and write its content in a txt file. If you want to write code that does not hide your bugs behind cryptic event handlers and instead helps you get XML work done, try using ElementTree or lxml instead of SAX. The

Metaclass vs Class factory

2007-10-30 Thread [EMAIL PROTECTED]
Hi all, I dare risk my brain exploding by reaching for the understanding of metaclasses. At first i thought i almost got them, even if vaguely back in a corner of my mind, my understanding was that, as classes' class a metaclass would be able to return a different class based on input... ... unt

why did these companies choose Tcl over Python

2007-10-30 Thread chewie54
Hello, As an electronics engineer I use some very expensive EDA CAD tool programs that are scriptable using Tcl. I was wondering why these companies have choose to use Tcl instead of Python. Some of these are: Mentor Graphics ModelTech VHDL and Verilog simulator Synopsys Design Compiler

Re: parsing ast nodes help to get callfunc values.

2007-10-30 Thread Peter Otten
Glich wrote: > If some one could show me how to use something called "visitor"? import compiler module = """ def fun1(): print "Hi" fun2() fun4() def fun2(): pass def fun4(): pass fun1() fun3(fun2()) """ class Visitor: def visitCallFunc(self, node): print nod

Re: A class question

2007-10-30 Thread George Sakkis
On Oct 28, 6:01 am, Donn Ingle <[EMAIL PROTECTED]> wrote: > Is there a way I can, for debugging, access the instance variable name from > within a class? Shouldn't this be in a FAQ somewhere? It's the second time (at least!) it comes up this week. George -- http://mail.python.org/mailman/listi

Arp request to get MAc Adress with IP address

2007-10-30 Thread amjadcsu
Hello, I have a network on same subnet. I have an ip address of a machine. but i need to get its MAC Adress. Sendingf ARP request is the way i am taking. IS there any other way to get this MAC Adress in python.?? Also does python go down to level 2 of TCP/IP model?? Sorry if i am to naive. Just

Re: python in academics?

2007-10-30 Thread kyosohma
On Oct 30, 2:55 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > On Oct 29, 10:39 pm, sandipm <[EMAIL PROTECTED]> wrote: > > >>seeing posts from students on group. I am curious to know, Do they > >>teach python in academic courses in universities? > > >>in unde

Re: Python Interview Questions

2007-10-30 Thread Krypto
> Good luck with your interviewing and hope this helped, > > -tkc Well, I was looking exactly for this. Many thanks to you Tim. After going through your list I came to know that I know nothing in Python and have to catch up a whole lot. -- http://mail.python.org/mailman/listinfo/python-list

_tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-30 Thread wyleu
I'm running on Mandriva 2007 (2.6.17-5mdv) and thus have python2.4.3 installed by default, I'm running code requiring yield(), so need python2.5 and have installed this sucessfully, and linked appropriately to allow me to start python2.5 by typing python2.5. However I'd like to use idle so requir

Re: Iteration for Factorials

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 1:52 pm, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 30, 2007 at 11:37:57AM -0700, [EMAIL PROTECTED] wrote regarding > Re: Iteration for Factorials: > > > > > > > > > On Oct 30, 10:25 am, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > > > On Tue, Oct 30, 2007 at 01:09:3

Re: A class question

2007-10-30 Thread Bruno Desthuilliers
Hrvoje Niksic a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> > writes: > > >>>While Java's variable declarations bear a superficial (syntactical) >>>similarity to C, their semantics is in fact equivalent to the >>>object-reference semantics we know in Python. They implicitly refer >>>to ob

Re: setting variables in outer functions

2007-10-30 Thread Bruno Desthuilliers
brad a écrit : > Tommy Nordgren wrote: > >>> def outer(avar=False): >>> print avar >>> if avar == True: >>> return >>> >>> def inner(avar=True): >>> print avar >>> return avar >>> >>> outer(inner()) >>> >>> outer() > > >> This is not a general s

Re: python in academics?

2007-10-30 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Oct 29, 10:39 pm, sandipm <[EMAIL PROTECTED]> wrote: > >>seeing posts from students on group. I am curious to know, Do they >>teach python in academic courses in universities? >> >>in undergrad comp science courses, We had scheme language as scheme >>is neat and b

Re: Readline and record separator

2007-10-30 Thread Bruno Desthuilliers
Jeff a écrit : > If it's a short file you could slurp the entire file and then split it > however you like using regular expressions. My my my... > I'm not sure if you can alter it, You can. But it hopefully won't alter your binary-compiled system libs. IOW : it's so (obviously) useless that no

Re: Readline and record separator

2007-10-30 Thread Bruno Desthuilliers
Johny a écrit : > Is it possible to change record separator when using readline? > As far as I know readline reads characters until found '\n' and it is > the end of record for readline. This is not a "record" separator, but a newline. As the name implies, file.readline is about reading a text fi

Re: appending into a list

2007-10-30 Thread Bruno Desthuilliers
c james a écrit : > Beema shafreen wrote: > >> 2721520 2721569A_16_P21360235199-49 >> 2721768 2721821A_16_P03641971139-53 >> 2721960 2722004A_16_P21360237312-44 >>I need to append the column D and E into a list: >>in

Re: simple? embedding question

2007-10-30 Thread kyosohma
On Oct 30, 1:31 pm, [EMAIL PROTECTED] wrote: > suppose i have imported two modules foo and bar with > foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar") > respectively. > > Now suppose I have an artitrary python expression to evaluate. > Do I need to parse that thring and check f

Re: choose from a list

2007-10-30 Thread Bruno Desthuilliers
barronmo a écrit : > I'm new to programming and even newer to Python and would be grateful > for some help on what has been a tough problem for me. The project I > am working on is an electronic medical record using MySQL/Python. I'm > currrently working on a module that looks up a patient's name

parsing ast nodes help to get callfunc values.

2007-10-30 Thread Glich
""" Hi! This is my code so far: This code analyzes a python file. How can I separate CallFunc from the est of the ast node? file.py is as follows: _ def fun1(): print "Hi" fun2() fun4() def fun2(): pass def fun4(): pass fun1() _

Re: simple? embedding question

2007-10-30 Thread Farshid Lashkari
[EMAIL PROTECTED] wrote: > suppose i have imported two modules foo and bar with > foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar") > respectively. > > Now suppose I have an artitrary python expression to evaluate. > Do I need to parse that thring and check for foo. and bar. be

Re: A class question

2007-10-30 Thread Bruno Desthuilliers
Donn Ingle a écrit : >>vzcbeg vafcrpg >> >>qrs _svaq(senzr, bow): >>sbe anzr, inyhr va senzr.s_ybpnyf.vgrevgrzf(): >>vs inyhr vf bow: >>erghea anzr >>sbe anzr, inyhr va senzr.s_tybonyf.vgrevgrzf(): >>vs inyhr vf bow: >>erghea anzr >>envfr XrlReebe

Re: Python Interview Questions

2007-10-30 Thread Tim Chase
> I have used Python for a couple of projects last year and > I found it extremely useful. I could write two middle size > projects in 2-3 months (part time). Right now I am a bit > rusty and trying to catch up again with Python. > > I am now appearing for Job Interviews these days and I am

Re: Parsing xml file in python

2007-10-30 Thread J. Clifford Dyer
On Tue, Oct 30, 2007 at 11:45:17AM -0700, [EMAIL PROTECTED] wrote regarding Re: Parsing xml file in python: Top-posting corrected > > > > On Oct 30, 12:32 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] schrieb: > > > > > > > > > I am a newbie in python > > > I am

Re: Parsing xml file in python

2007-10-30 Thread Marc 'BlackJack' Rintsch
On Tue, 30 Oct 2007 11:45:17 -0700, amjadcsu wrote: > I am not getting into the xml parser. What does this mean!? > The error is not generated but also the /root/yhpc-2.0/ganglia.txt does > not contain anything. Maybe because… >> > def endElement(self,name): >> > if name=="HOST" an

Re: choose from a list

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 1:03 pm, barronmo <[EMAIL PROTECTED]> wrote: > I'm new to programming and even newer to Python and would be grateful > for some help on what has been a tough problem for me. The project I > am working on is an electronic medical record using MySQL/Python. I'm > currrently working on a

Re: Iteration for Factorials

2007-10-30 Thread J. Clifford Dyer
On Tue, Oct 30, 2007 at 11:37:57AM -0700, [EMAIL PROTECTED] wrote regarding Re: Iteration for Factorials: > > On Oct 30, 10:25 am, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > > On Tue, Oct 30, 2007 at 01:09:38PM +0100, Boris Borcic wrote regarding Re: > > Iteration for Factorials: > > > > >

Re: Parsing xml file in python

2007-10-30 Thread amjadcsu
That XML is just a snapshot I am not getting into the xml parser. The error is not generated but also the /root/yhpc-2.0/ganglia.txt does not contain anything. On Oct 30, 12:32 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > I am a newbie in python > > I

Re: Iteration for Factorials

2007-10-30 Thread [EMAIL PROTECTED]
On Oct 30, 10:25 am, "J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 30, 2007 at 01:09:38PM +0100, Boris Borcic wrote regarding Re: > Iteration for Factorials: > > > > > Py-Fun wrote: > > > I'm stuck trying to write a function that generates a factorial of a > > > number using iteratio

Re: Python Interview Questions

2007-10-30 Thread sndive
Krypto wrote: > Hi, > > I have used Python for a couple of projects last year and I found it > extremely useful. I could write two middle size projects in 2-3 months > (part time). Right now I am a bit rusty and trying to catch up again > with Python. > > I am now appearing for Job Interviews thes

Re: Parsing xml file in python

2007-10-30 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I am a newbie in python > I am trying to parse a xml file and write its content in a txt file. > The txt contains null elements. Any reason what iam doing wrong here > > > Here is the code that i wrote > > import sys,os > import xml.sax > import xml.sax.handler > fr

simple? embedding question

2007-10-30 Thread sndive
suppose i have imported two modules foo and bar with foo=PyImport_ImportModule("foo") and bar=PyImport_ImportModule("bar") respectively. Now suppose I have an artitrary python expression to evaluate. Do I need to parse that thring and check for foo. and bar. before jumping the usual PyModule_GetDi

Parsing xml file in python

2007-10-30 Thread amjadcsu
I am a newbie in python I am trying to parse a xml file and write its content in a txt file. The txt contains null elements. Any reason what iam doing wrong here Here is the code that i wrote import sys,os import xml.sax import xml.sax.handler from xml.sax.handler import ContentHandler from xml

Python Interview Questions

2007-10-30 Thread Krypto
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying to catch up again with Python. I am now appearing for Job Interviews these days and I am wondering if

choose from a list

2007-10-30 Thread barronmo
I'm new to programming and even newer to Python and would be grateful for some help on what has been a tough problem for me. The project I am working on is an electronic medical record using MySQL/Python. I'm currrently working on a module that looks up a patient's name based on input from the us

Re: dictionary and list

2007-10-30 Thread Gerardo Herzig
Beema shafreen wrote: >hi everbody, > I have a file, > a b c d e > 2722316 2722360A_16_P03641972150-44 > 2722510 2722554A_16_P2136023916-44 > 2722570 2722614A_16_P0364197

Re: Built-in functions and keyword arguments

2007-10-30 Thread Duncan Booth
"J. Clifford Dyer" <[EMAIL PROTECTED]> wrote: >> How do you interpret: >> >> >>> help(__import__) >> Help on built-in function __import__ in module __builtin__: >> >> __import__(...) >> __import__(name, globals={}, locals={}, fromlist=[], level=-1) -> >> module >> ... >> >>> help(int) >> Hel

Re: Solaris 10 + Sun Studio 12 Pyrhon 2.4.4 64-bit build problem

2007-10-30 Thread MrJean1
On final comment. For 64-bit usage, Python 2.5.1 is the better choice. More on that here . /Jean Brouwers On Oct 30, 10:15 am, MrJean1 <[EMAIL PROTECTED]> wrote: > Building 64-bit Python 2.4.4 on Solaris 10 and SUC C/C++ using the > instructions f

Re: Solaris 10 + Sun Studio 12 Pyrhon 2.4.4 64-bit build problem

2007-10-30 Thread MrJean1
Building 64-bit Python 2.4.4 on Solaris 10 and SUC C/C++ using the instructions from worked just fine on Ultra 20 Opteron machine. The test result summary is below. /Jean Brouwers 249 tests OK. 2 tests failed: te

Python Instructor Needed for GIS Symposium in April 2008

2007-10-30 Thread Eric . Foster
I am involved with MAGIC http://www.magicgis.org/ an organization to encourage GIS development, sharing, cooperation, etc. and educate practitioners in GIS. We hold a symposium every two years in April (next is April 2008) and provide speakers and workshops in relevant GIS subjects. ESRI's

Re: statvfs

2007-10-30 Thread Korthrun
At 2007-10-29, [EMAIL PROTECTED] expressed thier undying love for me by saying: > On Mon, 29 Oct 2007 16:52:12 -0500, Korthrun wrote: > >> I'm writing some scripts to populate RRD's, mainly for practicing python. >> >> As such I've decided to play with statvfs in order to build disk >> graphs. Her

Re: setting variables in outer functions

2007-10-30 Thread Duncan Booth
Neil Cerutti <[EMAIL PROTECTED]> wrote: > It's allows a standard programming idiom which provides a > primitive form of object oriented programming using closures to > represent state. > > def account(opening_balance): > balance = opening_balance > def get_balance(): > nonlocal balance >

Re: A Python 3000 Question

2007-10-30 Thread Paul Boddie
On 30 Okt, 15:09, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > [Language "OOness", hand-waving] > I disagree. I think they *do* take away from the overall Object-Oriented > nature of the language, and that is A Very Good Thing Indeed. But everything is an object in Python: not

Re: A Python 3000 Question

2007-10-30 Thread George Sakkis
On Oct 30, 11:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-10-30, Eduardo O. Padoan <[EMAIL PROTECTED]> wrote: > > > This is a FAQ: > >http://effbot.org/pyfaq/why-does-python-use-methods-for-some-function... > > Holy Airy Persiflage Batman! > > Python 2.5.1 (r251:54863, Apr 18 2007, 08:

Re: setting variables in outer functions

2007-10-30 Thread Steven Bethard
Neil Cerutti wrote: > On 2007-10-29, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Hrvoje Niksic wrote: >>> Tommy Nordgren <[EMAIL PROTECTED]> writes: >>> Given the following: def outer(arg) avar = '' def inner1(arg2) # How can I set 'avar' here ? >>> I d

Re: A Python 3000 Question

2007-10-30 Thread Jean-Paul Calderone
On Tue, 30 Oct 2007 15:25:54 GMT, Neil Cerutti <[EMAIL PROTECTED]> wrote: >On 2007-10-30, Eduardo O. Padoan <[EMAIL PROTECTED]> wrote: >> This is a FAQ: >> http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm > >Holy Airy

SQLObject 0.7.9

2007-10-30 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.9 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wit

SQLObject 0.9.2

2007-10-30 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.9.2 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wi

Re: setting variables in outer functions

2007-10-30 Thread Neil Cerutti
On 2007-10-29, Steven Bethard <[EMAIL PROTECTED]> wrote: > Hrvoje Niksic wrote: >> Tommy Nordgren <[EMAIL PROTECTED]> writes: >> >>> Given the following: >>> def outer(arg) >>> avar = '' >>> def inner1(arg2) >>> # How can I set 'avar' here ? >> >> I don't think you can, until

Re: A Python 3000 Question

2007-10-30 Thread Neil Cerutti
On 2007-10-30, Eduardo O. Padoan <[EMAIL PROTECTED]> wrote: > This is a FAQ: > http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm Holy Airy Persiflage Batman! Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.13

SQLObject 0.8.6

2007-10-30 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.8.6 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wi

Re: Iteration for Factorials

2007-10-30 Thread J. Clifford Dyer
On Tue, Oct 30, 2007 at 01:09:38PM +0100, Boris Borcic wrote regarding Re: Iteration for Factorials: > > Py-Fun wrote: > > I'm stuck trying to write a function that generates a factorial of a > > number using iteration and not recursion. Any simple ideas would be > > appreciated. > > > > fact

Re: Help ctypes on arm linux not compile

2007-10-30 Thread Samuel M. Smith
Sorry, thats a typo. Its python 2.5.1. as the error messages indicate. On 30 Oct 2007, at 02:55 , Thomas Heller wrote: > Samuel M. Smith schrieb: >> I have built python 1.5.1 from source for an embedded ARM9 debian >> linux Sarge distribution but >> ctypes doesn't build. Anybody have any idea wh

Re: Event for multithread help advice

2007-10-30 Thread Aahz
In article <[EMAIL PROTECTED]>, JoeSox <[EMAIL PROTECTED]> wrote: > >I have two threads going >class guiThread(threading.Thread) >class mainThread(threading.Thread) > >Within the guiThread, I have an instance of class GUIFramework(Frame) >in this Tkinter instance I have a ListBox. > >The second th

Re: Readline and record separator

2007-10-30 Thread BartlebyScrivener
On Oct 30, 7:21 am, Johny <[EMAIL PROTECTED]> wrote: > My problem is that my record consits several '\n' and when I use > readline it does NOT read the whole my record. > So If I could change '\n' as a record separator for readline, it > would solve my problem. Python Cookbook (great book!) 2nd E

logic programming in python (was something about py3k)

2007-10-30 Thread Jean-Paul Calderone
On Tue, 30 Oct 2007 14:09:39 -, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > [snip] > >(Aside: I think it a shame that there is one major paradigm that Python >doesn't have *any* support for at all: logic programming, like Prolog. I >don't quite know what it is good for, but I'd like to find

Earn Up To 100's of $ per Day with Ease!

2007-10-30 Thread jhon
Tired of business opportunities that do not deliver what they promise? Get Free Advice & a Honest Review on Internet Opportunities that Work! MOre details http://powerfulmoneymakingideas.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Hide comments in emacs python mode?

2007-10-30 Thread Charles Fox
Hi guys, I'm playing with Python in emacs, with python mode. I'd like to be able to press a key to toggle the code comments on and off -- to switch between beautiful clean Python code, and the full text that tells me what's going in in English. Is this currently possible? I know there is a hide

  1   2   >