Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Bengt Richter
On Wed, 05 Oct 2005 11:10:58 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: >Antoon Pardon wrote: >> Op 2005-10-04, Ron Adam schreef <[EMAIL PROTECTED]>: >> >>>Antoon Pardon wrote: >>> Op 2005-10-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >And lo, one multi-billion dollar Mars lander

Re: Class methods

2005-10-06 Thread Steve Holden
Gerrit Holl wrote: > Laszlo Zsolt Nagy wrote: > >>>Oh man, it has been a long time I have read such an disturbing question. >>> >>>RTMF here: http://docs.python.org/lib/built-in-funcs.html#l2h-14 >>> >>> >> >>I feel I was a bit harsh. > > > Of course, those posts do keep the Google count for t

Re: dictionary interface

2005-10-06 Thread Bengt Richter
On 5 Oct 2005 08:23:53 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2005-10-05, Tom Anderson schreef <[EMAIL PROTECTED]>: >> On Tue, 4 Oct 2005, Robert Kern wrote: >> >>> Antoon Pardon wrote: >>> class Tree: def __lt__(self, term): return set(self.iteritems())

Re: Python, Mysql, insert NULL

2005-10-06 Thread Steve Holden
Thomas Bartkus wrote: [...] > > Others here have pointed out that the Python keyword "None" is converted to > "Null" when passed to MySQL. I don't quite understand this and don't really > care. If I have a Python variable that has a value None, and I want to > transmit this to MySQL as Null - I w

Copy files to Linux server through ssh tunnel

2005-10-06 Thread durumdara
Hi ! I have some backup files on a server farm. I want to store these local backup files on a backup file server for "safety's snake". These files are compressed zip files with 12 character length password. But my system admin asked me, how can I improve the safety of the copy operation, and the

Copy files to Linux server through ssh tunnel

2005-10-06 Thread durumdara
Hi ! I have some backup files on a server farm. I want to store these local backup files on a backup file server for "safety's snake". These files are compressed zip files with 12 character length password. But my system admin asked me, how can I improve the safety of the copy operation, and the

Copy files to Linux server through ssh tunnel

2005-10-06 Thread durumdara
Hi ! I have some backup files on a server farm. I want to store these local backup files on a backup file server for "safety's snake". These files are compressed zip files with 12 character length password. But my system admin asked me, how can I improve the safety of the copy operation, and the

Re: Using command line args on Windows

2005-10-06 Thread Diez B. Roggisch
k8 wrote: > Thank you thank you thank you- The windows command line sol worked. It sure does. But it sucks.. bad tab-completion, few tools, short history, limited command-line-editing and so on. But if you want it the hard way, it's your choice :) Diez -- http://mail.python.org/mailman/listinf

Re: check html file size

2005-10-06 Thread Ulrich Hobelmann
Sherm Pendley wrote: > I'm guessing you didn't get the joke then. I think Richard's response was a > parody of Xah's "style" - a funny parody, at that. If you take all the line noise in Perl as swearing ;) I suppose I'm lucky I can't read it. -- We're glad that graduates already know Java, so we

Re: Copy files to Linux server through ssh tunnel

2005-10-06 Thread Martin Franklin
[EMAIL PROTECTED] wrote: > Hi ! > > I have some backup files on a server farm. > I want to store these local backup files on a backup file server for > "safety's snake". > > These files are compressed zip files with 12 character length password. > But my system admin asked me, how can I improve t

Re: Python, Mysql, insert NULL

2005-10-06 Thread Python_it
Thanks for the many replies! The problem was that is use '%s', i have to use %s and then my problem is solved. -- http://mail.python.org/mailman/listinfo/python-list

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Antoon Pardon
Op 2005-10-05, Mike Meyer schreef <[EMAIL PROTECTED]>: > Antoon Pardon <[EMAIL PROTECTED]> writes: They also relieve a burden from the run-time, since all variables are declared, the runtime doesn't has to check whether or not a variable is accesible, it knows it is. >>> Not in a dyn

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Antoon Pardon
Op 2005-10-05, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: >> This is naive. Testing doesn't guarantee anything. If this is what you >> think about testing, then testing gives you a false impression of >> security. Maybe we should drop testing. > > Typechecking is done by a reduced lamda calculus

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Duncan Booth
Antoon Pardon wrote: >> from xml.dom import * >> >> def do_add(x, y): >> return '%s://%s' % (x, y) >> >> def do_something(node): >> if node.namespace == XML_NAMESPACE: >> return do_add('http://', node.namespace) >> elif node.namespace == ... >> ... >> > > IMO your var

