[EMAIL PROTECTED] schrieb:
> Hello, I am switching from VB to python.
> I managed to crank my files into a sqlite
> dbase, converting the original names to
> unicode with s=unicode(s,"latin-1").
> Everything is working fine, but when
> I query the dbase with dbapi2 and want
> to retrieve names this
> Am I on the right way to develop a new protocol?
> Are there any common mistakes that programmers do?
> Is there a howto where I can read more about this?
If you _must_ develop your own protocol, use at least twisted. But I'd
go for an existing solutions out there - namely pyro. No need to inve
"Tolga" wrote:
> Let's suppose that I actually want to leave Lisp totally but what about
> AI sources? Most of them are based on Lisp. Oh yes, yes, I know, one
> may study AI with any language, even with BASIC, but nearly all
> important AI books start with a short Lisp intro. They say that "you d
Did anybody manage to use pairs() or coplot() from python using the rpy
module?
In fact any information going a bit beyond Tim Churches' very useful
examples on plot() usage in rpy would be highly welcome.
Thx.
malv
--
http://mail.python.org/mailman/listinfo/python-list
Hey folks,
some time ago i started searching the web for some tools i would like
to have at my disposal. I found some high quality examples, but there
was always something i disliked, for instance licensing terms.
Then i started my own one. I would like to share them with the
comunity. It is comp
Hi all,
I'm trying to get the whole field selected when the caret arrives into a
wx masked control.
This is perfectly done with the program below.
But if I comment out the line "r= dlg.ShowModal()", I get something
different : the data within the field is no more correctly selected.
Why ? And is
I'm writing a Python replacement for a particularly ugly shell script. we
are running mimedefang on our mail server, moving spam and virus messages
to a quarantine directory. This little python script successfully chdir's
to the quarantine directory, identifies all of the quarantine
subdirectories
Tuvas wrote:
> I need a function that will tell if a given variable is a character or
> a number. Is there a way to do this? Thanks!
What's your use case? This need is incommon in Python...
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
In some program I was testing if a variable was a boolean, with this
test : if v in [True,False]
My script didn't work in some cases and I eventually found that for v =
0 the test returned True
So I changed my test for the obvious "if type(v) is bool", but I still
find it confusing th
Pierre Quentel wrote:
> In some program I was testing if a variable was a boolean, with this
> test : if v in [True,False]
>
> My script didn't work in some cases and I eventually found that for v =
> 0 the test returned True
>
> So I changed my test for the obvious "if type(v) is bool", but I sti
On Mon, 2005-12-12 at 16:26, Pierre Quentel wrote:
> Hi all,
>
> In some program I was testing if a variable was a boolean, with this
> test : if v in [True,False]
>
> My script didn't work in some cases and I eventually found that for v =
> 0 the test returned True
>
> So I changed my test fo
I cannot remember where was it, but I saw a sentence in the Internet:
"When programming, programmers spend more time for reading than
writing". This is definitely true. We don't only read others' code but
we also read our code again and again and again. Thus, a language which
is easier to read can
When I enter 'c' at the (Pdb) prompt it just goes to the next line, and
doesn't "continue" as it should.
Here's the sample program:
# epdb1.py -- experiment with the Python debugger, pdb
import pdb
a = "aaa"
pdb.set_trace()
b = "bbb"
c = "ccc"
final = a + b + c
print final
Here's the sample outp
I have just discovered the existance of Puppy Linux which is a complete
operating system with a suite of GUI apps, only about 50 - 60M booting
directly off the CDROM ( http://www.puppylinux.org ).
This approach appears to me very Pythonic, so it were a nice thing to
have a full featured Puppy
I was running the above from the command-line, but when I run the
program within IDLE, 'c', continue, works as it should.
-Chris
--
http://mail.python.org/mailman/listinfo/python-list
Umm, yea, u definatly hijacked my thread. If you didnt mean to then
dont
But anyway, i get this...
>>> import amara
>>>from amara import domtools
>>> print domtools.py
Traceback (most recent call last):
File "", line 1, in ?
NameError: name 'domtools' is not defined
>>>
suggestions?
--
h
Steve Holden <[EMAIL PROTECTED]> writes:
[...]
> The "Law" of Demeter isn't about *how* you access objects, it's about
> what interfaces to objects you can "legally" manipulate without undue
> instability across refactoring. In other words, it's about semantics,
> not syntax. And it's led a lot
"""
But anyway, i get this...
>>> import amara
>>>from amara import domtools
>>> print domtools.py
Traceback (most recent call last):
File "", line 1, in ?
NameError: name 'domtools' is not defined
"""
Sheesh! That right after waking up. And it shows :-)
Should have been "print domtools.__fi
Claudio Grondi schrieb:
> I have just discovered the existance of Puppy Linux which is a complete
> operating system with a suite of GUI apps, only about 50 - 60M booting
> directly off the CDROM ( http://www.puppylinux.org ).
>
> This approach appears to me very Pythonic, so it were a nice th
On Mon, 12 Dec 2005 14:24:48 -0700, Steven Bethard wrote:
> Tuvas wrote:
>> I need a function that will tell if a given variable is a character or
>> a number. Is there a way to do this? Thanks!
>
> What's your use case? This need is incommon in Python...
No offense to the four or five helpful
Claudio Grondi wrote:
> I have just discovered the existance of Puppy Linux which is a complete
> operating system with a suite of GUI apps, only about 50 - 60M booting
> directly off the CDROM ( http://www.puppylinux.org ).
This isn't really Python-related, but I thought that Puppy Linux would
On Mon, 12 Dec 2005 13:25:14 -0800, Dan M wrote:
> I'm writing a Python replacement for a particularly ugly shell script. we
> are running mimedefang on our mail server, moving spam and virus messages
> to a quarantine directory. This little python script successfully chdir's
> to the quarantine d
Dan M wrote:
> I'm writing a Python replacement for a particularly ugly shell script. we
> are running mimedefang on our mail server, moving spam and virus messages
> to a quarantine directory. This little python script successfully chdir's
> to the quarantine directory, identifies all of the quara
you might be on to something
>>> from amara import domtools
>>> print domtools.__file__
C:\Python23\lib\site-packages\amara\domtools.pyc
>>>
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'd need to perform simple pattern matching within a string using a
list of possible patterns. For example, I want to know if the substring
starting at position n matches any of the string I have a list, as
below:
sentence = "the color is $red"
patterns = ["blue","red","yellow"]
pos = sentenc
Hi,
I need to call a python script, with command line arguments (it is an
autonomous script with a __main__), from within another python script.
Can I use exec() or execfile() for this? How to pass the arguments?
Thanks,
Olivier.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi,
>
> I need to call a python script, with command line arguments (it is an
> autonomous script with a __main__), from within another python script.
> Can I use exec() or execfile() for this? How to pass the arguments?
>
> Thanks,
>
> Olivier.
>
Obligatory "ugh."
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'd need to perform simple pattern matching within a string using a
> list of possible patterns. For example, I want to know if the substring
> starting at position n matches any of the string I have a list, as
> below:
>
> sentence = "the color is $red"
> patte
Luis M. Gonzalez wrote:
> You are not the first lisper who fell inlove with Python...
> Check this out:
> http://www.paulgraham.com/articles.html
>
Paul Graham is not in love with Python though, he's still very much in
love with Lisp.
He merely admits being unfaithful to Lisp from time to time (
On Mon, 12 Dec 2005, it was written:
> [EMAIL PROTECTED] writes:
>
>> Is this model correct or wrong? Where can I read about the mechanism
>> behind exceptions?
>
> Usually you push exception handlers and "finally" clauses onto the
> activation stack like you push return addresses for function c
Diez B. Roggisch wrote:
> Claudio Grondi schrieb:
>
>> I have just discovered the existance of Puppy Linux which is a
>> complete operating system with a suite of GUI apps, only about 50 -
>> 60M booting directly off the CDROM ( http://www.puppylinux.org ).
>>
>> This approach appears to me ve
Steven D'Aprano wrote:
> Judging by the tone of the original poster's question, I'd say for sure he
> is an utter Python newbie, probably a newbie in programming in general,
> so I bet that what (s)he really wants is something like this:
>
> somefunction("6")
> -> It is a number.
>
> somefunction
Pierre Quentel wrote:
> In some program I was testing if a variable was a boolean, with this
> test : if v in [True,False]
>
> My script didn't work in some cases and I eventually found that for v =
> 0 the test returned True
This seems like a strange test. What is this code trying to do?
If
You can pass arguments into a python script, see getopt module.
Then to call an external script you would use subsystem module
(or os.system if you are on earlier version of python).
If you can, just make the other python program into a
function and import it as James Stroud suggests in a separate
On Mon, 12 Dec 2005 [EMAIL PROTECTED] wrote:
> I'd need to perform simple pattern matching within a string using a list
> of possible patterns. For example, I want to know if the substring
> starting at position n matches any of the string I have a list, as
> below:
>
> sentence = "the color is
On Mon, 12 Dec 2005, Cameron Laird wrote:
> While there is indeed much to love about Lisp, please be aware
> that meaningful AI work has already been done in Python
Wait - meaningful AI work has been done?
;)
tom
--
limited to concepts that are meta, generic, abstract and philosophical --
IEE
On Mon, 12 Dec 2005, Tolga wrote:
> I am using Common Lisp for a while and nowadays I've heard so much about
> Python that finally I've decided to give it a try becuase
You read reddit.com, and you want to know why they switched?
> Python is not very far away from Lisp family.
That's an intere
Steven D'Aprano wrote:
> On Mon, 12 Dec 2005 14:24:48 -0700, Steven Bethard wrote:
>
>
>>Tuvas wrote:
>>
>>>I need a function that will tell if a given variable is a character or
>>>a number. Is there a way to do this? Thanks!
>>
>>What's your use case? This need is incommon in Python...
>
>
>
Paul Boddie wrote:
> Claudio Grondi wrote:
>
>>I have just discovered the existance of Puppy Linux which is a complete
>>operating system with a suite of GUI apps, only about 50 - 60M booting
>>directly off the CDROM ( http://www.puppylinux.org ).
>
>
> This isn't really Python-related, but I
Suggestions maybe?
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 12 Dec 2005, Laszlo Zsolt Nagy wrote:
> I think to be effective, I need to use TCP_NODELAY, and manually
> buffered transfers.
Why?
> I would like to create a general messaging object that has methods like
>
> sendinteger
> recvinteger
> sendstring
> recvstring
Okay. So you're really d
On Mon, 12 Dec 2005, Bengt Richter wrote:
On Mon, 12 Dec 2005 01:12:26 +, Tom Anderson <[EMAIL PROTECTED]> wrote:
--
ø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤øø¤º°`°º¤ø
[OT} (just taking liberties with your sig ;-)
,<@><
ShedSkin (http://shed-skin.blogspot.com) has taught me something:
simple syntax and high speed can often go together, in a computer
language.
This means two things:
1) A "fast language" can have a simple (python-like) syntax. For
example a language fast as C++ can allow:
d = {"hello":1}
as a synt
On Mon, 12 Dec 2005, Donn Cave wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Alex Martelli) wrote:
>
>> Tom Anderson <[EMAIL PROTECTED]> wrote:
>>...
>>
>>
>>> For example, if i wrote code like this (using python syntax):
>>>
>>> def f(x):
>>> return 1 + x
>>>
>>> The com
Tom Anderson wrote:
> While we're on the subject of Haskell - if you think python's
> syntactically significant whitespace is icky, have a look at Haskell's
> 'layout' - i almost wet myself in terror when i saw that!
>
Though one doesn't need to use indentation and write everything using
{} in Has
Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>>Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes:
>>>Is it possible to tell, which instance was used to call the
>>>classmethod that is currently running?
>>Ok, I read through what got to my nntp server, and I'm still
>>completely conf
Hi everybody
I have couple of questions,
1) How can i refresh my desktop window(wallpaper), using the python
script, after pasting some data on the desktop.
2) How can i run an exe file from the python
3) How can i get the information of a machine like "computer name",
"mac address", "ip addres
[EMAIL PROTECTED] wrote:
> When I enter 'c' at the (Pdb) prompt it just goes to the next line, and
> doesn't "continue" as it should.
[...]
>
> Here's the sample output:
>
> S:\tmp>python epdb1.py
> --Return--
> > c:\python21\lib\pdb.py(895)set_trace()->None
> -> Pdb().set_trace()
[...]
Works for
come on guys, the post isnt dead yet
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
>Hi everybody
>
>I have couple of questions,
>
>1) How can i refresh my desktop window(wallpaper), using the python
>script, after pasting some data on the desktop.
>
>
The is *way* too operating system and window system dependent to answer
without more knowledge.
>2)
Pierre Quentel wrote:
> Hi all,
>
> In some program I was testing if a variable was a boolean, with this
> test : if v in [True,False]
>
> My script didn't work in some cases and I eventually found that for v =
> 0 the test returned True
>
> So I changed my test for the obvious "if type(v) is bool"
Larry Bates wrote:
> You can pass arguments into a python script, see getopt module.
> Then to call an external script you would use subsystem module
> (or os.system if you are on earlier version of python).
I think getopt is a little dated. Try optparse. To quote the python
documentation, it is
Having problems with PythonWin on Windows XP SP1. Shortly after
startup and trying to debug I see:
LoadBarState failed - LoadBarState failed (with win32 exception!)
Things go down hill quickly from there. From there I see stuff like:
[Dbg]>>> Traceback (most recent call last):
File
"C:\Pytho
Build 205 for the win32 ext.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Pierre Quentel wrote:
>
> > In some program I was testing if a variable was a boolean, with this
> > test : if v in [True,False]
> >
> > My script didn't work in some cases and I eventually found that for v =
> > 0 the test returned True
> >
> > So I changed my test for the
Ok, i had this posted on the other thread "XML w/ Python" but it kinda
got off topic from the title to ill start a new thread. My question is
this...
the import of amara works in ActivePython...
PythonWin 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit
(Intel)] on win32.
Portions Copyright
The thread didn't go "off topic", the "hijacker" was reporting on
errors with Amara's Windows installer that COULD BE RESPONSIBLE FOR THE
PROBLEMS YOU ARE EXPERIENCING. If you had ANY understanding of Python,
you would have realised this.
Sometimes you really need to slow down and learn something
Has there been any work done lately on the Python Graph API?
Thanks in advance,
NG
--
"The life of a repoman is always intense."
--
http://mail.python.org/mailman/listinfo/python-list
Rick, thanks. Based on your clue I checked, and it seems those Amara
packages are not being built rightly. I'll look to get those packages
fixed and updated tomorrow.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.nethttp://fourthought.com
h
Woah woah woah, calm your ass down a little.
I didn't say that the "hijacker" made it go off topic. Did I? I just
said that the thread was going off topic from the dam title. We
weren't
talking about XML no more now were we. And who the hell are you talking
to thinking that I haven't researched my
ok, thx
--
http://mail.python.org/mailman/listinfo/python-list
Tom Anderson <[EMAIL PROTECTED]> wrote:
> On Mon, 12 Dec 2005, it was written:
>
>> [EMAIL PROTECTED] writes:
>>
>>> Is this model correct or wrong? Where can I read about the mechanism
>>> behind exceptions?
>>
>> Usually you push exception handlers and "finally" clauses onto the
>> activation s
Hello,
I would like write a function that I can pass an expression and a
dictionary with values. The function would return a function that
evaluates the expression on an input. For example:
fun = genFun("A*x+off", {'A': 3.0, 'off': -0.5, 'Max': 2.0, 'Min':
-2.0} )
>>> fun(0)
-0.5
>>> fun(-10)
-
On that note... I would like to open up the floor again.. lol
--
http://mail.python.org/mailman/listinfo/python-list
Quoth Tom Anderson <[EMAIL PROTECTED]>:
...
| While we're on the subject of Haskell - if you think python's
| syntactically significant whitespace is icky, have a look at Haskell's
| 'layout' - i almost wet myself in terror when i saw that!
That's funny. I don't think I ever bothered to acquain
>>> def genFun(expr, locs):
... return lambda x: eval('min(Max,max(Min,%s))' % expr, locs, {'x':
x})
...
>>> fun = genFun("A*x+off", {'A': 3.0, 'off': -0.5, 'Max': 2.0, 'Min':
-2.0} )
>>> fun
at 0x011B1470>
>>> fun(0)
-0.5
>>> fun(-10)
-2.0
>>> fun(10)
2.0
>>>
--
http://mail.python.org/mai
Jacob Rael wrote:
> Hello,
>
> I would like write a function that I can pass an expression and a
> dictionary with values. The function would return a function that
> evaluates the expression on an input. For example:
>
> fun = genFun("A*x+off", {'A': 3.0, 'off': -0.5, 'Max': 2.0, 'Min':
> -2.0}
"Jacob Rael" <[EMAIL PROTECTED]> writes:
> Hello,
> I would like write a function that I can pass an expression and a
> dictionary with values. The function would return a function that
> evaluates the expression on an input. For example:
>
> fun = genFun("A*x+off", {'A': 3.0, 'off': -0.5, 'Max': 2
Jay wrote:
> Woah woah woah, calm your ass down a little.
>
> I didn't say that the "hijacker" made it go off topic. Did I? I just
> said that the thread was going off topic from the dam title. We
> weren't talking about XML no more now were we.
They were discussing _why_ the XML module you were t
[EMAIL PROTECTED] wrote:
> > but seriously, unless you're writing an introspection tool, testing for
> > bool is pretty silly. just use "if v" or "if not v", and leave the rest to
> > Python.
> >
> The OP's code(and his work around) doesn't look like he is testing for
> boolean
which of course e
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > > but seriously, unless you're writing an introspection tool, testing for
> > > bool is pretty silly. just use "if v" or "if not v", and leave the rest
> > > to
> > > Python.
> > >
> > The OP's code(and his work around) doesn't look like he i
101 - 171 of 171 matches
Mail list logo