Twisted has SOAP support.
--
http://mail.python.org/mailman/listinfo/python-list
The generally used idiom for that is:
lst = ['a', 'b', 'c']
if 'a' in lst:
foo = lst.index('a')
--
http://mail.python.org/mailman/listinfo/python-list
Use lisp?
--
http://mail.python.org/mailman/listinfo/python-list
ctypes?
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 19, 7:39 am, ssecorp <[EMAIL PROTECTED]> wrote:
> I want a parse a file of the format:
> movieId
> customerid, grade, date
> customerid, grade, date
> customerid, grade, date
> etc.
>
> so I could do with open file as reviews and then for line in reviews.
>
> but first I want to take out the
> Your solution works assuming that you know how many consumer threads
> you have :). I don't :). More than that, it's not correct if you have
> more than one producer :). Having a sentinel was my very first idea,
> but as you see... it's a race condition (there are cases in which not
> all items a
> def counter(start_at=0):
> count = start_at
> while True:
> val = (yield count)
A generator can accept a value from the consumer. So, If I have a
counter:
c = counter()
I can send it a value:
c.send(9)
> if val is not None:
> count = val
The generato
Try using the Queue module - http://docs.python.org/lib/module-Queue.html.
Here is a tutorial with it -
http://www.artfulcode.net/articles/multi-threading-python/.
--
http://mail.python.org/mailman/listinfo/python-list
orry about.
>
> Me: OK. So, then what's a file system?
>
> Myself: That's not web-based. File-Systems are desktop-based.
Everything is file based, even database tables.
HTH,
Cheers,
Jeff
>
> Me: You can have a file-system on a common network server. I can even
e me, Web 2.0--conference, in
Portland and SF respectively.
Before I commit to one of those, I'd like to make sure there's nothing
else I'm missing out on.
Thanks for any tips or pointers,
Jeff
--
http://mail.python.org/mailman/listinfo/python-list
On 2013-07-03 13:19:26 +, Steven D'Aprano said:
On Wed, 03 Jul 2013 14:00:49 +0100, Tim Golden wrote:
Goodness, I doubt if you'll find anyone who can seriously make a case
that the Windows command prompt is all it might be. I'm not a Powershell
user myself but people speak highly of it.
On Thu, Oct 18, 2012 at 10:51 AM, Dave Angel wrote:
> On 10/18/2012 10:10 AM, Jeff Jeffries wrote:
> > Hello everybody
> >
> > When I set "AttributeChanges" in my example, it sets the same value for
> all
> > other subclasses. Can someone help me wi
way to get keyword arguments (or default) when using
** notation?
--
Cheerios,
Jeff Jeffries III
CFO: www.touchmycake.com <http://www.willyoubemyfriend.com>
--
http://mail.python.org/mailman/listinfo/python-list
ere both parties listen to
> > >>each other, feel free to raise them here. Keep in mind three things:
> >
> > [snip three things]
> >
> > > You forgot the fourth point.
> >
> > Apparently so did you :)
>
> "Amongst the points are such diverse elements as..."
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Cheers,
Jeff Jeffries III
CEO: www.willyoubemyfriend.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi Gene,
I'm the maintainer of pycollada. No such paywall exists, and a login is not
required. I'm not sure how you came across that.
As Chris said, it's a standard BSD license. I'd be happy to help with
packaging, so feel free to contact me.
Jeff
--
http://mail.python.
HISTORY:
In using python 2.7.2 for awhile on a web project (apache/wsgi web.py), I
discovered a problem in using decimal.Decimal. A short search revealed that
many other people have been having the problem as well, in their own
apache/wsgi implementations (django, mostly), but I found no rea
7;t
really want to start digging around in there either)
The patch in this case is very limited in scope, and all it inflicts on the
subject code inside of decimal.Decimal.__new__(), is better programming
practices.
--jeff
On Fri, Mar 2, 2012 at 5:49 PM, Ethan Furman wrote:
> Jeff Be
erous improvements is that
IronPython’s startup time has decreased by 10% when compared to
IronPython 2.6.1.
This is the first full community release of IronPython, and I want to
give a huge thank you to everyone who was involved in this release.
- Jeff
--
http://mail.python.org/mailman/lis
Is this a good example to follow for a project that does mostly python to
interact with external data sources including files, transformation, and import
into Postgres?
https://github.com/bast/somepackage
I have a SWE background but not with python, and I want to make sure my team is
following
are there other places also? On pypi I did not see anywhere the status of
defects or downloads, if it's actively supported.
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, August 21, 2018 at 9:48:50 AM UTC-6, Jeff M wrote:
> are there other places also? On pypi I did not see anywhere the status of
> defects or downloads, if it's actively supported.
nevermind, i see the info i was looking for on the left side.
--
https://mail.python.
Python newbie here, looking for code samples for encrypting and decrypting
functions, using AES. See lots of stuff on the interwebs, but lots of comments
back an forth about bugs, or implemented incorrect, etc...
I need to encrypt some strings that will be passed around in URL, and then also
s
ome unnecessary rudeness on the part of one of the
respondants to the original post
Jeff
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, April 10, 2016 at 1:15:18 PM UTC-4, [email protected] wrote:
> On Sunday, April 10, 2016 at 2:54:45 PM UTC+1, Jeff Schumaker wrote:
> > On Thursday, April 7, 2016 at 2:50:32 AM UTC-4, Ethan Furman wrote:
> > > On 04/05/2016 01:05 PM, Thomas '
On Sunday, April 10, 2016 at 10:03:37 AM UTC-4, Chris Angelico wrote:
> On Sun, Apr 10, 2016 at 11:54 PM, Jeff Schumaker wrote
> > As a new member of this group, I am not sure on how to report unacceptable
> > behavior. If this is not the correct way, I apologize.
> >
On Sunday, April 10, 2016 at 9:33:47 PM UTC-4, Jeff Schumaker wrote:
> On Sunday, April 10, 2016 at 10:03:37 AM UTC-4, Chris Angelico wrote:
> > On Sun, Apr 10, 2016 at 11:54 PM, Jeff Schumaker wrote
>
> > > As a new member of this group, I am not sure on how to repor
With the new operator := in Python 3.8
that allows you to do things like
if ( x := f() ) == 1:
Is there any reason to use just the assignment operator?
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, December 25, 2019 at 9:22:56 AM UTC-5, Chris Angelico wrote:
> On Thu, Dec 26, 2019 at 1:16 AM Jeff Gitlin wrote:
> >
> > With the new operator := in Python 3.8
> > that allows you to do things like
> >
> > if ( x := f() ) == 1:
> >
> > I
On Wednesday, December 25, 2019 at 9:13:09 AM UTC-5, Jeff Gitlin wrote:
> With the new operator := in Python 3.8
> that allows you to do things like
>
> if ( x := f() ) == 1:
>
> Is there any reason to use just the assignment operator?
………..
Thanks. That web page is
-- Forwarded message -
From: Jeff Linahan
Date: Wed, Jul 22, 2020, 5:23 PM
Subject: Fwd: [BUG] missing ')' causes syntax error on next line
To:
Subscribing to the mailing list as per the bot's request and resending.
-- Forwarded message -
Fro
Interesting PEG thing. C++ compilers are getting better at suggesting
fixes for minor syntax errors (in 2011 on MSVC I remember seeing pages of
errors for forgetting a semicolon after a struct.) but python seems to be
lagging behind in this regard.. will check out superhelp, maybe it'll help
me pa
What's the best way to generate a sequence of characters in Python? I'm
looking for something like this Perl code: 'a' .. 'z' .
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Jeff Schwab wrote:
>
>>What's the best way to generate a sequence of characters in Python? I'm
>>looking for something like this Perl code: 'a' .. 'z' .
>
>
>>>>import string
>
>
>>>&
Rick Wotnaz wrote:
> Roy Smith <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>
>>Ron Adam <[EMAIL PROTECTED]> wrote:
>>
>>>You can actually call it anything you want but "self" is sort
>>>of a tradition.
>>
>>That's true, but I think needs to be said a bit more
>>emphatically. There'
Pedro Werneck wrote:
> On Thu, 22 Sep 2005 23:26:58 -0400
> Jeff Schwab <[EMAIL PROTECTED]> wrote:
>
>
>>What's the best way to generate a sequence of characters in Python?
>>I'm looking for something like this Perl code: 'a' .. 'z&
Christoph Haas wrote:
> Dear coders...
>
> I'm working on an application that is supposed to support "plugins".
> The idea is to use the plugins as packages like this:
>
> Plugins/
> __init__.py
> Plugin1.py
> Plugin2.py
> Plugin3.py
>
> When the application starts up I want to have thes
Christoph Haas wrote:
> On Sun, Sep 25, 2005 at 11:33:03PM -0400, Jeff Schwab wrote:
>
>>I recently came up against this exact problem. My preference is to have
>>the plugin writer call a method to register the plugins, as this allows
>>him the most control. Som
[EMAIL PROTECTED] wrote:
> Damjan> Is there some python module that provides a multi process Queue?
>
> Skip> Not as cleanly encapsulated as Queue, but writing a class that
> Skip> does that shouldn't be all that difficult using a socket and the
> Skip> pickle module.
>
> Jere
[EMAIL PROTECTED] wrote:
> Jeff> How many are more than "a few?"
>
> I don't know. What can you do today in commercial stuff, 16 processors?
> How many cores per die, two? Four? We're still talking < 100 processors
> with access to the same chun
ChiTownBob wrote:
> Perl just sucks, as all good Python hackers know!
I disagree. Perl has saved my butt more times than I care to count.
Python certainly has its advantages, but I won't be giving up Perl any
time soon.
--
http://mail.python.org/mailman/listinfo/python-list
Peter Corbett wrote:
> One of my friends has recently taken up Python, and was griping a bit
> about the language (it's too "prescriptive" for his tastes). In
> particular, he didn't like the way that Python expressions were a bit
> crippled. So I delved a bit into the language, and found some sour
fraca7 wrote:
> Richie Hindle a écrit :
>
>> [Peter]
>>
>>> http://www.pick.ucam.org/~ptc24/yvfc.html
>>
>>
>>
>> [Jeff]
>>
>>> Yuma Valley Agricultural Center?
>>> Yaak Valley Forest Council?
>>
>>
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Jeff Schwab <[EMAIL PROTECTED]> wrote:
>
>>Sure, multiple machines are probably the right approach for the OP; I
>>didn't mean to disagree with that. I just don't think they are "the
>>only
Jason wrote:
> A non-python programming friend of mine has said that any programs made
> with Python must be distributed with, or an alternative link, to the
> source of the program.
>
> Is this true?
Sorta, but not really. Typically, you might distribute the source (.py)
files, but if you
FX wrote:
> can anybody write a code for a program that reads from a
> /location/file & according to file contents, it execute script. e.g. if
> file contains "mp" it runs media player.
> I hope the code is small .. plz help me out!
You might be interested in the FileInfo class, defined and thorou
Lots of links to all levels of tutorials and documentation here:
http://www.awaretek.com/plf.html
Python Podcast too!
--
http://mail.python.org/mailman/listinfo/python-list
The DFW Pythoneers maintain a club wiki/mailing list at:
http://www.python.org/dfw
Hope to see you there, and especially some new faces!
Jeff Rush, DFW Pythoneers Coordinator
--
http://mail.python.org/mailman/listinfo/python-list
then the 'if ...' might be slightly faster,
even though the exception-based route is more Pythonic.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
on body rather than
burying that manipulation somewhere in the argument list. Personally
I'd call this a wash, though I expect that others will disagree with
me. ;) And whatever the merits of this particular case, similar cases
may not be so easy to avoid in this fashion...
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
setmode(sys.stdout.fileno(), os.O_BINARY)
Thanks, Google & the Python Cookbook website!
Jeff
pgponre4gehsj.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
7;s version works on strings (and unicode objects) because they
lack an __iter__() method, even though they follow the (older)
sequence protocol.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
maybe even a new process or thread...
d = a + e(3)
I see this as simply a combination of both of the aforementioned
concepts -- argument control plus moment-of-evaluation control.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
troubleshoot a bit more effectively.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
ctive mode, and since you didn't
give it a script to run, it simply started, found nothing to do, and
then terminated itself.
You need to run idle.pyw, *not* pythonw.exe. The idle.pyw script runs
inside the pythonw.exe interpreter, but the latter can't do anything
without instruc
anted (2), perhaps function calls are first in the
queue for syntactic sugar.
Huh? How much simpler of syntax do you want for calling a function?
I'm not sure what you'd want as "sugar" instead of funcname().
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
but shrewd risk-taking -- if you take a
one-in-three chance of making a tenfold return on investment, then 66%
of the time you'll lose but if you hit those odds just once,
you'll come out way ahead.)
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
Jonathan Fine wrote:
Jeff Shannon wrote:
Jonathan Fine wrote:
Giudo has suggested adding optional static typing to Python.
(I hope suggested is the correct word.)
http://www.artima.com/weblogs/viewpost.jsp?thread=85551
An example of the syntax he proposes is:
> def f(this:that=ot
) in L2]
I suppose that your version has the virtue that, if the sortkey value
is equal, items retain the order that they were in the original list,
whereas my version will sort them into an essentially arbitrary order.
Is there anything else that I'm missing here?
Jeff Shannon
Technician/Pr
attempt to *encourage* hardworking
programmers to share in a public commons, by ensuring that what's
donated to the commons remains in the commons.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
special cases aren't special enough
to break the rules".
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
many open variables to consider. One can't control for all
of them in experiments (what few experiments are practical in social
sciences, anyhow), and they make any anecdotal evidence hazy enough to
be suspect.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.or
Paul Rubin wrote:
Jeff Shannon <[EMAIL PROTECTED]> writes:
It seems to me that in other, less-dynamic languages, lambdas are
significantly different from functions in that lambdas can be created
at runtime.
What languages are those, where you can create anonymous functions
at runtime, b
Paul Rubin wrote:
Jeff Shannon <[EMAIL PROTECTED]> writes:
Note that the so-called 'viral' nature of GPL code only applies to
*modifications you make* to the GPL software.
Well, only under an unusually broad notion of "modification".
True enough. It can be difficul
duct in which your code is linked together with LGPL'ed
code does *not* require that your code also be (L)GPL'ed. Changes to
the core library must still be released under (L)GPL, but application
code which merely *uses* the library does not. (I've forgotten, now,
exactly how LGPL d
Alex Martelli wrote:
Jeff Shannon <[EMAIL PROTECTED]> wrote:
Note that the so-called 'viral' nature of GPL code only applies to
*modifications you make* to the GPL software. The *only* way in which
your code can be 'infected' by the GPL is if you copy GPL source.
a questionable usage is an error or
not. Better to have that done by a developer tool (pychecker) than
through runtime checks every time the program is used.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
Nick Coghlan wrote:
Jeff Shannon wrote:
I suppose that your version has the virtue that, if the sortkey value
is equal, items retain the order that they were in the original list,
whereas my version will sort them into an essentially arbitrary order.
Is there anything else that I'm mi
quot;integers".
With all due respect to Richard Feynman, I'd have thought that
"counting numbers" would be non-negative integers, rather than the
full set of integers... which, I suppose, just goes to show how
perilous it can be to make up new, "more natural" terms
You may want to check out Spyce http://spyce.sourceforge.net/index.html
It will work as cgi (or using fast cgi or mod python) and has
templating, session support, active tags, etc.
-jjr
--
http://mail.python.org/mailman/listinfo/python-list
ry rat, at least, map/lambda was always a
nasty puzzle for me and difficult to sort out. But when list comps
were introduced, after reading just a sentence or two on how they
worked, they were completely clear and understandable -- much more so
than map/lambda after many months of exposure
enough
that lambda would be undesireable if not impossible, or they're simple
and numerous (e.g. calling a function with different parameters) such
that it's easy to write a factory function that returns closures
rather than feed the parameter in with a lambda.
Jeff Sha
de of someone who wants to write Visual Basic as
filtered through Java and Perl... If I want mental gymnastics when
reading code, I'd use Lisp (or Forth). (These are both great
languages, and mental gymnastics would probably do me good, but I
wouldn't want it as part of my day-t
mutate it. Since it's the same object,
it doesn't matter where the mutation happened. But in rebind(), we're
moving the somedict label to a *new* dict object. Now d and somedict
no longer point to the same object, and when the function ends the
object pointed to by so
command shell open. Edit, save,
alt-tab to command shell, uparrow-enter to run program... not as
convenient as a toolbar button or hotkey, but it works.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
Jon Perez wrote:
... or why 'Perl monkey' is an oft-heard term whereas 'Python
monkey' just doesn't seem to be appropriate?
That's just because pythons are more likely to *eat* a monkey than to
be one :)
Jeff Shannon
Technician/Programmer
Credit Internati
;cc"):
return extToMimeDict["cpp"]
If the intent of this is to catch .cc files, it's easy to add an extra
entry into the dict to map '.cc' to the same string as '.cpp'.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
nd) to map/lambda than it is to a list comprehension. In this case,
at least the code block is visually self-contained in a way that
lambdas are not, but I still have to do more mental work to visualize
the overall results than I need with list comps.
Jeff Shannon
Technician/Programmer
Credit Int
acking) and use exceptions to
indicate error status. Changing the value of a parameter is a
side-effect that complicates reading and debugging code, so Python
provides (and encourages) more straightforward ways of doing things.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mai
your nested function would have
access to the outer namespace via normal nested scopes, so I'm really
not seeing what the gain is...
(Then again, I haven't been following the whole using/where thread,
because I don't have that much free time and the initial postings
failed to c
Antoon Pardon wrote:
Op 2005-01-12, Jeff Shannon schreef <[EMAIL PROTECTED]>:
It's also rather less necessary to use references in Python than it is
in C et. al.
You use nothing but references in Python, that is the reason why
if you assign a mutable to a new name and modify the obj
dicts are unordered, the ordering of the literal
(or of a set of statements adding to the dict) doesn't matter.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
B now.
And besides, for long-term archiving purposes, I'd expect that zip et
al on a character-stream would provide significantly better
compression than a 4:1 packed format, and that zipping the packed
format wouldn't be all that much more efficient than zipping the
character stream
is simpler. (For a large
file, chunking it might be necessary, though...)
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
s
s = func(s)
This seems to be a way to go, but it becomes messy if i hand over
lots of parameters and expect some more return functions.
This has the advantage of being explicit about s being (potentially)
changed. References, in the way that you mean them, are even messier
in the case of nume
03 10x97
... so that 0x8 and 16x8 would be different? So that 2x1 and 2x01 would
be different?
Jeff
pgpSp55b8TgYd.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
be found by "grep _SUPER_MAGIC
/usr/include/linux/*"
Jeff
pgp3igY0cKFnR.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
for RNA sequences as well as DNA
sequences, you've got at least a fifth base to represent, which means
you need at least three bits per base, which means only two bases per
byte (or else base-encodings split across byte-boundaries) That
gets ugly real fast.)
Jeff Shannon
Tec
ings get too bad here, I'd
like to have somewhere pleasant to emigrate to. ;)
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
a more-detailed matching, you might look into finding an algorithm
to determine the "distance" between two strings and using that to
score possible matches.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
anageable level.
To rephrase this a bit more succinctly ;) there's a big difference
between having no practical way to prevent something, and actually
encouraging it.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
ol over the circumstances in
which your Singleton will be created and/or retrieved, and it also
makes it trivial to replace the Singleton with some other pattern
(such as, e.g., a Flyweight or Borg object) should the need to
refactor arise.
Jeff Shannon
Technician/Programmer
Credit International
--
uch closer to the "completely flat" side of things.
It's not "... as nested (or as flat) as you have to be and no
more", it's "... as nested as you have to be and no more, but if you
need significant nesting, you might want to re-examine your design". ;)
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
ore robust (and
readable) fashion.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
ot;a:b:c".split(':')
>>> o = LineObj(*l)
>>> o.__dict__
{'a': 'a', 'c': 'c', 'b': 'b', 'e': None, 'd': None}
>>>
This is a bit more likely to be meaningful, in that there's
ultiply by N" function as well as one to be the
return value.
Here's my implementation, which matched your list early on but
effortlessly reached larger values. One large value it printed was
6412351813189632 (a Python long) which indeed has only the distinct
prime factors 2 and 3. (2**43
of storing variable-size Python objects was chosen in part
because it reuqires only one allocation for an object, not two.
However, there is no way for one tuple to point to a slice of another
tuple.
there's no reason that some other python implementation couldn't make a
different cho
mory allocation, and for
a reasonable tuple the size of the memory required is not going to
significantly affect the allocation time.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
cripts, you'll probably have the same security issues I mentioned for
Python. Unless you really need that level of features, you may be
better off designing your own limited language. Check into the docs
for pyparsing for a starter...
Jeff Shannon
Technician/Programmer
Credit Internatio
e in a master dictionary keyed by id -- in other words,
simply replace the tuples in my previous example with a dict like what
you've got here. You could also create a simple class to hold each
item, rather than using small dicts. (You'd probably still want to
store class instances in a master dict keyed by id.)
Generally, any time your problem is to use one piece of information to
retrieve another piece (or set) of information, dictionaries are very
likely to be the best approach.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail.python.org/mailman/listinfo/python-list
ng the identifiers made it so
that you felt the need to add a comment indicating what they were
identifying, I'd say that yes, the long words *are* helpful. ;)
Comments are good, but self-documenting code is even better.
Jeff Shannon
Technician/Programmer
Credit International
--
http://mail
101 - 200 of 1056 matches
Mail list logo