Help-log in to a web page

2005-10-06 Thread Murugesh
Hi all, I'm a newbie to python.I need to login to a webpage after supplying usename and password. import urllib sock = urllib.urlopen("http://xop-pc.main.com";) htmlSource = sock.read() sock.close() print htmlSource In

Re: dictionary interface

2005-10-06 Thread Antoon Pardon
Op 2005-10-05, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Op 2005-10-05, Steve Holden schreef <[EMAIL PROTECTED]>: > [...] >> >> Anyway, I have searched the source of the test for all testing >> with regards to < and after some browsing back and fore it seems >> it all boi

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Brian Quinlan
Paul Rubin wrote: > Brian Quinlan <[EMAIL PROTECTED]> writes: > >>OK. The Python compiler would check that the name is declared but it >>would not check that it is defined before use? So this would be >>acceptable: >> >>def foo(): >> local x >> return x > > > Come on, you are asking sill

Re: Help-log in to a web page

2005-10-06 Thread Laszlo Zsolt Nagy
Murugesh wrote: >Hi all, >I'm a newbie to python.I need to login to a webpage after supplying >usename and password. > >import urllib >sock = urllib.urlopen("http://xop-pc.main.com";) >htmlSource = sock.read() >sock.close() >pri

Class property (was: Class methods)

2005-10-06 Thread Laszlo Zsolt Nagy
Hughes, Chad O wrote: > Is there any way to create a class method? I can create a class > variable like this: > Hmm, seeing this post, I have decided to implement a 'classproperty' descriptor. But I could not. This is what I imagined: class A(object): _x = 0 @classmethod def get_x(

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> writes: > The value XML_NAMESPACE was imported from xml.dom, but the xml package is > kind of weird. XML_NAMESPACE defined both in xml.dom and in the > _xmlplus.dom package. The _xmlplus package is conditionally imported by the > xml package, and completely repla

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Paul Rubin
Brian Quinlan <[EMAIL PROTECTED]> writes: > I'm not trying to be silly. I am trying to get a handle on the > semantics that you are proposing. So we now have two requirements for > the new declaration syntax (please let me know if I'm wrong): > > o the variable must be declared > o the variable mu

Re: Help-log in to a web page

2005-10-06 Thread Murugesh
Laszlo Zsolt Nagy wrote: Murugesh wrote: Hi all, I'm a newbie to python.I need to login to a webpage after supplying usename and password. import urllib   sock = urllib.urlopen("http://xop-pc.main.com") htmlSource = sock.read()   sock.close()

Re: Class property (was: Class methods)

2005-10-06 Thread Peter Otten
Laszlo Zsolt Nagy wrote: > I was trying for a while, but I could not implement a 'classproperty' > function. Is it possible at all? You could define a "normal" property in the metaclass: > class A: ... class __metaclass__(type): ... @property ... def clsprp(cls):

Compile as static

2005-10-06 Thread tjue1
Hello List Has anyone had any luck with this? Im trying to compile python 2.4.2 on Slackware 10.1 into one large executable. One which contains everything required to run python (as static). So python doesn't look for dynamically shared objects like libpthread.so.0. I have tried ./configure --dis

Re: Help-log in to a web page

2005-10-06 Thread Murugesh
Murugesh wrote: Laszlo Zsolt Nagy wrote: Murugesh wrote: Hi all, I'm a newbie to python.I need to login to a webpage after supplying usename and password. import urllib   sock = urllib.urlopen("http://xop-pc.main.com") htmlSource = sock.read()   

Re: Help-log in to a web page

