Re: regex doubts

2008-07-21 Thread Fredrik Lundh
John Machin wrote: '\n' is an "other character". so how does a user enter that character? Perhaps you could explain what you mean by "$ does the right thing". wtf is wrong with you? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread Fredrik Lundh
Michael Torrie wrote: [EMAIL PROTECTED] wrote: I'm not dissing Python, here. Just noting that, if it is written in C, that throws a curve at me in trying to balance the value of learning Python vs. some other major language. Definitely one of the most non-sequitor statements I have ever hea

Re: Web Server

2008-07-21 Thread Fredrik Lundh
James Tanis wrote: there's also apache, of course, and a bunch of others, including several Python solutions (more or less pre-packaged). but the "open up" part still sounds a bit risky. maybe you could turn things around, and let the application "push" data to your server instead? Either

Re: running a script with an input file

2008-07-21 Thread Fredrik Lundh
David Bikard wrote: I'd like to run a program so that it reads the input() or raw_input() statements from an input file instead of reading from keyboard. I'd also like it to write the print statements in an output file rather than on the screen. I'm on windows XP and when I run: > prog_nam

Please recommend a RPC system working with twisted.

2008-07-21 Thread 一首诗
Hi all, I'm looking for an RPC system working with twisted. 1. Binary. I want it run faster than any xml based RPC. 2. Bidirectional. Unlike HTTP, on which the client has to poll the sever for events, the server should "call" the client's method to notify events. 3. C/Python support. Part o

Python game programming challenge, NUMBER 7, in September!

2008-07-21 Thread richard
The date for the SEVENTH bi-annual PyWeek challenge has been set: Sunday 7th September to Sunday 14th September (00:00UTC to 00:00UTC). http://pyweek.org/ The PyWeek challenge invites entrants to write a game in one week from scratch either as an individual or in a team. Entries must be develo

Python Written in C?

2008-07-21 Thread Peter Anderson
> Bah, new-fangled languages like Pascal... Real programmers write Fortran. Using punch-cards and paper-tape. Real programmers can edit their programs with a pointy stick and some home-made sticky-tape. -- Grant Edwards Reminds me of a funny story from my past working life. I had this fibre t

Re: regex doubts

2008-07-21 Thread Fredrik Lundh
Perhaps you could explain what you mean by "$ does the right thing". wtf is wrong with you? (I mean, you do know under what circumstances $ matches a newline character when used without modifiers, right? So why do you keep behaving like a reddit commenter?) -- http://mail.python.org/mai

What is the role of python2.6 and C++?

2008-07-21 Thread 甜瓜
Howdy, I'm confused about the motivation of releasing python2.6 and python3.0 at the *same* time. IMO, 2.6 should be compatible with 2.5 while 3.0 is new style python. Currenly, most python projects works fine in 2.5. When 3.0 becomes final release, those projects will be gradually moved to 3.0. B

Re: What is the role of python2.6 and C++?

2008-07-21 Thread cokofreedom
On Jul 21, 10:17 am, "甜瓜" <[EMAIL PROTECTED]> wrote: > Howdy, > > I'm confused about the motivation of releasing python2.6 and python3.0 > at the *same* time. IMO, 2.6 should be compatible with 2.5 while 3.0 > is new style python. Currenly, most python projects works fine in 2.5. > When 3.0 becomes

Re: What is the role of python2.6 and C++?

2008-07-21 Thread Marc 'BlackJack' Rintsch
On Mon, 21 Jul 2008 16:17:00 +0800, 甜瓜 wrote: > I'm confused about the motivation of releasing python2.6 and python3.0 > at the *same* time. IMO, 2.6 should be compatible with 2.5 while 3.0 > is new style python. That's how it is. 2.6 is backwards compatible with 2.5. > […] But even without the

Odd math related issue.

