On Sun, Nov 14, 2010 at 1:03 AM, Franck Ditter wrote:
> Pardon my noobness (?) but why is there a 2.x and 3.x development
> teams working concurrently in Python ? I hardly saw that in other
> languages. Which one should I choose to start with, to cope with
> the future ? Isn't 3.x supposed to ext
I'm not a contributor to the U-S project, but I have been monitoring
alternative python implementations' progress some, and seem to be adding
something to pypy all of a sudden.
I think unladen swallow has produced performance improvements, and they are
likely to be merged into cpython 3.3.
Howeve
On Tue, Nov 16, 2010 at 9:37 AM, Tim Arnold wrote:
> "Tim Harig" wrote in message
> news:ibs8h9$jm...@speranza.aioe.org...
> > On 2010-11-15, Tim Arnold wrote:
> >> On Nov 15, 10:41 am, Tim Harig wrote:
> >>> On 2010-11-15, Tim Arnold wrote:
> >>>
> >>> > How can I enable the server process t
On Wed, Nov 17, 2010 at 7:42 PM, Terry Reedy wrote:
> On 11/17/2010 7:25 PM, Mark Crispin wrote:
>
> Have you looked at ctypes? It's not suitable for all libraries, but
>>> it can often obviate the need to write any C code:
>>> http://docs.python.org/release/2.6.6/library/ctypes.html#module-ctyp
On Thu, Nov 18, 2010 at 4:24 AM, BartC wrote:
> "John Nagle" wrote in message
> news:4ce37e01$0$1666$742ec...@news.sonic.net...
>
> On 11/16/2010 10:24 PM, swapnil wrote:
>>
>
> AFAIK, the merging plan was approved by Guido early this year. I guess
>>> Google is expecting the community to driv
Here's -a- way to try - not necessarily the best way:
1) Write a little gcc .c with inline assembler, to make your EAX change
2) Call it from CPython using ctypes
However, by the time you return from the code that makes your change and
resume execution in the CPython interpreter, EAX may well have
What's the best way of reading lines of null terminated (ASCII NUL, \0) text
in Python 2.x? How about for 3.x?
I've been using http://stromberg.dnsalias.org/~strombrg/readline0.html with
2.x, but I'm moving some of my stuff to 3.x, and am wondering if there's a
way that would obviate readline0.
I've got a couple of programs that read filenames from stdin, and then
open those files and do things with them. These programs sort of do
the *ix xargs thing, without requiring xargs.
In Python 2, these work well. Irrespective of how filenames are
encoded, things are opened OK, because it's all
On Tue, Nov 30, 2010 at 11:47 AM, Martin v. Loewis wrote:
>> Does anyone know what I need to do to read filenames from stdin with
>> Python 3.1 and subsequently open them, when some of those filenames
>> include characters with their high bit set?
>
> If your files on disk use file names encoded i
On Tue, Nov 30, 2010 at 7:19 AM, Antoine Pitrou wrote:
> On Mon, 29 Nov 2010 21:52:07 -0800 (PST)
> Yingjie Lan wrote:
>> --- On Tue, 11/30/10, Dan Stromberg wrote:
>> > In Python 3, I'm finding that I have encoding issues with
>> > characters
>> > wi
On Tue, Nov 30, 2010 at 9:53 AM, Peter Otten <__pete...@web.de> wrote:
> $ ls
> $ python3
> Python 3.1.1+ (r311:74480, Nov 2 2009, 15:45:00)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
with open(b"\xe4\xf6\xfc.txt", "w") as f:
> ... f.w
On Tue, Nov 30, 2010 at 1:35 PM, Valery Khamenya wrote:
> Hi,
>
> multithreading.pool Pool has a promissing initializer argument in its
> constructor.
> However it doesn't look possible to use it to initialize each Pool's
> worker with some individual value (I'd wish to be wrong here)
>
> So, how
On Tue, Nov 30, 2010 at 6:37 AM, Xavier Heruacles wrote:
> I'm basically a c/c++ programmer and recently come to python for some web
> development. Using django and javascript I'm afraid I can develop some web
> application now. But often I feel I'm not good at python. I don't know much
> about ge
What is this about? It's another n~ thing, but this time in 2.x.
All I'm doing is printing a str containing a character > 127.
It works fine in 2.5, to a terminal or to a pipe. In 2.6 and 2.7, it
fails when writing to a pipe but works fine writing to my terminal -
an mrxvt.\
I really kind of wa
I've sometimes got similar situations in CGI, that turned out to be
because of a syntax error that kept apache from being able to run the
script. What if you just run the script at the command line? It
should either error out due to lack of a CGI environment/arguments,
but hopefully it'll give yo
On Sun, Dec 5, 2010 at 12:01 AM, John Nagle wrote:
> On 12/4/2010 8:44 PM, Monte Milanuk wrote:
>>
>> On 12/4/10 3:43 PM, Jorge Biquez wrote:
>>
>>> I do not see a good reason for not using Sqlite3 BUT if for some reason
>>> would not be an option what plain schema of files would you use?
>>
>
m the same code.
On Mon, Nov 29, 2010 at 9:26 PM, Dan Stromberg wrote:
> I've got a couple of programs that read filenames from stdin, and then
> open those files and do things with them. These programs sort of do
> the *ix xargs thing, without requiring xargs.
>
> In
Please try adding "global x" to the beginning of f().
On Wed, Dec 8, 2010 at 10:06 AM, alust wrote:
> Hello,
>
> Can somebody explain this strange (to me) effect please.
>
> In this program it is impossible to access a global variable within a
> function:
>
> $ cat /tmp/test.py
> x='xxx'
> def f(
On Fri, Dec 10, 2010 at 3:51 PM, John Nagle wrote:
> On 12/10/2010 3:25 PM, Stefan Behnel wrote:
>>
>> Benjamin Kaplan, 11.12.2010 00:13:
>>>
>>> On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote:
>
>>> The only scopes Python has are module and function.
>
> There's more. Both a lambda, a
On Wed, Dec 22, 2010 at 3:15 PM, Victor Eijkhout wrote:
> So I have a generator, either as a free function or in a class and I
> want to generate objects that are initialized from the generated things.
>
> def generator():
> for whatever:
> yield something
> class Object():
>
On Sun, Dec 19, 2010 at 11:38 PM, Darshak Bavishi
wrote:
> Hi Experts,
> I am still struggling with handling output generated after execution of
> command/script on host unix machine using windows client machine
> ssh code :
> import sys
> import datetime
> import time
> # setup logging
> paramik
If it's a big list and you're checking multiple times, you're probably
better off converting the list to a set, and using "in" on the set. Once
you have your list converted to a set, you can update both quickly.
On Wed, Dec 22, 2010 at 5:22 PM, Maurice Shih wrote:
> Dear python-list@python.org,
On Sat, Dec 25, 2010 at 7:42 AM, Roy Smith wrote:
> I'm processing a stream of N numbers and want to keep track of the K
> largest. There's too many numbers in the stream (i.e. N is too large)
> to keep in memory at once. K is small (100 would be typical).
>
> >From a theoretical point of view,
On Thu, Dec 30, 2010 at 5:52 AM, crow wrote:
> Hi, I'm writing a test tool to simulate Web browser. Is there anyway
> to run JavaScript in python? Thanks in advance.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You might also consider Pyjamas, which translates Python (somewhere
be
On Tue, Jan 4, 2011 at 4:22 AM, Zdenko wrote:
> On 4.1.2011 11:15, Ulrich Eckhardt wrote:
>>
>> Zdenko wrote:
>>>
>>> Please, can anybody write me a simple recursive matrix multiplication
>>> using multiple threads in Python, or at least show me some guidelines
>>> how to write it myself
>>
>> No
On Tue, Jan 4, 2011 at 11:31 PM, Tim Roberts wrote:
> Zdenko wrote:
>>
>>Please, can anybody write me a simple recursive matrix multiplication
>>using multiple threads in Python, or at least show me some guidelines
>>how to write it myself
>
> Matrix multiplication is not generally done recursive
On Sat, Jan 8, 2011 at 8:07 AM, kj wrote:
> There's a zillion utility apps that I've had kicking around in my
> head for years, but I've never implemented because I absolutely
> hate GUI programming.
>
> But I'm increasingly impressed by the quality, stability, and sheer
> number, of Gnome apps th
I invite folks to check out Tiobe's Language Popularity Rankings:
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
The gist is: Python grew faster than any other programming language
over the last year, according to this (slightly arbitrary, but better
than no indicator) ranking.
On Mon, Jan 10, 2011 at 2:29 PM, John Nagle wrote:
> On 1/10/2011 1:02 PM, MRAB wrote:
>>
>> On 10/01/2011 20:29, Dan Stromberg wrote:
>>>
>>> I invite folks to check out Tiobe's Language Popularity Rankings:
>>>
>>> http://www.tiobe.com/
On Mon, Jan 10, 2011 at 5:22 PM, Krzysztof Bieniasz
wrote:
>> Also depends on how one defines "popularity" in the context of
>> programming languages.
>
> Tiobe quite clearly states what they mean by the name "popularity".
> Namely the number of Google search results of expressions like
> "program
On Tue, Jan 11, 2011 at 4:30 PM, Catherine Moroney
wrote:
> In what order does python import modules on a Linux system? I have a
> package that is both installed in /usr/lib64/python2.5/site-packages,
> and a newer version of the same module in a working directory.
>
> I want to import the versio
of the first entries in sys.path.
>
> A colleague of mine is running on the same system as I am, and he
> does not have the problem of the
> /usr/lib64/python2.5/site-packages/pyhdfeos-1.0_r57_58-py2.5-linux-x86_64.egg
> variable showing up as one of the first entries in sys.path.
&g
On Fri, Jan 14, 2011 at 11:52 AM, mukesh tiwari
wrote:
> Hello all , I have implemented Elliptic curve prime factorisation
> using wikipedia [
> http://en.wikipedia.org/wiki/Lenstra_elliptic_curve_factorization].
> I think that this code is not optimised and posting for further
> improvement. Fee
On Sun, Jan 16, 2011 at 11:05 AM, TomF wrote:
> I'm trying to multiprocess my python code to take advantage of multiple
> cores. I've read the module docs for threading and multiprocessing, and
> I've done some web searches. All the examples I've found are too simple:
> the processes take simple
On Mon, Jan 17, 2011 at 2:20 PM, Jake Biesinger
wrote:
> Hi all,
>
> Using numpy, I can create large 2-dimensional arrays quite easily.
import numpy
mylist = numpy.zeros((1,2), dtype=numpy.int32)
>
> Unfortunately, my target audience may not have numpy so I'd prefer not to use
>
On Tue, Jan 18, 2011 at 8:27 AM, Peter Otten <__pete...@web.de> wrote:
> Stefan Behnel wrote:
>
>> Peter Otten, 18.01.2011 10:04:
>>> What's the advantage of 'find ... | xargs ...' over 'find ... -exec ...'?
>>
>> The former runs in parallel, the latter runs sequentially.
>
> This may sometimes be
On Thu, Jan 20, 2011 at 11:36 AM, Jake Biesinger
wrote:
>> Thanks for the great suggestions!
>
> On a related note, is there no way to efficiently sort a python array?
>
>
x = array('f', xrange(1000))
x.sort()
>
On Thu, Jan 20, 2011 at 4:07 PM, Jacob Biesinger
wrote:
> On Thu, Jan 20, 2011 at 12:48 PM, Dan Stromberg wrote:
>> On Thu, Jan 20, 2011 at 11:36 AM, Jake Biesinger
>> wrote:
>>>> Thanks for the great suggestions!
>>>
>>> On a related note, is th
On Fri, Jan 21, 2011 at 3:20 AM, Adam Skutt wrote:
> On Jan 20, 11:51 pm, Albert van der Horst
> wrote:
>> This is what some people want you to believe. Arm twisting by
>> GPL-ers when you borrow their ideas? That is really unheard of.
>
> Doesn't matter, you're still legally liable if your work
On Fri, Jan 21, 2011 at 12:57 PM, Philip Semanchuk wrote:
> On Jan 21, 2011, at 3:36 PM, Dan Stromberg wrote:
>> On Fri, Jan 21, 2011 at 3:20 AM, Adam Skutt wrote:
>>> On Jan 20, 11:51 pm, Albert van der Horst
>>> wrote:
>>>> This is what some peop
On Sun, Jan 23, 2011 at 4:24 PM, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, hid...@gmail.com wrote:
>>
>> Hello i want to code from different languages using a Python script i
>> know i can use os.system, but i don't know how to receive data or send
>> arguments using that method if theres any
On Mon, Jan 24, 2011 at 1:51 PM, Alan wrote:
> Why do function objects compare in this way to numbers?
> Thanks,
> Alan Isaac
>
>
def f(): return
> ...
f>5
> True
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
They shouldn't, but did in 2.x, and no longer do in 3.x:
$ /
On Sun, Jan 30, 2011 at 6:43 PM, Shruti Sanadhya wrote:
> Hi,
> I am running a script that uses dictionaries on Python 2.6.4 on Ubuntu 9.10.
> I notice that my script crashes with a MemoryError when my dictionary
> reaches 44739243th entry. My system has 3GB RAM (32-bit). I noticed that
> changing
IIRC, this is an instance of what's called "source routing", and was
largely shut off after network admins realized it was a security
issue.
Of course, if you have root/administrator permission, you could
probably do it. But if you have that, you could probably just fix the
routing table.
On Sat
On Tue, Feb 8, 2011 at 5:41 PM, Roy Smith wrote:
> In article ,
> "Williamson, Ross X. (Guest)"
> wrote:
>
>> Dear All,
>>
>> I'm trying to implement a server/client system where the server is written in
>> python and the client has to be written in c/c++. I can happily send simple
>> text thr
On Wed, Feb 9, 2011 at 11:15 AM, Emile van Sebille wrote:
> On 2/9/2011 10:58 AM octopusgrabbus said...
>>
>> I have Python 2.6.6. I would like to get this output
>>
>> ps -ef | grep 'fglgo csm'
>>
>> into a list. What is the best way to do that? I've been reading the
>> documentation, and am lost
On Wed, Feb 9, 2011 at 1:50 PM, Paul Symonds wrote:
> Are there any good resources to learn OO Python from?
Yes, plenty, but it's important for us to know so we can advise you:
Do you know any other OO languages yet?
--
http://mail.python.org/mailman/listinfo/python-list
)[stat.ST_UID]
>
> if os.getuid() == uid:
> print pid, cmdline
>
>
> For a more cross-platform solution there's a module that does that (I
> forgot it's name but with some googling you might find it)
>
>
>
>
> On Feb 9, 1:34 pm, Dan Stromberg
On Fri, Feb 11, 2011 at 6:56 AM, Martin De Kauwe wrote:
> Hi,
>
> I have a series of parameter values which i need to pass throughout my
> code (>100), in C I would use a structure for example. However in
> python it is not clear to me if it would be better to use a dictionary
> or build a class o
On Fri, Feb 11, 2011 at 1:43 PM, André Roberge wrote:
> On Friday, February 11, 2011 5:24:15 PM UTC-4, LL.Snark wrote:
>> Hi,
>>
>> I'm looking for a pythonic way to translate this short Ruby code :
>> t=[6,7,8,6,7,9,8,4,3,6,7]
>> i=t.index {|x| x>
>> If you don't know Ruby, the second line means
On Fri, Feb 11, 2011 at 1:51 PM, Dan Stromberg wrote:
> On Fri, Feb 11, 2011 at 1:43 PM, André Roberge
> wrote:
>> On Friday, February 11, 2011 5:24:15 PM UTC-4, LL.Snark wrote:
>>> Hi,
>>>
>>> I'm looking for a pythonic way to translate this sh
On Fri, Feb 11, 2011 at 4:13 PM, Steven D'Aprano
wrote:
> On Fri, 11 Feb 2011 10:15:27 -0800, Dan Stromberg wrote:
>
>
>> I'd use a class rather than a dictionary - because with a class, pylint
>> (and perhaps PyChecker and pyflakes?) should be able to detect typ
On Fri, Feb 11, 2011 at 10:20 PM, Steven D'Aprano
wrote:
> On Fri, 11 Feb 2011 21:47:32 -0800, Dan Stromberg wrote:
>
>> Did you have some sort of bad experience with pylint? Do you resent the
>> 20 minutes it takes to set it up?
>
> If you read my post more c
On Sun, Feb 13, 2011 at 9:47 PM, Wang Coeus wrote:
> Hi all,
> I am new to python. Currently I encountered a problem, please help me to
> solve this. Thanks in advance!
> I have a file like below:
> ++
> block1
> {
> key1=value1
> key2=value2
> key3=value3
>
On Mon, Feb 14, 2011 at 3:06 PM, Steven D'Aprano
wrote:
> On Mon, 14 Feb 2011 11:25:00 -0800, Dan Stromberg wrote:
>
>> FWIW, the creator of the many .ini format(s), Microsoft, no longer
>> recommends using .ini files.
>
> That's because they want people to u
On Mon, Feb 14, 2011 at 8:31 PM, Westley Martínez wrote:
> On Mon, 2011-02-14 at 19:41 -0800, alex23 wrote:
>> On Feb 15, 9:06 am, Steven D'Aprano > +comp.lang.pyt...@pearwood.info> wrote:
>> > As I see it, the biggest problems with INI files are:
>> >
>> > * the INI file module that comes with Py
On Tue, Feb 15, 2011 at 2:57 AM, Dinh wrote:
> Hi,
>
> I currently build a process management system which is able to fork child
> processes (fork()) and keep them alive (waitpid() ).
>
> if pid in self.current_workers:
> os.waitpid(pid, 0)
>
> If a child process dies
I use vim, but I've considered switching to pycharm. I don't know if
pycharm does this or not.
Anyway, coverage.py will produce an HTML report describing how well
your automated tests cover your code - I like to add it into my
Makefile's default rule, and then view the HTML once in a while using
On Wed, Feb 16, 2011 at 10:35 AM, snorble wrote:
> I use Python a lot, but not well. I usually start by writing a small
> script, no classes or modules. Then I add more content to the loops,
> and repeat. It's a bit of a trial and error learning phase, making
> sure I'm using the third party modul
On Wed, Feb 16, 2011 at 4:47 PM, Alexander Kapps wrote:
> On 17.02.2011 01:00, GSO wrote:
>> Having said that I'm possibly arriving at the conclusion that a quick
>> perl script might be the simplest/easiest and most secure option - I
>> read perl includes code to safely run suid perl scripts - wi
On Wed, Feb 16, 2011 at 6:10 PM, GSO wrote:
>> pretty much better off with sudo, or a tiny C wrapper that's so simple
>> it's hard to get wrong. However, perl's taint feature would be useful
>
> This snippet is about as tiny as it gets in C I think:
Well, it could be tinier really, and actually,
On Wed, Feb 16, 2011 at 6:59 PM, Adam Skutt wrote:
> On Feb 16, 9:00 pm, Dan Stromberg wrote:
>> So yeah, whether you use perl or anything else invoked with #!, you're
>> pretty much better off with sudo, or a tiny C wrapper that's so simple
>> it's hard to g
On Thu, Feb 17, 2011 at 8:14 AM, Tim wrote:
> Hi, I have an inetd service on freebsd that calls a program
> (daemon.py) with which I want the remote user to communicate. I can
> call daemon.py from the command line on the host machine and it works
> fine.
>
> What I don't understand is how to ma
On Thu, Feb 17, 2011 at 5:46 PM, Philip Winston wrote:
> We have a multiprocess Python program that uses Queue to communicate
> between processes. Recently we've seen some errors while blocked
> waiting on Queue.get:
>
> IOError: [Errno 4] Interrupted system call
>
> What causes the exception?
I prefer special symbol "congestion" to special symbol proliferation. A
lot. A language with few special symbols looks less like line noise, is
easier to read and write, and is easier to google for answers about.
I guess nothing's perfect.
On Wed, Feb 16, 2011 at 2:07 PM, Xah Lee wrote:
> mig
On Mon, Feb 21, 2011 at 6:57 PM, Kelson Zawack
wrote:
> I have a large (10gb) data file for which I want to parse each line into an
> object and then append this object to a list for sorting and further
> processing. I have noticed however that as the length of the list increases
> the rate at wh
On Mon, Feb 21, 2011 at 7:24 PM, Dan Stromberg wrote:
>
> On Mon, Feb 21, 2011 at 6:57 PM, Kelson Zawack <
> zawack...@gis.a-star.edu.sg> wrote:
>
>> I have a large (10gb) data file for which I want to parse each line into
>> an object and then append this ob
On May 25, 10:46 am, Pascal Chambon wrote:
> * code safety : it seems default python string formatting technics (%
> operator, .format() method) are normally used when one needs to
> substitute placeholders in translated strings. But the thing is : I DONT
> want my view to raise an exception simp
On Jun 3, 10:47 am, Nathan Huesken wrote:
> Hi,
>
> I am writing a network application which needs from time to time do
> file transfer (I am writing the server as well as the client).
> For simple network messages, I use pyro because it is very comfortable.
> But I suspect, that doing a file tran
On Thu, Jun 3, 2010 at 3:43 PM, Emin.shopper Martinian.shopper <
emin.shop...@gmail.com> wrote:
> Dear Experts,
>
> I am getting a MemoryError when creating a dict in a long running
> process and suspect this is due to memory fragmentation. Any
> suggestions would be welcome. Full details of the p
On Thu, 03 Jun 2010 20:05:15 +, exarkun wrote:
> On 06:58 pm, strom...@gmail.com wrote:
>>On Jun 3, 10:47 am, Nathan Huesken wrote:
>>>Hi,
>>>
>>>I am writing a network application which needs from time to time do
>>>file transfer (I am writing the server as well as the client). For
>>>simple
Call me strange, but I regard this as a good place to use a functional style
- IE, to use reduce, and furthermore I regard this as a good example of why
reduce is useful for more than just summing numbers:
#!/disc/gx/sdfw/dans/python26/bin/python
import collections
def count_first_letters(dictio
On Sun, Jun 6, 2010 at 8:16 PM, Ben Finney
> wrote:
> Anthony Papillion writes:
>
> > import os
> >
> > os.path.append('$HOME/gsutils/boto')
> >
> > thinking I could then successfully do the import boto statement.
> > Nope.
>
> You'll need to give the literal path. Substitution of environment
>
On Mon, Jun 7, 2010 at 1:16 PM, Thomas Jollans wrote:
> On 06/07/2010 07:45 PM, Dan Stromberg wrote:
>
>
> Call me strange, but I regard this as a good place to use a functional
> style - IE, to use reduce, and furthermore I regard this as a good example
> of why reduce is us
On Sat, Jun 5, 2010 at 7:22 PM, ant wrote:
> I get the strong feeling that nobody is really happy with the state of
> Python GUIs.
> Tkinter is not widely liked, but is widely distributed. WxPython and
> PyGtk are both
> powerful, but quirky in different ways. PyQt is tied to one platform.
> And
On Tue, Jun 8, 2010 at 7:09 PM, alex23 wrote:
>
> I'm amazed at the endless willingness of this group to help Victor
> write his contracted project for free.
>
> I don't get it. What's wrong with helping people? And what's it to you if
others do?
--
http://mail.python.org/mailman/listinfo/pyth
On Tue, Jun 8, 2010 at 6:12 PM, geremy condra wrote:
> On Tue, Jun 8, 2010 at 4:46 PM, Steven D'Aprano
> wrote:
> > On Tue, 08 Jun 2010 15:40:51 -0700, geremy condra wrote:
> >
> >> On Tue, Jun 8, 2010 at 3:09 PM, Lie Ryan wrote:
> >
> >>> Nobody complains that python included a regular express
I'm not sure of the specifics, but you may find that you can do this with
the syslog module - may require reconfiguring syslog.conf or the equivalent
though. If you hit an appropriate facility and level, you likely will see
syslog messages go to the kernel's dmesg ring buffer.
On Wed, Jun 9, 2010
On Wed, Jun 9, 2010 at 3:25 PM, Thomas Jollans wrote:
> On 06/09/2010 11:40 PM, J wrote:
> > Does anyone know of a way, or have a recipe, to do a linux printk
> > equivalent in Python?
> >
> > I've been googling for a while and not finding anything useful.
> >
> > The nutshell version of this is
$ python
Python 2.5.1 (r251:54863, Nov 2 2007, 11:57:24)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> list_ = [(1,2), (3,4), (5,6)]
>>> print list_.reverse()
None
>>> print list_
[(5, 6), (3, 4), (1, 2)]
>>>
On
You probably should tell us what GUI toolkit you're using.
But if your GUI toolkit has the concept of a "vertical box", then create a
vertical box, add it to your window, and put things in the vertical box.
To put your widget at the bottom of your vertical box, append to the end it
last or insert
On Thu, Jun 10, 2010 at 4:52 AM, Nobody wrote:
>
> Also, "ls | grep" may provide a useful tutorial for the subprocess module,
> but if you actually need to enumerate files, use e.g. os.listdir/os.walk()
> and re.search/fnmatch, or glob. Spawning child processes to perform tasks
> which can easily
I don't think #!/usr/bin/env python is the right thing - unless a script
really doesn't care much what version of python it gets.
I used to #!/usr/bin/env everything, but I've been updating my old scripts
not to. It's just too much trouble, despite the one minor simplification it
provides.
My Ub
On Tue, Jun 15, 2010 at 4:26 PM, Benjamin Kaplan
wrote:
> On Tue, Jun 15, 2010 at 3:55 PM, Dan Stromberg
> wrote:
> >
> > I don't think #!/usr/bin/env python is the right thing - unless a script
> > really doesn't care much what version of python it gets
On Tue, Jun 15, 2010 at 9:26 AM, Ian Kelly wrote:
> On Tue, Jun 15, 2010 at 6:21 AM, Alain Ketterlin
> wrote:
> > You compute i**2 too many times (7/5 times more than necessary) and
> > twice too many modulos. I suggest:
> >
> > c = { 0:1, 1:1, 2:1, 3:-1, 4:-1 }
> > #or, why not: c = lambda i :
On Tue, Jun 15, 2010 at 6:33 PM, MRAB wrote:
> Vishal Rana wrote:
>
>> Hi,
>>
>> A module level dictionary 'd' and is accessed by different
>> threads/requests in a django web application. I need to update 'd' every
>> minute with a new data and the process takes about 5 seconds.
>> What could be
On Fri, Jul 9, 2010 at 5:23 PM, Tim Chase wrote:
> On 07/09/2010 06:32 PM, Roy Smith wrote:
>
>> i have been asked to guarantee that a proposed Python application will
>>> run continuously under MS Windows for two months time. And i am looking
>>> to know what i don't know.
>>>
>>
>> Heh. The OS
On Fri, Jul 9, 2010 at 5:54 AM, Stopp, Bryan wrote:
> I checked, none of the files are symlinks. The install process never got
> to the point where it created sym-links for libraries (if it even does,
> I haven't gotten to that point in the install process.)
>
> -B
>
> -Original Message-
>
You could probably:
cd to dir1
getcwd
cd to dir2
getcwd
repeat
cd ..
getcwd
if getcwd == dir1's cwd, then under
until at /
cd to dir1
repeat
cd ..
getcwd
if getcwd == dir2's cwd, then under
until at /
This should deal with symlinks and junctions, as long as you aren't worried
2010/7/8 Luis M. González
> On Jul 8, 1:42 pm, John Nagle wrote:
> > How is Unladen Swallow coming along? Looking at the site, code is
> > being checked in and issues are being reported, but the last quarterly
> > release was 2009 Q3. They missed their January 2010 release date
> > for "20
On Fri, Jul 30, 2010 at 12:18 PM, News123 wrote:
> On 07/30/2010 03:12 PM, wheres pythonmonks wrote:
> > I am starting to use pylint to look at my code and I see that it gives a
> rating.
> > What values do experienced python programmers get on code not
> > targeting the benchmark?
> >
> > I wrot
On Thu, Jul 29, 2010 at 12:04 PM, John Nagle wrote:
> On 7/29/2010 11:08 AM, Shailendra wrote:
>
>> Hi All,
>> I have a following situation.
>> ==PSUDO CODE START==
>> class holds_big_array:
>> big_array #has a big array
>>
>> def get_some_element(self, co
On Wed, Jul 28, 2010 at 11:11 PM, Chris Rebert wrote:
> On Wed, Jul 28, 2010 at 8:12 PM, Navkirat Singh
> wrote:
> > Sorry, I might have been a bit vague:
> > (Also, I am new to pythong)
> > I am trying to do construct my own web session tracking algorithm for a
> web
> > server (which also I ha
On Mon, Aug 2, 2010 at 10:46 AM, Majdi Sawalha wrote:
> Dear List members,
>
> I am developing a morphological analyzer that depends on a large lexicon. i
> construct a Lexicon class that reades a text file and construct a dictionary
> of the lexicon entries.
> the other class will use the lexicon
David Robinow wrote:
This works for a simple binary file, but the actual file I'm trying to
read is give throwing an error that the file cannot be found. Here is the
name of the my file:
2009.08.02_06.52.00_WA-1_0001_00_0662_0.jstars
Should python have trouble reading this file name or extension
On Tue, Oct 26, 2010 at 10:31 AM, Mikael B wrote:
>
>
>
> >
> > That's from the functional programming crowd.
> >
> > Python isn't a functional language.
>
>
> A noob question: what is a functional language? What does it meen?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
It's
On Fri, Oct 29, 2010 at 10:35 AM, Tim Harig wrote:
> On 2010-10-29, mix wrote:
> > Hi,
> >
> > I'm wondering if there is a way in python to process a string
> > containing terminal escape characters. Example: Please consider the
> > following string:
>
> Python could easily process the escape co
On Thu, Oct 21, 2010 at 7:53 PM, John Nagle wrote:
> On 10/21/2010 2:51 PM, Chris Rebert wrote:
>
>> On Thu, Oct 21, 2010 at 2:36 PM, Sean Choi wrote:
>>
>>> I found two similar questions in the mailing list, but I didn't
>>> understand
>>>
>>> the explanations.
>>> I ran this code on Ubuntu 10.
On Thu, Nov 4, 2010 at 10:45 AM, Tim Harig wrote:
> I also looked at F# and Scala; but, neither are really applicable on my
> chosen platform. With F# being such a new language, I suspect that it
> borrowed its indent practices either from Haskell or from Python.
>
I'm pretty sure F# gets its wh
On Sat, Nov 13, 2010 at 5:46 AM, Tracubik wrote:
> hi all,
> i've this on python 2.6.6:
>
> >>> def change_integer(int_value):
> ... int_value = 10
> ...
> ... def change_list(list):
> ... list[0] = 10
> ...
> ... a = 1
> ... l = [1,1,1]
> ...
> ... change_integer(a)
> ... change_list(l)
901 - 1000 of 1015 matches
Mail list logo