2005-10-06 Thread Chris Dewin
On Thu, 06 Oct 2005 14:51:31 +0530, Murugesh wrote: > id="username" class="x4" onkeypress="return > _submitOnEnter(event, 'User');" name="j_username" size="30" > type="text" value="myadmin"> I'm a novice too. But that looks to me like a javascript method. At a guess, it probably

Re: Swig and pointers

2005-10-06 Thread Miki Tebeka
Hello Java, > ... > extern int doIt(char *a, MY_DIGIT **digit); > %include cpointer.i > %pointer_functions(MY_DIGIT, md_prt); Don't you mean md_ptr? > %typemap(in) (char *a, MY_DIGIT **argv) { > /* Check if is a list */ > if (PyList_Check($input)) { > int i; > $1 = PyList_Size($input)

Re: Extending Python

2005-10-06 Thread Miki Tebeka
Hello Tuvas, > I am looking for a good tutorial on how to extend python with C code. I > have an application built in C that I need to be able to use in Python. http://www.swig.org/Doc1.3/Python.html#Python > I have searched through various sources, starting of course with the > Python site itsel

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Diez B. Roggisch
> Sure, But allow me this silly analogy. > > Going out on a full test-drive will also reveal your tires are flat. > So if you one has to be dropped, a full test drive or a tire check > it would certainly be the tired check. But IMO the tire check > is still usefull. But you could write it as test

Re: Help-log in to a web page

2005-10-06 Thread Laszlo Zsolt Nagy
>> >> I tried to view the source,it has, >> >> >> src="/em/cabo/images /t.gif" height="80">> align="center" border="0" cellspacing="2" cellpadding="0">> id="username >> __xc_">> title="Required" class="xc">* *User Name> pan>> width="12">> id="username"

Re: Can Python replace TCL/Expect

2005-10-06 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> Hi >> >> I'm learning Python. I don't know whether Python can do something like >> Expect can do. If yes, please show me how to do it. >> I want to do something automatically: open connection to a

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Antoon Pardon
Op 2005-10-06, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: >> Sure, But allow me this silly analogy. >> >> Going out on a full test-drive will also reveal your tires are flat. >> So if you one has to be dropped, a full test drive or a tire check >> it would certainly be the tired check. But IMO

/usr/bin/env python, force a version

2005-10-06 Thread manatlan
I've got a trouble, and i think that anybody there can help me I've got a python script which i distribute in somes packages for *nix. This script is full of python and need python 2.4 ! And i'd like to display a message when the user doesn't have a python2.4 version. if i put, at the top of the

Re: replacments for stdio?

2005-10-06 Thread Ido . Yehieli
yes, I've tried it aswell - nice work indeed! now, maybe also get stdin to work from this TK window... ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: /usr/bin/env python, force a version

2005-10-06 Thread Laszlo Zsolt Nagy
[EMAIL PROTECTED] wrote: >I've got a trouble, and i think that anybody there can help me > >I've got a python script which i distribute in somes packages for *nix. >This script is full of python and need python 2.4 ! And i'd like to >display a message when the user doesn't have a python2.4 version

Re: replacments for stdio?

2005-10-06 Thread Ido . Yehieli
the source (and Bryan) doesn't say anything about further distribution - and he did not provide a real email address. Can I safely modify it and include it in the source distribution of my program (it is open source licensed)? Would that be the polite thing to do, i have no idea how to contact this

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Brian Quinlan
Paul Rubin wrote: >> Right now, the compiler DOES NOT examine the contents of the other >> modules. All it does is generate an IMPORT_NAME instruction which is >> evaluation during runtime. > > > > In that case the other module gets compiled when the IMPORT_NAME > instruction is executed.

Re: /usr/bin/env python, force a version

2005-10-06 Thread Fredrik Lundh
"[EMAIL PROTECTED]" wrote: > I've got a trouble, and i think that anybody there can help me > > I've got a python script which i distribute in somes packages for *nix. > This script is full of python and need python 2.4 ! And i'd like to > display a message when the user doesn't have a python2.4 v

Re: epydoc, variables and encoding

2005-10-06 Thread Michele Petrazzo
Kenneth Pronovici wrote: >> I found a "problem" on epydoc. If I specify an encoding, epydoc not >> find my global variables, and if I remove it, it work well. <-cut-> > > No, it's not normal, and I'm fairly sure it's a bug. <-cut-> > Otherwise, you can try applying the following patch: > <-c

