Robert Kern wrote:
> [EMAIL PROTECTED] wrote:
>
>>At top of a module I have an integer like so...
>>
>>foo = 4
>>
>>In a function in that module I know I need to do 'global foo' to get at
>>the value 4.
>>...
>
>
> I presume you are trying code like the following:
>
> foo = 4
> bar = {}
>
> d
[__div__ for .joinpath()]
on 29.07.2005 04:48 Tony Meyer said the following:
>>I, herewith, claim to have used it in the past.
>>But I am indifferent as to if its needed, it just looks natural to me.
>
> So far there seem to have been a few +0s, but no +1s...
>
>>What I use quite often is::
>>
>
On Thu, 28 Jul 2005 00:59:51 -0700 (PDT), Jerry He <[EMAIL PROTECTED]> wrote:
>Hi,
> Is it possible to create a function that you can use
>without parenthesizing the arguments? for example, for
>
>def examine(str):
> .
> .
>
>Is there some way to define it so that I can call it
>
Bryan wrote:
> Why does os._exit called from a Python Timer kill the whole process while
> sys.exit does not? On Suse.
os._exit calls the C function _exit() which does an immediate program
termination. See for example
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/_e
Christopher Subich wrote:
> My naive solution:
...
>for i in ilist:
> try:
> g = i.next()
> count += 1
> except StopIteration: # End of iter
> g = None
...
What I didn't like about this was the extra overhead of all
the StopIt
Or use pyparsing, and do both at the same time (that spark example
looks like a lot of work!).
Download pyparsing at http://pyparsing.sourceforge.net.
-- Paul
from pyparsing import *
text = """
outer {
inner1 { ...1 }
inner2 { ...2 }
}
simple { ...3 }
null {}
[EMAIL PROTECTED] wrote:
> At top of a module I have an integer like so...
>
> foo = 4
>
> In a function in that module I know I need to do 'global foo' to get at
> the value 4.
> ...
You don't. You need the global declaration to *set* the value of "foo"
in the module's namespace. When getting
At top of a module I have an integer like so...
foo = 4
In a function in that module I know I need to do 'global foo' to get at
the value 4.
...
IIRC, for dictionaries you DO NOT have this issue?
Why this scope problem with integers but not dictionaries?
Chris
--
http://mail.python.org/mailm
SUPER! This is exactly what I'm looking for.
gene tani wrote:
> win32: (I posted this link in response to same question, um, day bef.
> yesterday)
>
> http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/9a1c7629db72d064/56008cb68eeffa23?hl=en#56008cb68eeffa23
> (Thanks to Tim G
[Robert Kern]
> Sure, and I can find programming advice in the Old Testament,
> too, if I try hard enough
[...]
> Proverbs 28:14 JPS "Happy is the man that feareth alway;
> but he that hardeneth his heart shall fall into evil."
> Obviously an exhortation to not ignore raised exceptions with
> "ex
Dan Sommers wrote:
> On Thu, 28 Jul 2005 15:35:54 -0700,
> Robert Kern <[EMAIL PROTECTED]> wrote:
>
>>That said, I made a boo-boo. The Zen of Python is really a set of
>>design principles (and some of them, like this one, are more
>>specifically *language* design principles), not Essential Develop
Patch / Bug Summary
___
Patches : 357 open ( +7) / 2885 closed ( +3) / 3242 total (+10)
Bugs: 898 open ( +9) / 5144 closed ( +3) / 6042 total (+12)
RFE : 191 open ( +2) / 178 closed ( +0) / 369 total ( +2)
New / Reopened Patches
__
shutil.co
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message >
> Actually, I'm curious why you don't do the same. I'd call it very unusual
> (in my experience) to have a program open and close a serial port
> repeatedly. Among other things, this means that the DSR/DTR lines are
> toggling high and low
In article <[EMAIL PROTECTED]>,
Antal Rutz <[EMAIL PROTECTED]> wrote:
>
>I wrote a little class to make multihreading easier. It's based on one
>of aahz's threading example scripts. What it does:
Thanks!
>It spawns up number of CollectorThreads and one ProcessThread. The
>CollectorThreads listen
win32: (I posted this link in response to same question, um, day bef.
yesterday)
http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/9a1c7629db72d064/56008cb68eeffa23?hl=en#56008cb68eeffa23
(Thanks to Tim Golden for collecting the info)
OS X: I dunno...
--
http://mail.python.
Chris> I have a problem matching nested levels of {} ...
Regular expressions can't count, so you'd be better off sticking with
regexes to tokenize the source, then use a real parser to parse the tokens
it produces.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Registration is now open for the first Python Game Programming Challenge (also
known as PyWeek). The challenge runs from Sunday August 28th to Sunday
September 4th. That means there's only (checks website) 29 days to go
before the challenge starts! Full details about the challenge, and
registrati
Quick question:
Why does os._exit called from a Python Timer kill the whole process while
sys.exit does not? On Suse.
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
> Well, I actually had some correspondence with Jason on this
> very subject a year or so ago:
[...]
> Obviously, I don't know how much weight Jason's original
> ideas have on the prepped-for-syslib module, but it does
> support what other people have been saying: that the Path
> should behave
[using __div__ to mean join]
> I'm not too happy with it, too, but do we have alternatives?
> As paths are strings, we can hardly override the '+' operator,
> so there's not much operators left.
>
> Of course, one can use joinwith() if he doesn't like '/'.
My argument is that the alternative is
> I, herewith, claim to have used it in the past.
>
> But I am indifferent as to if its needed, it just looks natural to me.
So far there seem to have been a few +0s, but no +1s...
> What I use quite often is::
>
>path(__file__).dirname() / "somesiblingfileiknowisthere"
>
> you do not have
> def functions_which_modifies_some_file_in_place(path):
> output = open(path+'.tmp', 'w')
> .
>
> I dont want a seperator inserted between path and the new extension.
Fair enough. Forget using '+' for join, then (which I was never that keen
on - TIOWTDI), but I'm still -1 on using '/' for
fanbanlo <[EMAIL PROTECTED]> writes:
> How do I monitor a folder for new file(s) creation?
> How to use thread to do a wait until a new file is 'detected'?
There's not a clean portable way to do this.
The portable way is to poll the update time of the folder at regular
intervals, and act when it
Sarir Khamsi wrote:
> Thanks, this is amazingly more simple than what I had. This works
> fine but I'm looking at the code for cmd and don't really see how you
> get completion to work on the new alias.
I'm not sure what "completion" means in this case, and I'm not aware of
any "command-line comp
Dan Sommers wrote:
> The Zen applies to all aspects of software
> (and other things, too, but they're off topic here), from human readable
> reports and requirements and documentation, to GUI's, to test cases, to
> code, to database schemta, as well as the development methodology and
> practices th
Andrew Dalke wrote:
> Steven Bethard wrote:
>
>>Here's one possible solution:
>>
>>py> import itertools as it
>>py> def zipfill(*lists):
>>... max_len = max(len(lst) for lst in lists)
>
>
> A limitation to this is the need to iterate over the
> lists twice, which might not be possible if one o
Bob Greschke wrote:
> I didn't write the C++ program, but it looks like it never closes the serial
> port. It opens it when it starts up, then keeps it open until it quits.
> Tsk tsk tsk. Sloppy. Maybe they did that to cover up this problem. :)
Actually, I'm curious why you don't do the same.
The message cannot be represented in 7-bit ASCII encoding and has been sent as
a binary attachment.
-- Virus Warning Message (on cse.iitkgp.ernet.in)
body.scr is removed from here because it contains a virus.
---
http://
for widgets, try pyUI
http://pyui.sourceforge.net/
hope that helps, looks cool and all..
--
http://mail.python.org/mailman/listinfo/python-list
I think someone built a gui on top of pygame a while back, I think it
was called pyUI or something, let's see what google gives me here, ah,
here we go
http://pyui.sourceforge.net/
Hope that helps. Looks like neat stuff anyway...
--
http://mail.python.org/mailman/listinfo/python-list
How do I monitor a folder for new file(s) creation?
How to use thread to do a wait until a new file is 'detected'?
Thank you!
--
http://mail.python.org/mailman/listinfo/python-list
David a écrit :
> I've looked all over the place for an answer, and the only one I can
> find doesn't mean anything to me. The end of line issue with writting
> it in Windows and then uploading it doesn't help me since I'm doing
> this all from Linux. I've been trying to get python cgi scripts to
>
Hi group,
I'm trying compiling Python-2.4.1 and it fails builing the _socket
extension with the following message:
building '_socket' extension
gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
-fno-strict-aliasing -I. -I/usr/local/src/Python-2.4.1/./Include
-I/usr/local/include -I/usr
On Thu, 28 Jul 2005 15:35:54 -0700,
Robert Kern <[EMAIL PROTECTED]> wrote:
> That said, I made a boo-boo. The Zen of Python is really a set of
> design principles (and some of them, like this one, are more
> specifically *language* design principles), not Essential Development
> Practices. That'll
With a judicious bit of UTSL, that count seems to be the total number of
octets in the reply. This information comes from any user of
_getlongresp(), which actually returns a tuple (resp, list, octets).
These methods would be:
list
retr
top
uidl
I'd consider it a doc bug too. If
Peter Hansen <[EMAIL PROTECTED]> writes:
> If it's truly just an alias you want, then something like this should
> work better. Replace everything in the if mo: section with this:
>
> if mo:
> newName = mo.group(1)
> existingName = mo.group(2)
> existingMethod = getattr(self, 'do_'
Lenny G. wrote:
> Is there a way to make a c/c++ extension have a useful method
> signature? Right now, help(myCFunc) shows up like:
>
> myCFunc(...)
> description of myCFunc
>
> I'd like to be able to see:
>
> myCFunc(myArg1, myArg2)
> description of myCFunc
>
> Is this currently possible
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Bob Greschke wrote:
> > But writing anything to the port
>> quickly (not always right away...like maybe 5-6 iterations through the
>> loop?) causes the
>>
>> win32file.CloseHandle(self.hComPort)
>>
>> statement in th
Is there a way to make a c/c++ extension have a useful method
signature? Right now, help(myCFunc) shows up like:
myCFunc(...)
description of myCFunc
I'd like to be able to see:
myCFunc(myArg1, myArg2)
description of myCFunc
Is this currently possible?
Thanks,
Lenny G.
--
http://mail.py
Michael Hoffman wrote:
> Aahz wrote:
>
>>>One of these days I'm going to figure out how to embody "Namespaces are
>>>one honking great idea -- let's do more of those!" Then I shall be
>>>enlightened.
>>
>>What don't you understand about it? (This is a serious question -- I
>>can think of severa
Bob Greschke wrote:
> But writing anything to the port
> quickly (not always right away...like maybe 5-6 iterations through the
> loop?) causes the
>
> win32file.CloseHandle(self.hComPort)
>
> statement in the 'def close(self)' function of the serialwin32.py file of
> the pySerial package
David wrote:
>
> httpd.conf:
>
> << Tried it with "" and no ""
> Options ExecCGI << Tried with "Options +ExecCGI"
> AddHandler cgi-script .cgi .py << Tried with "SetHandler
> cgi-script", but still no go
>
>
>
> error_log:
>
> [Thu Jul 28 11:44:53 2005] [er
EnderLocke wrote:
> I have a friend who wants to learn python programming. I learned off
> the internet and have never used a book to learn it. What books do you
> recommend?
>
> Any suggestions would be appreciated.
I've just been learning Python and used a combination of 'Python in a
Nutshell
Aahz wrote:
>>One of these days I'm going to figure out how to embody "Namespaces are
>>one honking great idea -- let's do more of those!" Then I shall be
>>enlightened.
>
> What don't you understand about it? (This is a serious question -- I
> can think of several answers to give you, but wan
In article <[EMAIL PROTECTED]>,
Michael Hoffman <[EMAIL PROTECTED]> wrote:
>Robert Kern wrote:
>>
>> import this
>>
>> And you get 9 bonus Essential Development Practices, too! What a bargain!
>
>One of these days I'm going to figure out how to embody "Namespaces are
>one honking great idea -- l
For the poplib.POP3 object, docs say:
list([which])
Request message list, result is in the form (response, ['mesg_num octets',
...]). If which is set, it is the message to list.
But (I've folded the long line):
Python 2.3.5 (#2, May 4 2005, 08:51:39)
[GCC 3.3.5 (Debian 1:3.3.5-12)] o
Well, even if you are a hobbyist, that does not excuse you from being
civil. After all, we are all humans beings that deserve to be treated with
respect. Professional, hobbyist, vagabond, ogre, instigator, troll ...
THERE IS NO EXCUSE ... please treat others with respect.
- Asad
On Thu, 28 Jul 2
On 2005-07-28, Sidd <[EMAIL PROTECTED]> wrote:
> I was recently reading an article on threading in python and I
> came across Global Interpreter Lock,now as a novince in python
> I was cusrious about
>
> 1.Is writing a threaded code in python going to perform well
> than a normal python code.
I
Asad Habib wrote:
> I agree with Mustafa. After all, we are a bunch of professionals and not
> vagabonds hired to take pot shots at one another.
Except that we're not all professionals. There are a large number of
hobbyists who use Python and this list.
At any rate, my suggestion was not to fors
I forgot to mention that once the Python program(s) fail, THEN the C++
program also fails to opne the port, and the equipment has to be
power-cycled to get things to work again.
Bob
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 28 Jul 2005 21:19:53 +0100,
Michael Hoffman <[EMAIL PROTECTED]> wrote:
> Robert Kern wrote:
>> import this
>> And you get 9 bonus Essential Development Practices, too! What a
>> bargain!
> One of these days I'm going to figure out how to embody "Namespaces are
> one honking great idea --
crespoh wrote:
> Hi,
>
> How do I select data from two tables from two different databases and
> compare them? using dbi,odbc
>
Well, a lot depends on the database. If it's two Access .mdb files, for
example, or two different databases in a single SQL Server instance,
sometimes you can use SQL
Robert Kern wrote:
> [EMAIL PROTECTED] wrote:
>
>> Hi,
>>
>> I was working on a dir like function that gives more information than
>> the usual dir, but I am not satisfied with the way I get function
>> arguments for callable members of an object. Take a look at it here:
>> http://nerdierthanthou.
Robert Kern wrote:
> import this
>
> And you get 9 bonus Essential Development Practices, too! What a bargain!
One of these days I'm going to figure out how to embody "Namespaces are
one honking great idea -- let's do more of those!" Then I shall be
enlightened.
--
Michael Hoffman
--
http://
Asad Habib wrote:
> What, do you not consider yourself a professional?
Not really, no.
> Just because you are in
> academia does not justify attacking people on a mailing list and then
> justifying your attack with Harter's quote!
Uh, it was a joke. A self-denigrating joke. I was calling *myself
nicolas_riesch wrote:
> I just don't understand why it returns the "length consumed".
>
> Does it means that in some case, the input string can be only partially
> converted ?
For an encoder, I believe the answer is "no". For a decoder, it is
a definite yes: if the input does not end with a comp
We have some equipment that communicates at 57600 baud RS232. The path from
the PC is USB to a Phillips USB hub, then off of that a TUSB3410 USB/Serial
converter. The driver for the 3410 chip creates a "normal" comm port (like
COM3). There is a C++ program that has no problem talking to the e
What, do you not consider yourself a professional? Just because you are in
academia does not justify attacking people on a mailing list and then
justifying your attack with Harter's quote! Life is more than a quote -
look outside your academic cocoon and you will realize what I mean.
- Asad
On T
Grazie!
Paolino wrote:
> Farshid Lashkari wrote:
>
>> Hi,
>>
>> I have an object and I want to check if it is a bound or unbound
>> method, or neither. I tried using the types module, but it seems as
>> though types.UnboundMethodType and types.MethodType are equal. How
>> else can I determine
[EMAIL PROTECTED] wrote:
> The following url points to an article written by Damian Conway
> entitled "Ten Essential Development Practices":
> http://www.perl.com/pub/a/2005/07/14/bestpractices.html
>
> Althought the article has Perl as a focus, I thought that some of the
> general points made mig
> He spends so much space on "Create Consistent Command-Line Interfaces,"
> a section that, in Python, could be replaced with a simple "Use optparse."
Haha... I don't know why but that really made me laugh. :) Might even
use it as a sig or something... :)
> --
> Michael Hoffman
--
http://ma
Asad Habib wrote:
> I agree with Mustafa. After all, we are a bunch of professionals and not
> vagabonds hired to take pot shots at one another.
Speak for yourself. ;-)
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die.
Farshid Lashkari wrote:
> Hi,
>
> I have an object and I want to check if it is a bound or unbound method,
> or neither. I tried using the types module, but it seems as though
> types.UnboundMethodType and types.MethodType are equal. How else can I
> determine this? BTW, I'm using Python 2.3
>
Michele Simionato wrote:
>>http://fuhm.org/super-harmful/
>
>
> That is a pretty good page; I must say that my position is more radical
> (i.e. it is not super which
> is harmful, it is multiple inheritance itself that it is harmful: was I
> going to design a new language
> I would implement it *
[EMAIL PROTECTED] wrote:
> The following url points to an article written by Damian Conway
> entitled "Ten Essential Development Practices":
> http://www.perl.com/pub/a/2005/07/14/bestpractices.html
>
> Althought the article has Perl as a focus, I thought that some of the
> general points made mig
Hello,
I was recently reading an article on threading in python and I
came across Global Interpreter Lock,now as a novince in python I was
cusrious about
1.Is writing a threaded code in python going to perform well than a
normal python code.If so on what basis can it performance be measured
The following url points to an article written by Damian Conway
entitled "Ten Essential Development Practices":
http://www.perl.com/pub/a/2005/07/14/bestpractices.html
Althought the article has Perl as a focus, I thought that some of the
general points made might be of interest to the Python commu
Hi,
I have an object and I want to check if it is a bound or unbound method,
or neither. I tried using the types module, but it seems as though
types.UnboundMethodType and types.MethodType are equal. How else can I
determine this? BTW, I'm using Python 2.3
Thanks,
Farshid
--
http://mail.pyth
I agree with Mustafa. After all, we are a bunch of professionals and not
vagabonds hired to take pot shots at one another.
- Asad
On Thu, 28 Jul 2005, mustafa wrote:
> Rocco Moretti wrote:
> > projecktzero wrote:
> >
> >>but..but...It's so much more fun to unleash your anger and fire back
> >>w
Rocco Moretti wrote:
> projecktzero wrote:
>
>>but..but...It's so much more fun to unleash your anger and fire back
>>with all guns blazing fanning the flame war that most discussion groups
>>degenerate into after a couple of responses. =)
>>
>>Actually, I had some self restraint yesterday. I want
Sarir Khamsi wrote:
> I have a class (Command) that derives from cmd.Cmd and I want to add
> methods to it dynamically. I've added a do_alias() method and it would
> be nice if I could turn an alias command into a real method of Command
> (that way the user could get help and name completion). The
> constructs like a**nn**n, with a={ and b=} in your case.
This should have been a**nb**n - an example would be aaabbb.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Peter Tillotson wrote:
> Hi,
>
> I'm looking for an advanced concurrency module for python and don't seem
> to be able to find anything suitable. Does anyone know where I might
> find one? I know that there is CSP like functionality built into
> Stackless but i'd like students to be able to use
Asynchrony is not concurrency. If you have to turn your code "inside
out," (that is, if you have to write your code such that the library
calls your code, rather than vice versa) it's very much *not*
concurrency: it's just asynchrony.
While Twisted makes asynchronous code relatively easy to write
Chris Spencer <[EMAIL PROTECTED]> writes:
> I'm trying to write a Gui in Python for manipulating rich graphical
> representations, similar to something like Inkscape. I've tried tkinter,
> wxPython, pyGtk, and while they all do traditional widgets well enough,
> none of them really handle anti-ali
I have a class (Command) that derives from cmd.Cmd and I want to add
methods to it dynamically. I've added a do_alias() method and it would
be nice if I could turn an alias command into a real method of Command
(that way the user could get help and name completion). The code would
be generated dyna
I've looked all over the place for an answer, and the only one I can
find doesn't mean anything to me. The end of line issue with writting
it in Windows and then uploading it doesn't help me since I'm doing
this all from Linux. I've been trying to get python cgi scripts to
work, and I always end up
"Pekka Karjalainen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How can I create image files and animations with Python?
Besides the other responses, you might also check out the pygame site where
there once were some tutorial examples of manipulating bitmaps with
Numerical
Twisted [1] includes lots of support for asyncronous concurrency,
using deferreds. There is also the possiblity of PEP 342's [2]
concurrency through enhanced generators, and being able to pass data
to the generator every iteration. There are ways to simulate this, as
well. I've written a recipe [3]
What: Python Programming I: Introduction to Python
When: August 29-31, 2005
Where: San Francisco, CA, USA
Need to get up-to-speed with Python as quickly as possible? Come join
us in beautiful Northern California the week before Labor Day. We are
proud to announce another rigorous Python tra
Chris cdot.de> writes:
>
> is something like that possible?
No. Not with "pure" regexes. The reason is that the theory behind them doesn't
allow to detect syntactic
constructs like a**nn**n, with a={ and b=} in your case.
What you need is a "real" parser - usually one
uses regexes to split th
Jerry He wrote:
> Hi,
> Is it possible to create a function that you can use
> without parenthesizing the arguments? for example, for
>
> def examine(str):
> .
> .
>
> Is there some way to define it so that I can call it
> like
>
> examine "string"
> instead of examine("str
Chris Spencer wrote:
> I'm trying to write a Gui in Python for manipulating rich graphical
> representations, similar to something like Inkscape. I've tried tkinter,
> wxPython, pyGtk, and while they all do traditional widgets well enough,
> none of them really handle anti-aliased, transparent,
Hi!
I am looking for an xml-object mapping tool ('XML Data Binding-design
time product') where I can define the mapping rules in 'binding files'
and the parser is generated automatically.
Similar to the solution of Dave Kuhlman
(http://www.rexx.com/~dkuhlman/generateDS.html) where the mapping
hello,
I have a problem matching nested levels of {}, example:
>>> import re
>>> text = """
outer {
inner1 { ... }
inner2 { ... }
}
simple { ... }
"""
>>> r = re.compile(r"""
( # OPTION1
.*? # begin
Chris Fonnesbeck wrote:
> I thought I knew how to do error handling in python, but apparently I
> dont. I have a bunch of code to calculate statistical likelihoods, and
> use error handling to catch invalid parameters. For example, for the
> bernoulli distribution, I have:
>
> def bernoulli_li
On Thu, Jul 28, 2005 at 08:42:57AM -0700, nicolas_riesch wrote:
> And a last question: can I call this "enc" function from multiple
> threads ?
Yes.
Jeff
pgphSka1eU9PQ.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Jerry He wrote:
> ... Is there some way to define [examine] so I can call it like
> examine "string"
> instead of examine("string")?
Perhaps you are looking for ipython (google for it) if
all you are looking for is ease of interactive entry.
--Scott David Daniels
[EMAIL PRO
Chris Fonnesbeck <[EMAIL PROTECTED]> writes:
> I thought I knew how to do error handling in python, but apparently I
> dont. I have a bunch of code to calculate statistical likelihoods, and
> use error handling to catch invalid parameters. For example, for the
[...]
> bernoulli distribution, I h
Paul D.Smith wrote:
>... What I'm left with is the following...
> 1. A shell script which I maintain.
> 2. A simple Python config which searches for all shell environment variables
> named "MY_..." and instantiates then as Python variables.
> 3. Historical scripts that run without me needing to spe
"William Park" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Jerry He <[EMAIL PROTECTED]> wrote:
> > I'm a little curious, why does most scripting
> > languges(i.e. python and ruby) use Tcl/Tk rather than
> > wx or Fox as its standard GUI? Although I did notice
> > that the Vpython
When I use an encoder function from codecs module, documentation says
that it encodes the object input and returns a tuple (output object,
length consumed).
>>> import codecs
>>> enc=codecs.getencoder('iso-8859-1')
>>> enc(u'asdf')
('asdf', 4)
>>>
I just don't understand why it returns the "leng
I realy like Qt through PyQt. The combination Eric3+Qtdesigner is quite
useful. Maybe PyQt is not yet ready for the new Qt4 I think, but it does
lot's of the graphical stuff you seem to require.
Adriaan Renting| Email: [EMAIL PROTECTED]
ASTRON | Phone: +31 521 595 217
P.O.
http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc
this blog talks about design differences, e.g. what "." means, whether
functions and methods are 1st-class objects.
St
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm looking for an advanced concurrency module for python and don't seem
to be able to find anything suitable. Does anyone know where I might
find one? I know that there is CSP like functionality built into
Stackless but i'd like students to be able to use a standard python build.
I'm tryi
Jerry He wrote:
> def examine(str):
> .
> .
>
> Is there some way to define it so that I can call it
> like
>
> examine "string"
> instead of examine("string")?
What do you want to happen when someone types:
examine
??? Or better yet, what if you do something like:
What happens when you take a copy of python23.dll and put it in the
path on that machine? Does the program run?
If so, (and I am not familiar with freeze) it seems freeze did not put
the dll into the .exe file.
--
http://mail.python.org/mailman/listinfo/python-list
Simon Dahlbacka wrote:
> If you actually want that kind of syntax, then why don't you use Visual
> Basic? ;)
s/VisualBasic/Ruby/
--
bruno desthuilliers
ruby -e "print '[EMAIL PROTECTED]'.split('@').collect{|p|
p.split('.').collect{|w| w.reverse}.join('.')}.join('@')"
--
http://mail.python.org/
Paul D.Smith wrote:
> 2. A simple Python config which searches for all shell environment variables
> named "MY_..." and instantiates then as Python variables.
my_vars = dict((k, v)
for k, v in os.environ.iteritems()
if k.startswith('MY_'))
globals().update(my_vars)
Ahh.. fantastic! Flickers be gone! Yaarrrg!
It was "self.area.queue_draw()" in case anyone wants to know. :)
Thanks so much!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 147 matches
Mail list logo