2008-07-21 Thread Robert Rawlins
Guys, I've got what seems to me to be a totally illogical math issue here which I can't figure out. Take a look at the following code: self.__logger.info("%i / %i" % (bytes_transferred, self.__sessions[path].total_bytes)) percentage = bytes_transferred / self.__sessions[pat

Re: What is the role of python2.6 and C++?

2008-07-21 Thread 甜瓜
> I will program larger projects in 2.5 for a while and then perhaps > look to move it to 2.6 and 2.7, I won't touch the 3.x series until it > is the common choice, much as a lot of people still program in 2.3/4. Oh, I see. It seems the gap between 2.5 and 3.0 is not so small. Therefore, even if 3

Re: Odd math related issue.

2008-07-21 Thread Fredrik Lundh
Robert Rawlins wrote: I’ve got what seems to me to be a totally illogical math issue here which I can’t figure out. Take a look at the following code: /self/.__logger.info(/"%i / %i"/ % (bytes_transferred, /self/.__sessions[path].total_bytes)) percentage = bytes_transferred

Re: checking if an object IS in a list

2008-07-21 Thread nicolas . pourcelot
On 20 juil, 07:17, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 19 Jul 2008 13:13:40 -0700, nicolas.pourcelot wrote: > > On 18 juil, 17:52, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> On Fri, 18 Jul 2008 07:39:38 -0700, nicolas.pourcelot wrote: > >> > So, I use somethi

Re: What is the role of python2.6 and C++?

2008-07-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: 2.6 is meant to be a continuation of the 2.x line of Python, to support a gradual move of larger projects over to the Python 3.x series. note that Python also has a tradition of releasing X.6 and (X+1).0 at the same time: http://mail.python.org/pipermail/python-anno

RE: Odd math related issue.

2008-07-21 Thread Robert Rawlins
> if you divide two integers, you'll get an integer back (in Python 2.X, > at least). quick fix: > > percentage = bytes_transferred * 100 / total_bytes > > Hey That worked a charm mate, thanks for the info. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Michiel Overtoom wrote: > Many major text/word processing programs (Emacs, vi, MS-Word) are also > written in C. Does that mean you should do all your text processing in C? How else would you implement a Boyer-Moore algorithm? -- http://mail.python.org/mailman/list

Re: atan2 weirdness

2008-07-21 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Carsten Haese wrote: > Since pi is close to 3 ... "Biblical pi" = 3. -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to match a string

2008-07-21 Thread oj
On Jul 19, 3:04 am, Andrew Freeman <[EMAIL PROTECTED]> wrote: > let me revise it please: > > To show if valid: > > if re.search(r'^[LRM]*$', 'LM'): >     print 'Valid' Fine, this works, although match instead of search blah blah blah as has already been mentioned. I still think searching for one i

Re: Python Written in C?

2008-07-21 Thread Iain King
On Jul 21, 6:58 am, "Krishnakant Mane" <[EMAIL PROTECTED]> wrote: > > First off all c# is absolute rubbish waist of time.  if I need to > learn it then I better lern java or pythonfor that matter.  and by the > way what is a "real programmer?" The story of a Real Programmer: http://www.pbm.com/~

Re: db question

2008-07-21 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Dennis Lee Bieber wrote: > On Sun, 20 Jul 2008 18:43:03 -0700, "bruce" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: >> >> mysql cmd - select * from foo where dog like "%small%"; >> >> sql ="""select * from foo where dog like "%%%s%%" """ >> c

Re: Genetic programming: pygene, pygp, AST, or (gasp) Lisp?

2008-07-21 Thread david . leoni . dontemailthisaddress
John Ladasky said: Why not do genetic programming directly on Python code? maybe Dione is what you are looking for - it seems to manipulate Python asts directly http://sourceforge.net/projects/dione/ -- http://mail.python.org/mailman/listinfo/python-list

calling source command within python

2008-07-21 Thread Jie
Hi all, i'm having trouble executing os.system('source .bashrc') command within python, it always says that source not found and stuff. Any clue? Thanks, Jie -- http://mail.python.org/mailman/listinfo/python-list

Re: trying to match a string

2008-07-21 Thread Fredrik Lundh
oj wrote: Fine, this works, although match instead of search blah blah blah as has already been mentioned. I still think searching for one invalid character is more elegant then trying to match the entire string, but that's just personal preference, I guess. The drawback is that it's a lot eas

Re: calling source command within python

2008-07-21 Thread Fredrik Lundh
Jie wrote: i'm having trouble executing os.system('source .bashrc') command within python, it always says that source not found and stuff. Any clue? like in $ python >>> import os >>> os.system("source .bashrc") sh: source not found and stuff 256 ? I get $ python

Re: trying to match a string

2008-07-21 Thread oj
On Jul 21, 11:04 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > The drawback is that it's a lot easier to mess up the edge cases if you > do that (as this thread has shown).  The small speedup you get in > typical cases is quickly offset by extra debugging/testing time (or, for > that matter, argui

Parsing VHDL with python, where to start.

2008-07-21 Thread Svenn Are Bjerkem
Hi, I am in the need to write an application for PyQt to visualise the structure of a VHDL project I am working on. Looking for a sensible way to parse VHDL files and putting them into a data structure that PyQt can represent as a tree (or whatever the MVC is supporting) through search engines does

Daemonize an application.

2008-07-21 Thread Robert Rawlins
Guys, I've been looking to run one of my applications as a Deamon on a linux based system. I've been looking at this recipe this morning and it all looks relatively fine: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 I just noted that the recipe was written 5 years ago

howto check is function capable of obtaining **kwargs?

2008-07-21 Thread dmitrey
hi all, howto check is function capable of obtaining **kwargs? i.e. I have some funcs like def myfunc(a,b,c,...):... some like def myfunc(a,b,c,...,*args):... some like def myfunc(a,b,c,...,*args, **kwargs):... some like def myfunc(a,b,c,...,zz=zz0):... So I need to know is the given function

Re: howto check is function capable of obtaining **kwargs?

2008-07-21 Thread Bruno Desthuilliers
dmitrey a écrit : hi all, howto check is function capable of obtaining **kwargs? i.e. I have some funcs like def myfunc(a,b,c,...):... some like def myfunc(a,b,c,...,*args):... some like def myfunc(a,b,c,...,*args, **kwargs):... some like def myfunc(a,b,c,...,zz=zz0):... So I need to know is

Re: Genetic programming: pygene, pygp, AST, or (gasp) Lisp?

2008-07-21 Thread dmitrey
also, you could look at the simple openopt example provided by GA "galileo" solver (connected to OO framework) http://projects.scipy.org/scipy/scikits/browser/trunk/openopt/scikits/openopt/examples/glp_1.py http://scipy.org/scipy/scikits/wiki/GLP Regards, D -- http://mail.python.org/mailman/listinf

Re: Please recommend a RPC system working with twisted.

2008-07-21 Thread Diez B. Roggisch
一首诗 wrote: > Hi all, > > I'm looking for an RPC system working with twisted. > > 1. Binary. I want it run faster than any xml based RPC. > > 2. Bidirectional. Unlike HTTP, on which the client has to poll the > sever for events, the server should "call" the client's method to > notify events.

Re: Python Written in C?

2008-07-21 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip clueless nonsense) Surely a troll... No one on earth can be *that* clueless. -- http://mail.python.org/mailman/listinfo/python-list