Re: /usr/bin/env python, force a version

2005-10-06 Thread Roel Schroeven
Laszlo Zsolt Nagy wrote: > [EMAIL PROTECTED] wrote: > >> I've got a trouble, and i think that anybody there can help me >> >> I've got a python script which i distribute in somes packages for *nix. >> This script is full of python and need python 2.4 ! And i'd like to >> display a message when the

Re: Help with chaos math extensions.

2005-10-06 Thread Andrew Gwozdziewycz
On Oct 5, 2005, at 7:44 AM, Brandon K wrote:In case you missed it, I said I have windows XP.  Windows XP pre-compiled python binaries are built on VS .NET 2003.  In order to build extensions, you need the compiler the interpreter was built on, or at least that is what is reported to me by calling s

Re: Using command line args on Windows

2005-10-06 Thread Fredrik Lundh
"k8" wrote: > I'm stuck on a Windows machine today and would love to fully play with > and test a simple python script. I want to be able to type "python > myscript myarg" somewhere. Is there anything out there to help me? footnote: if you'd prefer to type "myscript myarg" instead, you might wa

Re: Swig and pointers

2005-10-06 Thread Java and Swing
im sorry, why would it be md_ptr? what is md_ptr? i tried.. %include cpointer.i %pointer_functions(MY_DIGIT, digit_ptr) ptr = new_digit_ptr() doIt("a message", ptr) ...doesnt work..still needs a DIGIT ** -- http://mail.python.org/mailman/listinfo/python-list

Re: Using command line args on Windows

2005-10-06 Thread Duncan Booth
Fredrik Lundh wrote: >> I'm stuck on a Windows machine today and would love to fully play >> with and test a simple python script. I want to be able to type >> "python myscript myarg" somewhere. Is there anything out there to >> help me? > > footnote: if you'd prefer to type "myscript myarg" i

Re: /usr/bin/env python, force a version

2005-10-06 Thread Laszlo Zsolt Nagy
Roel Schroeven wrote: >Laszlo Zsolt Nagy wrote: > > >>[EMAIL PROTECTED] wrote: >> >> >> >>>I've got a trouble, and i think that anybody there can help me >>> >>>I've got a python script which i distribute in somes packages for *nix. >>>This script is full of python and need python 2.4 ! And

Re: updating local()

2005-10-06 Thread Flavio
Ok, I got it! Its vey insecure, and it is not guaranteed to work. Fine. Now what would you do if you wanted to pass a lot of variables (like a thousand) to a function and did not wanted the declare them in the function header? Flávio -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending Python

2005-10-06 Thread Magnus Lycka
Tuvas wrote: > I am looking for a good tutorial on how to extend python with C code. I > have an application built in C that I need to be able to use in Python. > I have searched through various sources, starting of course with the > Python site itself, and others, but I felt a bit lacking from the

Re: updating local()

2005-10-06 Thread Richard Brodie
"Flavio" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Now what would you do if you wanted to pass a lot of variables (like a > thousand) to a function and did not wanted the declare them in the > function header? I'd lie down until I felt better. -- http://mail.python.org/mai

Re: Python, Mysql, insert NULL

2005-10-06 Thread Thomas Bartkus
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > If you don't understand parameterized SQL queries you would do well to > refrain from offering database advice :-) Did the poster ask a question about parameterized queries or server security? > Presumably you always

Re: updating local()

2005-10-06 Thread Simon Brunning
On 6 Oct 2005 05:55:14 -0700, Flavio <[EMAIL PROTECTED]> wrote: > Now what would you do if you wanted to pass a lot of variables (like a > thousand) to a function and did not wanted the declare them in the > function header? I'd think twice. If on reflection I decided I really wanted to do it, I'd

Re: updating local()

2005-10-06 Thread Diez B. Roggisch
Flavio wrote: > Ok, > > I got it! > > Its vey insecure, and it is not guaranteed to work. Fine. > > Now what would you do if you wanted to pass a lot of variables (like a > thousand) to a function and did not wanted the declare them in the > function header? use a dict or list? This is almost c