How to install simplejson on WinXP

2008-07-21 Thread lookon
I am new to python and had difficulty in installing simplejson on WinXP...Could anyone help me? Thanks -- http://mail.python.org/mailman/listinfo/python-list

simple question about dictionaries

2008-07-21 Thread skazhy
hi, i am new to python, so i've a really simple question about dictionaries. if i have a dictionary and I make have an input after it (to input numbers) can i get the key of value that was in input? somehting like this: dict = { "key1"=100,"key2"=200,"key3"=300} a = input() print 'the key of input

Problem with Python Server Pages (PSP)

2008-07-21 Thread barun . saha04
Hi, I am facing a very basic problem with PSP. I have installed mod_python (in fedora Core 1), added the lines required for loading Python modules and handling PSP pages. I have created a hello.psp page. But when I try to view this hello.psp page, all Python code are getting displayed. The said p

Re: howto check is function capable of obtaining **kwargs?

2008-07-21 Thread Chris
On Jul 21, 1:20 pm, dmitrey <[EMAIL PROTECTED]> wrote: > hi all, > howto check is function capable of obtaining **kwargs? > > i.e. I have some funcs like > def myfunc(a,b,c,...):... > > some like > def myfunc(a,b,c,...,*args):... > > some like > def myfunc(a,b,c,...,*args, **kwargs):... > > some li

Re: simple question about dictionaries

2008-07-21 Thread Berco Beute
Sounds like a school assignment. Find the answer yourself here: http://diveintopython.org/toc/index.html You'll learn a lot more in the process. 2B -- http://mail.python.org/mailman/listinfo/python-list

Python Embedding Thread

2008-07-21 Thread otr2
Hi :) I want to run Python in my app. That works still fine. But my app supports now Threads and I would like to know what to do, that it runs without problems. PyGILState_Release and PyGILState_Ensure should solve the problem right? Where do I have to put this two commands around? between each C

Re: simple question about dictionaries

2008-07-21 Thread Fredrik Lundh
skazhy wrote: hi, i am new to python, so i've a really simple question about dictionaries. if i have a dictionary and I make have an input after it (to input numbers) can i get the key of value that was in input? A dictionary contains (key, value) pairs, and is optimized for quickly finding t

Re: simple question about dictionaries

2008-07-21 Thread Jeff
On Jul 21, 7:35 am, skazhy <[EMAIL PROTECTED]> wrote: > hi, i am new to python, so i've a really simple question about > dictionaries. > if i have a dictionary and I make have an input after it (to input > numbers) can i get the key of value that was in input? > > somehting like this: > dict = { "k

Re: simple question about dictionaries

2008-07-21 Thread Fredrik Lundh
Jeff wrote: throw KeyError('%s not found' % str(val)) "throw"? and shouldn't that be a ValueError? ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd math related issue.