Re: Copy files to Linux server through ssh tunnel

2005-10-06 Thread Larry Bates
You might want to install copy of Cygwin on your Windows box. Then you can use scp or maybe rsync over ssh to do the copying. Works great for me. -Larry Bates [EMAIL PROTECTED] wrote: > Hi ! > > I have some backup files on a server farm. > I want to store these local backup files on a backup f

Re: updating local()

2005-10-06 Thread Steve Holden
Richard Brodie wrote: > "Flavio" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > >>Now what would you do if you wanted to pass a lot of variables (like a >>thousand) to a function and did not wanted the declare them in the >>function header? > > > I'd lie down until I felt bet

Re: Help with chaos math extensions.

2005-10-06 Thread Steve Holden
Brandon K wrote: > In case you missed it, I said I have windows XP. Windows XP > pre-compiled python binaries are built on VS .NET 2003. In order to > build extensions, you need the compiler the interpreter was built on, or > at least that is what is reported to me by calling setup.py. If I w

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Diez B. Roggisch
> > I can't help but feel that a lot of people have specific typechecking > systems in mind and then conclude that the limits of such a symtem > are inherent in typechecking itself. I've been writing a type-checker for my diploma thesis for a functionnal programmming language. And it _is_ limite

Re: updating local()

2005-10-06 Thread Flavio
I wish all my problems involved just a couple of variables, but unfortunately the real interesting problems tend to be complex... As a last resort this problem could be solved by something like this: def fun(**kw): a = 100 for k,v in kw.items(): exec('%s = %s'%(k,v)) print loc

Absolultely confused...

2005-10-06 Thread Jeremy Moles
So, here is my relevant code: PyArg_ParseTuple(args, "O!", &PyType_vector3d, &arg1) And here ismy error message: argument 1 must be pylf.core.vector3d, not pylf.core.vector3d I know PyType_vector3d "works" (as I can use them in the interpreter all day long), and I know I'm passi

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Antoon Pardon
Op 2005-10-06, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: >> >> I can't help but feel that a lot of people have specific typechecking >> systems in mind and then conclude that the limits of such a symtem >> are inherent in typechecking itself. > > I've been writing a type-checker for my diploma

Re: updating local()

2005-10-06 Thread Flavio
Ok, its not thousands, but more like dozens of variables... I am reading a large form from the web which returns a lot of values. (I am Using cherrypy) I know I could pass these variables around as: def some_function(**variables): ... some_function(**variables) but its a pain in the neck to

Re: Class property

2005-10-06 Thread Laszlo Zsolt Nagy
Peter Otten wrote: >Laszlo Zsolt Nagy wrote: > > > >>I was trying for a while, but I could not implement a 'classproperty' >>function. Is it possible at all? >> >> > >You could define a "normal" property in the metaclass: > > The only way I could do this is: class MyXMetaClass(type):

Re: New Python book

2005-10-06 Thread Scott David Daniels
Jeremy Jones wrote (about Magnus Lie Hetland's _Beginning Python: From Novice to Professional_): > ... this would probably also be an excellent educational resource > for teachers in a classroom setting teaching students Python. I would > be interested to hear some teachers' opinion on tha

Re: Help with chaos math extensions.

2005-10-06 Thread Brandon K
Well, I didn't buy it JUST to compile python extensions, I'm looking to write C++ apps as well, I just use python for a lot of math and science simulations, and I got VS .NET at heavy discount since I'm a student. > Brandon K wrote: >> In case you missed it, I said I have windows XP. Windows XP

Re: /usr/bin/env python, force a version

2005-10-06 Thread Michael Ekstrand
On Thursday 06 October 2005 06:25, [EMAIL PROTECTED] wrote: > I hope you understand my needs. Is there a python/bash mechanism to > override the default python version of the system ... and run the > script with any version of python (but the most recent) ? > or can you explain me how to do that ?

Re: py2exe has a new maintainer

2005-10-06 Thread Thomas Heller
"Jimmy Retzlaff" <[EMAIL PROTECTED]> writes: > I am taking over the maintenance and support of py2exe from Thomas > Heller. As he announced a few weeks ago he is looking to focus on other > things. py2exe has been very useful to me over the years and I look > forward to keeping it every bit as use

Re: Absolultely confused...

2005-10-06 Thread Brandon K
> If I take out the "!" in the format string and just use "O", I can at > least get past PyArg_ParseTuple. Is this a compile-time error? Or a runtime error? == Posted via Newsgroups.com - Usenet Access to over 100,000 Newsgroups == Get Anonymous, Uncensored, Access to West and East C

Re: check html file size

2005-10-06 Thread Richard Gration
On Wed, 05 Oct 2005 20:39:18 -0400, Sherm Pendley wrote: > Richard Gration <[EMAIL PROTECTED]> writes: > >> Are you fucking seriously fucking expecting some fucking moron to >> translate your tech geeking fucking code moronicity? Fucking try writing >> it fucking properly in fucking Perl first. >

Re: updating local()

2005-10-06 Thread Simon Brunning
On 6 Oct 2005 07:04:08 -0700, Flavio <[EMAIL PROTECTED]> wrote: > I know I could pass these variables around as: > > def some_function(**variables): > ... > > some_function(**variables) > > but its a pain in the neck to have to refer to them as > variables['whatever']... > > dont you think? Er

Re: Absolultely confused...

2005-10-06 Thread Jeremy Moles
All of these are runtime errors. Using GCC4 and compiling perfectly with -Wall. On Thu, 2005-10-06 at 09:12 -0500, Brandon K wrote: > > If I take out the "!" in the format string and just use "O", I can at > > least get past PyArg_ParseTuple. > > Is this a compile-time error? Or a runtime error?

Re: How to prevent logging warning?

2005-10-06 Thread Thomas Heller
"Vinay Sajip" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >> I get the behaviour that I want when I add a 'NULL' handler in the >> library, but is this really how logging is intended to be used? >> > > The reason for the one-off message is that without it, a > misconfiguration or a failur

Re: updating local()

2005-10-06 Thread Robert Kern
Flavio wrote: > Ok, its not thousands, but more like dozens of variables... > I am reading a large form from the web which returns a lot of values. > (I am Using cherrypy) > > I know I could pass these variables around as: > > def some_function(**variables): > ... > > some_function(**variabl

Re: Absolultely confused...

2005-10-06 Thread Thomas Heller
Jeremy Moles <[EMAIL PROTECTED]> writes: > So, here is my relevant code: > > PyArg_ParseTuple(args, "O!", &PyType_vector3d, &arg1) > > And here ismy error message: > > argument 1 must be pylf.core.vector3d, not pylf.core.vector3d > > I know PyType_vector3d "works" (as I can use them in

Re: Simple prototype text editor in python

2005-10-06 Thread thakadu
Hi Viktor At the moment I dont have any web site where I can upload it. Do you or anyone have any suggestions or know of any web sites where one can post python code? If not please email me and I will send you the code by email. Regarding the license I have not yet decided what type of license (i

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Diez B. Roggisch
> Suppose we have a typesystem which has the type ANY, which would mean > such an object could be any type. You could then have homogenous lists > in the sense that all elements should be of the same declared type and > at the same time mix all kind of type in a particular list, just > as python do

So far

2005-10-06 Thread CppNewB
I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an emphasis on simplification. My only complaint is that there doesn't appear to be a great commercial IDE for the language. I've tried Komodo, etc and they are nice applications, but they don't

Re: So far

2005-10-06 Thread UrsusMaximus
Try PythonCard Ron Stephens Python Learning Center a prententious name for a nice hobbyist resource www.awaretek.com/plf.html -- http://mail.python.org/mailman/listinfo/python-list

Re: So far

2005-10-06 Thread UrsusMaximus
Try PythonCard Ron Stephens Python Learning Center a prententious name for a nice hobbyist resource www.awaretek.com/plf.html -- http://mail.python.org/mailman/listinfo/python-list

Re: updating local()

2005-10-06 Thread El Pitonero
Flavio wrote: > I wish all my problems involved just a couple of variables, but > unfortunately the real interesting problems tend to be complex... > > def fun(**kw): > a = 100 > for k,v in kw.items(): > exec('%s = %s'%(k,v)) > print locals() > > > >>> fun(**{'a':1,'b':2}) > {'a

Re: Absolultely confused...

2005-10-06 Thread Jeremy Moles
Thanks for the reply. :) I may be missing something critical here, but I don't exactly grok what you're saying; how is it even possible to have two instances of PyType_vector3d? It is (like all the examples show and all the extension modules I've done in the past) a static structure declared and a

Re: Absolultely confused...

2005-10-06 Thread Thomas Heller
Jeremy Moles <[EMAIL PROTECTED]> writes: > Thanks for the reply. :) > > I may be missing something critical here, but I don't exactly grok what > you're saying; how is it even possible to have two instances of > PyType_vector3d? It is (like all the examples show and all the extension > modules I'v

Re: Simple prototype text editor in python

2005-10-06 Thread Robert Kern
thakadu wrote: > Hi Viktor > > At the moment I dont have any web site where I can > upload it. Do you or anyone have any suggestions or > know of any web sites where one can post python code? > If not please email me and I will send you the code by email. If you package it with distutils, then yo

Re: Absolultely confused...

2005-10-06 Thread Daniel Dittmar
Jeremy Moles wrote: > So, here is my relevant code: > > PyArg_ParseTuple(args, "O!", &PyType_vector3d, &arg1) > > And here ismy error message: > > argument 1 must be pylf.core.vector3d, not pylf.core.vector3d > It looks as if two PyType_vector3d exist in your system - the one that

Re: Convert hex to string

2005-10-06 Thread Magnus Lycka
Java and Swing wrote: > I have some output stored in a string that looks like.. > > >>>x > > '\x01\xee\x1eo\xc3+\x8b\x83\xfad\xf6E\xaa\x0ea/I\x96\x83\xf5G\xa3\rQ\xfcH\xee\r' > > > According to, http://docs.python.org/lib/typesseq-strings.html, this is > "Unsigned Hexidecimal (lowercase)". How

Re: Absolultely confused...

2005-10-06 Thread Fredrik Lundh
Jeremy Moles wrote: > So, here is my relevant code: > > PyArg_ParseTuple(args, "O!", &PyType_vector3d, &arg1) > > And here ismy error message: > > argument 1 must be pylf.core.vector3d, not pylf.core.vector3d try adding printf("%p %p\n", &PyType_vector3d, arg1->ob_type); before the parsetup

Re: Absolultely confused...

2005-10-06 Thread Jeremy Moles
Well, there's certainly no doubting that all of you are right. I guess now I need to track down how this is happening and either fix it or understand it so that I can explain why I'm having to work around it. :) Many, many thanks. :) On Thu, 2005-10-06 at 16:48 +0200, Daniel Dittmar wrote: > Jere

Re: So far

2005-10-06 Thread Benji York
CppNewB wrote: > Most of them have support for Dialogs, but what about more complex > UI's? I may need a resizable frame within a resizable frame? I > haven''t found a GUI builder with a great feel yet. I *highly* recommend wxDesigner. I've used it extensively. It's cheap and has a demo versio

shelve object back to dictionary

2005-10-06 Thread Ryan Krauss
Is there an easy way to convert a shelved object back to a dictionary? When I save a dictionary using shelve and then load it in a later session, I have an object whose property names are the keys of the dictionary used as an input to shelve. For example, instead of user['name'] I have user.name.

Re: "no variable or argument declarations are necessary."

2005-10-06 Thread Pierre Barbier de Reuille
Mike Meyer a écrit : > Antoon Pardon <[EMAIL PROTECTED]> writes: > >>Op 2005-10-03, Steven D'Aprano schreef <[EMAIL PROTECTED]>: >> >>>On Mon, 03 Oct 2005 13:58:33 +, Antoon Pardon wrote: >> >>Declarations also allow easier writable closures. Since the declaration >>happens at a certain scope,

Re: So far

2005-10-06 Thread Christophe
CppNewB a écrit : > I am absolutely loving my experience with Python. Even vs. Ruby, the syntax > feels very clean with an emphasis on simplification. > > My only complaint is that there doesn't appear to be a great commercial IDE > for the language. I've tried Komodo, etc and they are nice ap

Re: updating local()

2005-10-06 Thread Grant Edwards
On 2005-10-06, Flavio <[EMAIL PROTECTED]> wrote: > Ok, > > I got it! > > Its vey insecure, and it is not guaranteed to work. Fine. > > Now what would you do if you wanted to pass a lot of variables (like a > thousand) to a function and did not wanted the declare them in the > function header? Pass

Re: Can Python replace TCL/Expect

2005-10-06 Thread Jorgen Grahn
On Thu, 06 Oct 2005 11:08:09 GMT, Cameron Laird <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: >>[EMAIL PROTECTED] wrote: >>> Hi >>> >>> I'm learning Python. I don't know whether Python can do something like >>> Expect can do. If yes, please

Newbie ? MS Sql update of record

2005-10-06 Thread len
I have created a python program that takes a flat file and changes some of the data and create a new flat file with the changes. Part of this process requires that I try to find a particular model car in an MS Sql table. This part of the program is now working great. It has come to my attention

Re: Compile as static

2005-10-06 Thread Micah Elliott
On Oct 06, [EMAIL PROTECTED] wrote: > Has anyone had any luck with this? Im trying to compile python 2.4.2 on > Slackware 10.1 into one large executable. One which contains everything > required to run python (as static). So python doesn't look for > dynamically shared objects like libpthread.so.0.

Re: shelve object back to dictionary

2005-10-06 Thread Fredrik Lundh
Ryan Krauss wrote: > Is there an easy way to convert a shelved object back to a dictionary? > When I save a dictionary using shelve and then load it in a later > session, I have an object whose property names are the keys of the > dictionary used as an input to shelve. For example, instead of >

Re: Absolultely confused...

2005-10-06 Thread Tim Peters
[Jeremy Moles] > ... > I may be missing something critical here, but I don't exactly grok what > you're saying; how is it even possible to have two instances of > PyType_vector3d? It is (like all the examples show and all the extension > modules I've done in the past) a static structure declared an

Re: Swig and pointers

2005-10-06 Thread Java and Swing
(reposting, i was just told how I should properly reply via groups.google.com) im sorry, why would it be md_ptr? what is md_ptr? i tried.. %include cpointer.i %pointer_functions(MY_DIGIT, digit_ptr) ptr = new_digit_ptr() doIt("a message", ptr) ...doesnt work..still needs a DIGIT ** Miki Tebek

Re: replacments for stdio?

2005-10-06 Thread Martin Miller
In what way would you like to get "stdin to work"? In Bryan's post in the Application(Frame).__init__() he binds some lambda functions to key strokes which allow control-C copying of text in the window. Seems like additonal application-specific things might be possible, but then the code would no

RE: So far

2005-10-06 Thread Bell, Kevin
I like pythonWin other than the white background where you write your scripts, because after awhile it's bad on the eyes. Does anyone know of a free IDE that will allow control of this, as well as the coloring of keywords, etc? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: So far

2005-10-06 Thread Michael Schneider
Take a look at: http://wingware.com/ It is only $35.00 for an IDE. (30 day free eval version) I use eclipse for java, and have become quite fond of tab completion. Mike CppNewB wrote: > I am absolutely loving my experience with Python. Even vs. Ruby, the syntax > feels very clean with an emp

Re: Simple prototype text editor in python

2005-10-06 Thread thakadu
Thanks Robert I have packaged it up with distutils and included the license in the README.txt file. I think I am missing something as I have only seen a place (under submissions) on http://python.org/pypi?%3Aaction=submit_form to submit the PKG_INFO file, or to submit a url manually but nowhere to

Re: Absolultely confused...

2005-10-06 Thread Jeremy Moles
WELL, I figured it out--thanks to everyone's help. There were instances of the object and I am a total moron. Thanks again to everyone who helped me stomp this out. :) On Wed, 2005-10-05 at 21:58 -0400, Jeremy Moles wrote: > So, here is my relevant code: > > PyArg_ParseTuple(args, "O!", &P

  1   2   >