2008-07-21 Thread Alexandru Palade
However, you should be carefully because using an %i modifier for a what-should-be a float value truncates the value in a way you may not expect. What I mean is that if you have sent 2 out of 3 bytes, the math will be 200/3 which with the %i modifier will print 66, rather than 66.6 (or at least 6

Re: Odd math related issue.

2008-07-21 Thread Fredrik Lundh
Alexandru Palade wrote: However, you should be carefully because using an %i modifier for a what-should-be a float value truncates the value in a way you may not expect. What I mean is that if you have sent 2 out of 3 bytes, the math will be 200/3 which with the %i modifier will print 66, rathe

error

2008-07-21 Thread Anish Chapagain
from Tkinter import * root=Tk() f=Frame(root,height=200,width=200) b=Button(f,text="quit",command=f.quit) f.pack() root.mainloop() -- from Tkinter import * import sys root=Tk() f=Frame(root,height=200,width=200) b=Button(f,text="quit",command=sys.exi

Re: Odd math related issue.

2008-07-21 Thread John Machin
On Jul 21, 10:21 pm, Alexandru Palade <[EMAIL PROTECTED]> wrote: > > Another thing, you could have just added a dot after the constant in > order to promote the expression to be evaluated as float. As in > percentage = bytes_transferred / /self/.__sessions[path].total_bytes > * 100. > (notice t

Re: error

2008-07-21 Thread Fredrik Lundh
Anish Chapagain wrote: from Tkinter import * root=Tk() f=Frame(root,height=200,width=200) b=Button(f,text="quit",command=f.quit) f.pack() root.mainloop() -- from Tkinter import * import sys root=Tk() f=Frame(root,height=200,width=200) b=Button(f,t

Re: How to install simplejson on WinXP

2008-07-21 Thread Fredrik Lundh
lookon wrote: I am new to python and had difficulty in installing simplejson on WinXP...Could anyone help me? Thanks what did you try, and what happened when you tried that? -- http://mail.python.org/mailman/listinfo/python-list

Re: error

2008-07-21 Thread Anish Chapagain
On Jul 21, 1:47 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Anish Chapagain wrote: > > from Tkinter import * > > root=Tk() > > f=Frame(root,height=200,width=200) > > b=Button(f,text="quit",command=f.quit) > > f.pack() > > root.mainloop() > > > -- >

Re: Python Written in C?

2008-07-21 Thread ptn
On Jul 20, 5:50 pm, [EMAIL PROTECTED] wrote: > I'm just learning about Python now and it sounds interesting. But I > just read (on the Wiki page) that mainstream Python was written in C. > That's what I was searching for: Python was written in what other > language? > > See, my concern was somethin

ntlm authentication

2008-07-21 Thread Neuberger, Sheldon N.
Is there any way to make urllib2 handle NTLM authentication? Sheldon Neuberger -- http://mail.python.org/mailman/listinfo/python-list

how to create GUI dynamically

2008-07-21 Thread hitechpundir
Hi; i m working on a project where i need run time creation of GUI. i have some no. of entities for which i want checkboxes in front of them which can be checked/ unchecked by user. But the problem is that the number and name of entities is not fixed and it depends on the file which is used as

ANN: eGenix EuroPython 2008 Presentations & Videos

2008-07-21 Thread eGenix Team: M.-A. Lemburg
eGenix EuroPython 2008 Presentations & Videos We have uploaded our EuroPython 2008 presentations to our website. Learn the concepts behi

Re: Odd math related issue.

2008-07-21 Thread sahasranaman
On Jul 21, 5:30 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Alexandru Palade wrote: > > However, you should be carefully because using an %i modifier for a > > what-should-be a float value truncates the value in a way you may not > > expect. > > > What I mean is that if you have sent 2 out of 3

Re: Odd math related issue.

2008-07-21 Thread sahasranaman
On Jul 21, 5:30 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Alexandru Palade wrote: > > However, you should be carefully because using an %i modifier for a > > what-should-be a float value truncates the value in a way you may not > > expect. > > > What I mean is that if you have sent 2 out of 3

imported module no longer available

2008-07-21 Thread Jeff Dyke
I've come across an error that i'm not yet able to create a test case for but wanted to get see if someone could shed light on this. I have imported a module at the top of my file with import mymodulename this module is used many times in the current file successfully, but then I attempt to use i

Almost keywords

2008-07-21 Thread bearophileHUGS
Once in a while I feel free to write about less defined things, saying mostly wrong things. This post is mostly chat, if you aren't interested please ignore it. Python is fit enough for newbie programmers, but some of its characteristics can confuse them still, like the variables referenced by nam

Re: error

2008-07-21 Thread Fredrik Lundh
Anish Chapagain wrote: hi thank's i probably missed the b.pack() but it's till the window is not closed and error message of Windows Appear what does that error message say? -- http://mail.python.org/mailman/listinfo/python-list

Re: imported module no longer available

2008-07-21 Thread Mark Tolonen
"Jeff Dyke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I've come across an error that i'm not yet able to create a test case for but wanted to get see if someone could shed light on this. I have imported a module at the top of my file with import mymodulename this module is u

Re: Python Written in C?

2008-07-21 Thread Martin P. Hellwig
Bruno Desthuilliers wrote: [EMAIL PROTECTED] a écrit : (snip clueless nonsense) Surely a troll... No one on earth can be *that* clueless. I disagree he has upper management written all over him. -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the role of python2.6 and C++?

2008-07-21 Thread Ulrich Eckhardt
甜瓜 wrote: > Another question is about the future of C++. I am a C++ programmer. > Since I studied python, most of my projects becomes written in python > because of the better and simpler OOP representation. As a supplement, > I use python C extension for computational extensive jobs. Therefore, >

Re: Odd math related issue.

2008-07-21 Thread Fredrik Lundh
sahasranaman wrote: Use 2.0 / 3 * 100 to solve this. Why make things look bigger? you mean that a.0 / 3 * 100 works in your Python version? that's interesting. (maybe you should at least skim the the thread before you jump in?) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread rynt
On Jul 20, 3:50 pm, [EMAIL PROTECTED] wrote: > I'm just learning about Python now and it sounds interesting. But I > just read (on the Wiki page) that mainstream Python was written in C. > That's what I was searching for: Python was written in what other > language? > > See, my concern was somethin

Re: imported module no longer available

2008-07-21 Thread Fredrik Lundh
Jeff Dyke wrote: I've come across an error that i'm not yet able to create a test case for but wanted to get see if someone could shed light on this. I have imported a module at the top of my file with import mymodulename this module is used many times in the current file successfully, but the

Re: Python Written in C?

2008-07-21 Thread Fredrik Lundh
rynt wrote: You're either --- A. A Troll B. A young, immature programmer trying to show off or C. A total idiot. you forgot the "All of the above" choice. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread Matthew Fitzgibbons
Martin P. Hellwig wrote: I disagree he has upper management written all over him. In any case, the OP should remember that programming languages are all theoretically the same: if you can do it in one language, then you can theoretically do it any other. When choosing a language, you just ne

Website Creation using Python

2008-07-21 Thread Amie
Afternoon, I would like some help on how to create a website using the python programming language. I've tried using enamel, but had some problems because I could not create html tables and intergrating it with python, like you use it when coding in php. Any help would be appreciated. Thanks --

Re: ntlm authentication

2008-07-21 Thread Tim Golden
Neuberger, Sheldon N. wrote: Is there any way to make urllib2 handle NTLM authentication? Frankly, I'd hate to try. Have a look at this: http://sourceforge.net/projects/ntlmaps/ in case it helps, either by providing a solution or at least by illustrating some code. In addition, look at the s

Safe guard .pyc files

2008-07-21 Thread King
After google a lot I didn't find any way to safe guard .pyc files from decompilation. One way I can think of is to wrap important functions/classes as a libraby using SWIG/PyRex, but again is going to be a lot more of work and doesn't sound good. any body out there has done something for this? --

Re: Safe guard .pyc files

2008-07-21 Thread Fredrik Lundh
King wrote: After google a lot I didn't find any way to safe guard .pyc files from decompilation. There's no bullet-proof way to do that (the interpreter needs the bytecodes to be able to run your program, so unless you create your own Python runtime, someone could always run your program wi

Re: ntlm authentication

2008-07-21 Thread Grant Edwards
On 2008-07-21, Tim Golden <[EMAIL PROTECTED]> wrote: > Neuberger, Sheldon N. wrote: >> Is there any way to make urllib2 handle NTLM authentication? > > Frankly, I'd hate to try. Have a look at this: > > http://sourceforge.net/projects/ntlmaps/ Here's a library that can be used to handle the NTLM a

Re: sending input to an embedded application

2008-07-21 Thread Matthew Fitzgibbons
mefyl wrote: Uwe Schmitt wrote: On 12 Jul., 09:08, George Oliver <[EMAIL PROTECTED]> wrote: What I would like to do is take a program and embed it or put it within a Python-run GUI, using the GUI just to capture and send input to the application, and display the ouput. Which interface does you

Re: how to create GUI dynamically

2008-07-21 Thread TheSeeker
On Jul 21, 8:19 am, [EMAIL PROTECTED] wrote: > Hi; > > i m working on a project where i need run time creation of GUI. > > i have some no. of entities for which i want checkboxes in front of > them which can be checked/ unchecked by user. > > But the problem is that the number and name of entities

Re: Weird Python startup behavior between different drives on PowerPC platform

2008-07-21 Thread jwahlmann
Bump. Anyone have any ideas on this? My next step is to either link together a static version of the compiler or create a debug version. Thanks, Jon On Jul 18, 11:43 am, [EMAIL PROTECTED] wrote: > I'm experiencing some strange behavior when starting up python on a > Debian-based PowerPC platfor

Re: Python Written in C?

2008-07-21 Thread mk
Grant Edwards wrote: Using punch-cards and paper-tape. Real programmers can edit their programs with a pointy stick and some home-made sticky-tape. Wrong! Real programmers can program using only Touring machine (and something having to do with post for some reason). I'm sure our brilliant O

Getting the name of a variable which was used as a function parameter.

2008-07-21 Thread Ravi Kotecha
Hi guys, I thought this was pretty cool and since I spent 30 mins or so goggling before giving up and figuring out myself I thought I'd share it with you. >>> def a(a): ... for k,v in sys._getframe(1).f_locals.items(): ... if id(v) == id(a): ... print k ... >>> hello = 12

Re: Python Written in C?

2008-07-21 Thread Tim Golden
mk wrote: Grant Edwards wrote: Using punch-cards and paper-tape. Real programmers can edit their programs with a pointy stick and some home-made sticky-tape. Wrong! Real programmers can program using only Touring machine Is that some kind of bicycle? TJG -- http://mail.python.org/mailman/

Seriously, though, about LLVM

2008-07-21 Thread mk
http://llvm.org/ This project has gained some publicity. There's IronPython, right, so has anybody thought about implementing Python using LLVM as backend, as it seems not out of question at all? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread Fredrik Lundh
Tim Golden wrote: Wrong! Real programmers can program using only Touring machine Is that some kind of bicycle? there's a nearly infinite number of software projects with that name, but the Ultimate Touring Machine could be found in sydney not long ago: http://tinyurl.com/5t2dl4 --

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
On Fri, Jul 18, 2008 at 10:34:41PM -0700, Dennis Lee Bieber wrote: > On Fri, 18 Jul 2008 19:14:43 -0400, Derek Martin <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > On Fri, Jul 18, 2008 at 03:46:13PM -0700, Joel Teichroeb wrote: > > > Calling Windows PC seems to be someth

Re: Python Written in C?

2008-07-21 Thread Marcus.CM
Hi everyone, Yes, python is written in C. Maybe the original poster is looking for "ultimate" language and thus finds it uncomfortable that python should be written in C and not python itself. Actually it doesnt matter if IronPython is written in C# and Python in C. Each programming language i

Re: Python Written in C?

2008-07-21 Thread mk
Who cares what language a language is written in as long as you can be productive - which you certainly can be in Python. Seriously, though, would there be any advantage in re-implementing Python in e.g. C++? Not that current implementation is bad, anything but, but if you're not careful,

Re: Python Written in C?

2008-07-21 Thread Marcus.CM
Its called a BMW today. Fredrik Lundh wrote: Tim Golden wrote: Wrong! Real programmers can program using only Touring machine Is that some kind of bicycle? there's a nearly infinite number of software projects with that name, but the Ultimate Touring Machine could be found in sydney not

Re: Seriously, though, about LLVM

2008-07-21 Thread Fredrik Lundh
mk wrote: This project has gained some publicity. There's IronPython, right, so has anybody thought about implementing Python using LLVM as backend, as it seems not out of question at all? you mean like: http://llvm.org/ProjectsWithLLVM/#pypy ? -- http://mail.python.org/mailman/listi

RE: Python Written in C?

2008-07-21 Thread Michael . Coll-Barth
> > From: mk > Wrong! Real programmers can program using only Touring machine (and > something having to do with post for some reason). I'm sure our > brilliant OP[1] could program in both. Ah, now we can really got OT. My favorite Touring machine is a Jaguar ( with the pronounced 'U' in t

Re: Please recommend a RPC system working with twisted.

2008-07-21 Thread mk
Unfortunately, there seems no such resolution existed. So maybe I have to give up some requirements. Why not PYRO? Note: I haven't used it. -- http://mail.python.org/mailman/listinfo/python-list

Re: win32api not found?

2008-07-21 Thread norseman
Lamonte Harris wrote: Where can I get the win32api module? I been searching all day on google and nothing, i installed https://sourceforge.net/project/showfiles.php?group_id=78018 which requires win32api and its not found...

Re: imported module no longer available

2008-07-21 Thread Jeff Dyke
my apologies, to Fredrick, my response when solely to him. reply below, hopefully keeping thread intact. On Mon, Jul 21, 2008 at 12:28 PM, Jeff Dyke <[EMAIL PROTECTED]> wrote: > On Mon, Jul 21, 2008 at 10:19 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: >> Jeff Dyke wrote: >> >>> I've come across

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
On Sat, Jul 19, 2008 at 02:56:07AM -0700, Lie wrote: > On Jul 19, 6:14 am, Derek Martin <[EMAIL PROTECTED]> wrote: > > On Fri, Jul 18, 2008 at 03:46:13PM -0700, Joel Teichroeb wrote: > > Much like the English word "bank" (and numerous others), the term "PC" > > has come to have several meanings, on

Re: Python Embedding Thread

2008-07-21 Thread googler . 1 . webmaster
Does anyone has a tip? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-21 Thread Matthew Woodcraft
Roy Smith <[EMAIL PROTECTED]> wrote: > C is the highest level assembler language I've ever used. And I've used a > few. It really is cool that you can add two 32-bit integers and not have > to worry about all those carry bits. I was ever so pleased when I found out that the LLVM people have l

Re: Run as Service

2008-07-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: I have, in the past, used SRVANY to run a Python app as a Windows service. However, now I am interested in distributing my scripts and want to make it as painless for the end user as possible (hands-off is best :). How can you go about running a Python app as a Windows

Re: Change PC to Win or Windows

2008-07-21 Thread Derek Martin
On Sat, Jul 19, 2008 at 02:56:07AM -0700, Lie wrote: > government, etc. IBM PC is one of the first computers that ordinary > people could possess, when IBM-clones appeared on the market, they're > referred as PCs too because they are Personal Computer, a computer > that is designed for personal use

scanf in python

2008-07-21 Thread AMD
Hello, I often need to parse strings which contain a mix of characters, integers and floats, the C-language scanf function is very practical for this purpose. I've been looking for such a feature and I have been quite surprised to find that it has been discussed as far back as 2001 but never

Re: Please recommend a RPC system working with twisted.

2008-07-21 Thread Larry Bates
??? wrote: Hi all, I'm looking for an RPC system working with twisted. 1. Binary. I want it run faster than any xml based RPC. 2. Bidirectional. Unlike HTTP, on which the client has to poll the sever for events, the server should "call" the client's method to notify events. 3. C/Python sup

Re: how to create GUI dynamically

2008-07-21 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi; i m working on a project where i need run time creation of GUI. i have some no. of entities for which i want checkboxes in front of them which can be checked/ unchecked by user. But the problem is that the number and name of entities is not fixed and it depends on

Re: how to create GUI dynamically

2008-07-21 Thread Peter Wang
On Jul 21, 8:19 am, [EMAIL PROTECTED] wrote: > Hi; > > i m working on a project where i need  run time creation of GUI. > > i have some no. of entities for which i want checkboxes in front of > them which can be checked/ unchecked by user. > > But the problem is that the number and name of entities

Re: Python Written in C?

2008-07-21 Thread Marc 'BlackJack' Rintsch
On Mon, 21 Jul 2008 17:06:03 +0100, Tim Golden wrote: > mk wrote: > >> Wrong! Real programmers can program using only Touring machine > > Is that some kind of bicycle? Maybe it's a Turing machine after Bicycle Repair Man got his hands on it!? Ciao, Marc 'BlackJack' Rintsch -- http://mai

Re: Python Written in C?

2008-07-21 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > I'm just learning about Python now and it sounds interesting. But I > > just read (on the Wiki page) that mainstream Python was written in C. > > That's what I was searching for: Python w

  1   2   >