contro opinion wrote:
import hashlib
f=open('c:\gpg4win-2.1.0.exe','rb')
print hashlib.md5(f.read()).hexdigest()
> ad6245f3238922bb7afdc4a6d3402a65
print hashlib.sha1(f.read()).hexdigest()
> da39a3ee5e6b4b0d3255bfef95601890afd80709
>
> i get it with md5,why the sha1 is wrong
Rotwang wrote:
> I've written a
> decorator to eliminate repeated calls by storing a dictionary whose
> items are arguments and their results:
> The problem is that the dictionary key
> stored depends on how the function was called, even if two calls should
> be equivalent; hence the original fun
Kiuhnm wrote:
> You can also "overload" '<-' ;)
In the same spirit:
http://code.activestate.com/recipes/384122-infix-operators/
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
> On Sat, Apr 21, 2012 at 11:03 AM, Foster Rilindo wrote:
>> Is this right way to concatenate a file or is there a better way?
>
> I'd be inclined to ignore shutil and simply open one file for reading,
> the other for appending, and manually transfer data from one to the
>
G'day,
I want to extend an embedded interpreter so that calls to print() are
automagically sent to a C++ gui (windows exe) via a callback function in
the DLL.
Then I'll be able to do this:
test.py
import printoverload
printoverload.set_stdout()
printoverload.set_stderr()
print("th
Cheers,
Yes was aware this would (might) be possible in 3.x only.
"All you have to do is assign to print". Sounds great! Can some kind
soul hit me with a clue stick? Were do I look in the API?
On 27/04/2012 4:26 AM, Chris Angelico wrote:
On Fri, Apr 27, 2012 at 3:57 AM, Pe
On 27/04/2012 5:15 PM, Stefan Behnel wrote:
Peter Faulks, 26.04.2012 19:57:
I want to extend an embedded interpreter so that calls to print() are
automagically sent to a C++ gui (windows exe) via a callback function in
the DLL.
Then I'll be able to do this:
test.py
i
On 27/04/2012 6:55 PM, Stefan Behnel wrote:
Peter Faulks, 27.04.2012 10:36:
On 27/04/2012 5:15 PM, Stefan Behnel wrote:
Peter Faulks, 26.04.2012 19:57:
I want to extend an embedded interpreter so that calls to print() are
automagically sent to a C++ gui (windows exe) via a callback function
On Fri, 27 Apr 2012 13:24:35 +0200, Kiuhnm wrote:
> I'd like to change the syntax of my module 'codeblocks' to make it more
> pythonic.
>
> Current Syntax:
>
> with res << func(arg1) << 'x, y':
> print(x, y)
>
> with res << func(arg1) << block_name << 'x, y':
> print(x
deltaquat...@gmail.com wrote:
> At this point, I go for a Fortran/C code, which takes me longer to write.
If you already have a basic programming knowledge the tutorial that comes
with Python should be an excellent starting point:
http://docs.python.org/py3k/tutorial/index.html
> Now I'd like
deuteros wrote:
> I'm using regular expressions to split a string using multiple delimiters.
> But if two or more of my delimiters occur next to each other in the
> string, it puts an empty string in the resulting list. For example:
>
> re.split(':|;|px', "width:150px;height:50px;float:right"
G'day All,
Following on from my earlier query on overloading print()
I've come up with this:
/* < stdcallbk.pyd > */
/*---stdcallbk.h-*/
#ifndef STDCALLBK_MODULE_H
#include
#define STDCALLBK_MODULE_H
// Type definition for the callback function.
typedef
ArifulHossain tuhin wrote:
> I have this data file which contains raw data in newline terminated for
> like below:
>
> 10.6626
> 11.2683
> 11.9244
> 12.5758
> 14.1402
> 15.1636
>
> Now i want to read that file and import this data into a numpy array. how
> should i go about it?
myarray = numpy.
Jean-Michel Pichavant wrote:
> Chris Kaynor wrote:
>> On Wed, May 2, 2012 at 12:51 PM, J. Mwebaze wrote:
>>
>>> I have multiple objects, where any of them can serve my purpose..
>>> However some objects might not have some dependencies. I can not tell
>>> before hand if the all the dependencie
Rogelio wrote:
> I've got quite a few Perl scripts that I would like to leverage, and
> I'd like to make some Python wrapper scripts for them.
>
> The Perl scripts shell into various network appliances, run certain
> commands, and then output those commands into a file.
>
> I recently found out
Charles Hixson wrote:
> class Node:
>
> def__init__(self, nodeId, key, value, downRight, downLeft,
> parent):
> dirty=True
> dlu=utcnow()
> self.node=[nodeId, downLeft, [key], [value],
> [downRight], parent, dirty, dlu]
>
> Note th
Nikhil Verma wrote:
> Hi All
>
> I want to generate a random number of 8 digits which involve 3 number and
> 5 digits.
> Like this :-
>
> def random_number():
> # do something
>
> random_number()
> "123abcde" # first 3 numbers and 5 letters after the numbers.
>
> I am able to generate the
On Wed, 16 May 2012 23:55:29 -0400, Mark R Rivet wrote:
> I have a copy of this book and was wondering how relevant the content
> is considering the publish date is 2000. Are people still using this
> information? Anyone have any experience with this book?
I bought the book years ago, hoping to
On Thu, 17 May 2012 07:48:50 -0400, Mark R Rivet wrote:
>
> I am in the process of learning python, and want to learn tkinter for
> GUI stuff. Is tkinter what people are using for GUI?
Tkinter is one option. PyGUI is another. More suggestions
will probably accrete on this thread.
--
To email
Fayaz Yusuf Khan wrote:
> ***TRIVIAL ISSUE***, but this has been irking me for a while now.
> The main logging.Handler class' __init__ accepts a level argument while
> none of its children do. The poor minions seem to be stuck with the
> setLevel method which considerably lengthens the code.
>
>
Thibaut DIRLIK wrote:
> Hi,
>
> I've a list of python objects with dates attributes. This list is ordered
> by one of these date. Elements mandatory follow each other :
>
> Element #1 Element #2 Element #3
> |-|--|--
Jean-Michel Pichavant wrote:
> Fayaz Yusuf Khan wrote:
>> Jean-Michel Pichavant wrote:
>>
>>> Meanwhile you can shorten the code this way:
>>>
>>> root.addHandler(FileHandler('debug.log'))
>>> root.handlers[-1].setLevel(DEBUG)
>>>
>>>
>> Eh? Readability was the aim.
>>
> I fail to see h
Jean-Michel Pichavant wrote:
> Peter Otten wrote:
>> Jean-Michel Pichavant wrote:
>>
>>
>>> Fayaz Yusuf Khan wrote:
>>>
>>>> Jean-Michel Pichavant wrote:
>>>>
>>>>
>>>>> Meanw
On Fri, 25 May 2012 13:36:18 + (UTC), Grant Edwards wrote:
[snip]
> . . . Nothing will make your users swear at
> you as certainly as when you refuse to accept the e-mail address at
> which the reeive e-mail all day every day.
Amusingly, every time I log into Discovercard's web site, I
get a
anntzer@gmail.com wrote:
> from collections import *
> class C(object):
> def __iter__(self): pass
> def __contains__(self, i): pass
> def __len__(self): pass
> def __getitem__(self, i): pass
> issubclass(C, Mapping) => False
> [issubclass(C, cls) for cls in Mapping.__mro__] =>
On Sat, 26 May 2012 16:05:23 +0100, duncan smith wrote:
> On 25/05/12 23:38, Jon Clements wrote:
[snip]
>> Is there a server out there where I can get my news groups?
>
> If you don't mind paying a small fee there are several companies
> providing usenet access such as http://www.newsdemon.com. (I
Steven D'Aprano wrote:
> I was playing around with metaclasses and I wondered what would happen if
> the metaclass itself had a metaclass. Sort of a metametaclass.
>
> Apparently it gives an error. Can anyone explain why this does not work?
>
> # Python 3.2
>
>
>
class MyType(type): # A
Phanindra Ramesh Challa wrote:
> I am trying to run a python program. It is giving the KeyError: '13'. I
> have no clue regarding this error.
> this is the python code relevant to the error:
>
> dpi = 100
> bold = 0
> italic = 0
> mono = 0
> comment = ""
> dbname = "font.db"
>
> for o, a in opt
Tom King wrote:
> hi im new in python and i have a problem about
>
> when i type python in my command line console i get an error message
>
> 'import site' failed; use -v for traceback
> Python 2.4.3 (#1, May 5 2011, 18:44:23)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
> Type "help", "
Phanindra Ramesh Challa wrote:
[Please hit "reply-all" in you email client when you answer a post. That way
it will appear on the mailing list and give more people a chance to answer]
> output of the is just the line
> "sizes".
>> and then decide if you to need to change the lookup key or to ad
n -S
>>
>> and then import site explicitly in the interactive interpreter:
>>
>> >>> import site
>>
>> You should get a traceback. If you cut and paste it and show it to us we
>> might tell you more.
> thank you Peter for your response i fol
loial wrote:
> I have a requirement to test the creation time of a file with the
> current time and raise a message if the file is more than 15 minutes
> old.
>
> Platform is Unix.
>
> I have looked at using os.path.getctime for the file creation time and
ctime is not actually the creation tim
jdmorgan wrote:
> Hello,
Welcome!
> I am still fairly new to python, but find it to be a great scripting
> language.Here is my issue:
>
> I am attempting to utilize a function to receive any sequence of letter
> characters and return to me the next value in alphabetic order e.g. send
> in "abc"
jdmorgan wrote:
> Hi Peter,
>
> Thanks for you feedback. I have the next_alpha function you have
> provided. But, am still getting the same result.
> The actual value I am passing in is "btl". But, as I mentioned I am
> getting it from an array value.
Note that w
Julio Sergio wrote:
> J. Cliff Dyer sdf.lonestar.org> writes:
>
>>
>> readlines() reads all the lines from the filehandle, but the filehandle
>> hasn't signalled that it is done writing lines, so fo is waiting until
>> fi is complete. You either need to keep reading one line at a time, and
>>
Ivars Geidans wrote:
> Something like this?
Or this (I'm reusing some of your code but let the built-in sorted() do the
hard work):
#!/usr/bin/env python3
import random
def _reverse_iterpath(node):
while node is not None:
yield node.name
node = node.parent
def path(node):
Ivars Geidans wrote:
> def append_node(n, l, ls):
> ls.append(n)
> for c in [nc for nc in l if nc.parent is n]:
> append_node(c, l, ls)
> return ls
>
> def sort_nodes(l):
> ls = []
> for r in l:
> if r.parent == None:
> append_node(r, l, ls)
>
>
website!
>
> This is no longer Plone based, but a nicely configured Trac site.
I'm only another user of Plone and I'm only curious:
Would you or someone else care to explain what made you
move away from Plone?
I think especially the Plone community might also be interested.
bruce g wrote:
> What is the best way to parse a CSV string to a list?
>
> For example, how do I parse:
> 'AAA,",,",EEE,FFF,GGG'
> to get:
> ['AAA','BBB,CCC,','EEE','FFF','GGG’]
>>> import csv
>>> next(csv.reader(['AAA,",,",EEE,FFF,GGG']))
['AAA', ',,D
Gelonida N wrote:
> I'm having a module, which should lazily evaluate one of it's variables.
> Meaning that it is evaluated only if anybody tries to use this variable.
>
> At the moment I don't know how to do this and do therefore following:
>
>
> ### mymodule.py ###
> var = None
>
> d
Prashant wrote:
> class Shape(object):
> def __init__(self, shapename):
> self.shapename = shapename
>
>
> def update(self):
> print "update"
>
> class ColoredShape(Shape):
> def __init__(self, color):
> Shape.__init__(self, color)
> s
Tracubik wrote:
> if you like, off course :)
>
> I'm making a port in python of a program made of bash commands + zenity
> for the GUI.
> so, i've to re-create a GUI in pyGTK and associate the right bash commands
> to the buttons.
> Instead of executing the bash script i simply print they in the
Keir Rice wrote:
> Ian, I was basing my code off Fredrik Lundh post on comparing images.
> http://effbot.org/zone/pil-comparing-images.htm
> return math.sqrt(sum([h*i*i for i,h in enumerate(histogram)]) /
> self.Area())
>
> Ran at the same speed as my 'fast' version and without the square bracke
Gnarlodious wrote:
> This may be happening because I am using Python 3.2 which includes
> "curses" to format output. When running:
>
> pydoc.render_doc(sys.modules[__name__])
>
> in Terminal I see FUNCTIONS
>
> when the same output goes to HTTP I see FFUUNNCCTTIIOONNSS
What you are se
Hello,
I would like to encrypt text in python and decrypt it in my PHP script. I
tried to use pycrypto and some aes php scripts but the results are not the
same. Please, is there any example (the best way source codes) how to do
this in python and PHP?
--
http://mail.python.org/mailman/listinfo/p
where is the problem. I am trying do decrypt data
in python then store it as base64 and read and decrypt it in php.
2011/6/4
> Use xml to pass the encrypt text.
>
>
> On , Peter Irbizon wrote:
> >
> > Hello,
> >
> > I would like to encrypt text in python and de
Hello, I am trying to make nice icons for my program. I compiled it with
py2exe but problem is that exe icon in Win 7/vista is not very nice (it
looks like win7 takes 32x32 instead of 248x248icon)
I used png2ico to pack icon file: png2ico icon.ico png248x248.png
png32x32.png png16x16.png
Any idea
Hello Ian,
thanks, I found another php script but it is not working as well :/ What am
I doing wrong?
And I have another question too: when I use text for encoding "Text for 1"
and "Text for 11" the first letters of encoded strings are the same in both
strings?
here is my py:
# -*- coding: utf-8 -
On Tue, 07 Jun 2011 16:55:28 +0200, Alain Ketterlin wrote:
> Chris Gonnerman writes:
>
>> On the 30th of May, I received an email from a man (I'll leave out his
>> name, but it was properly male) offering to translate the docs for the
>> gdmodule (which I maintain) into Belorussian. [...]
>
> The
Steve Crook wrote:
> I've always done key creation/incrementation using:
>
> if key in dict:
> dict[key] += 1
> else:
> dict[key] = 1
Your way is usually faster than
> dict[key] = dict.get(key, 0) + 1
>
> Whilst certainly more compact, I'd be interested in views on how
> pythonesque t
Olivier LEMAIRE wrote:
> I've been looking for 2 days for a way to convert integer to binary number
> 0-padded, nothing... I need to get numbers converted with a defined number
> of bits. For example on 8 bits 2 = 0010 I wrote the following:
> b = str(bin(number))[2:]
The result of bin()
simona bellavista wrote:
> Hi, I am quite new to python and I am trying to do some simple plots.
> I am using python Python 2.6.4 and numpy/1.5.1
> I have an ASCII data file that I am reading with the following lines
> of code:
>
> import pylab
> import numpy as np
>
> filename='something.dat'
On 20 Jun 2011 01:41:44 GMT, Steven D'Aprano wrote:
> The last couple of messages on this list show up
> fine on the mailman archives, but are empty posts on comp.lang.python. Is
> there a problem with the mail -> usenet gateway?
I don't see any empty posts on comp.lang.python. Can we talk
abo
On 20 Jun 2011 23:49:11 GMT, Steven D'Aprano wrote:
[snip]
> I will treat this as a bug in Pan, and take it to the appropriate forums,
> but for anyone who cares, here's one example:
>
> From: Steven D'Aprano
> Subject: Re: What is this syntax ?
> Newsgroups: comp.lang.python
> References:
Saul Spatz wrote:
> Hi,
>
> I'm just starting to learn a bit about Unicode. I want to be able to read
> a utf-8 encoded file, and print out the codepoints it encodes. After many
> false starts, here's a script that seems to work, but it strikes me as
> awfully awkward and unpythonic. Have you a
Andy Barnes wrote:
> Hi,
>
> I am hoping someone here can help me with a problem I'd like to
> resolve with Python. I have used it before for some other projects but
> have never needed to use Regular Expressions before. It's quite
> possible I am following completley the wrong tack for this task
Gnarlodious wrote:
> On Jun 23, 7:59 am, Noah Hall wrote:
>> >>>from a import x
>
> I'm doing that:
> import Module.Data as Data
from Module import Data
There, you saved three more characters .
> However I end up doing it in every submodule, so it seems a little
> redundant. I wish I could loa
rzed wrote:
> I've tried to install PySVG in a Python 3 setting, and I get a few
> errors on the build. Most are easy to fix, but this one I can't
> explain or fix:
>
>
> Traceback (most recent call last):
> File "", line 1, in
> File "builders.py", line 12, in
> from pysvg.shape impor
Hello,
on 32-bit windows everything works ok but on 64-bit win I am getting
this error:
Traceback (most recent call last):
File "app.py", line 1040, in do_this_now
File "kinterbasdb\__init__.pyc", line 119, in
File "kinterbasdb\_kinterbasdb.pyc", line 12, in
File "kinterbasdb\_kinterbasdb.py
hello,
I find out that my program needs
Microsoft.VC90.CRT.manifest,msvcm90.dll,msvcp90.dll,msvcr90.dll files when I
want to run it on win 64bit systems. I find these files in some other
software.
Can I simply take it from another software then include it to my program
folder and distribute it th
>> Are you running 32bit or 64bit Python on your 64bit Windows box? You
>> have to install the same flavour of Python, kinterbasdb and Firebird SQL
>> (all 32bit or all 64bit). You also have to check the "copy client dlls
>> to system directory" check box during the installation of Firebird SQL.
>>
> Read the EULA that comes with Microsoft Visual C++ Redistributable
Package.
thanks. hm, but it looks like every user should download redistributable
package and then istall it, right? I would like to prevent this because
every action which requires user's interaction is not good (high chance he
Andrew Berg wrote:
> I'm working on an audio/video converter script (moving from bash to
> Python for some extra functionality), and part of it is chaining the
> audio decoder (FFmpeg) either into SoX to change the volume and then to
> the Nero AAC encoder or directly into the Nero encoder. This i
> kinterbasdb's extension module _kinterbasdb.pyd depends on the shared
> library fbclient.dll. The Firebird client library is of the Firebird SQL
> server. As I already explained you have to install the 32bit (!) version
> of Firebird and enable the "copy client dll to system32" option during
> th
AlienBaby wrote:
> I'm just wondering why something is so, and whats going on under the
> hood.
>
> Now and again I use something like
>
> class empty(object):
> pass
>
>
> simply so I can make an instance, and set some attributes on it.
>
> a=empty()
> a.whatever=something
>
>
> Poking ar
Ulrich Eckhardt wrote:
> Peter Otten wrote:
>> Examples for classes that don't accept attributes are builtins
>> like int, tuple, and -- obviously -- dict. You can make your own
>> using the __slot__ mechanism:
>>
>>>>> class A(object):
>&
Robert Upton wrote:
> I am in the process of generating a simple GUI that wants to read a
> string and print it to the terminal after engaging a button. I am
> running into a problem where Python says it does not understand the
> get() attribute for Entry.
Please don't paraphrase Python's erro
Andrew Berg wrote:
> Okay, so I've refactored those except WindowsError blocks into calls to
> a function and fixed the os.devnull bug, but I still can't get the
> triple chain working. I added calls to ffmpeg_proc.stdout.close() and
> sox_proc.stdout.close(), but I really am not sure where to put
Даниил Рыжков wrote:
> How can I get headers with urlretrieve? I want to send request and get
> headers with necessary information before I execute urlretrieve(). Or
> are there any alternatives for urlretrieve()?
It's easy to do it manually:
>>> import urllib2
Connect to website and inspect h
Saqib Ali wrote:
>
>
> I have written two EXTREMELY simple python classes. One class
> (myClass1) contains a data attribute (myNum) that contains an integer.
> The other class (myClass2) contains a data attribute (mySet) that
> contains a set.
>
> I instantiate 2 instances of myClass1 (a & b).
Thomas Guettler wrote:
> I get a HeaderParseError during decode_header(), but Thunderbird can
> display the name.
>
from email.header import decode_header
decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=')
> Traceback (most recent call last):
> Fil
Thomas Guettler wrote:
> On 04.07.2011 11:51, Peter Otten wrote:
>> Thomas Guettler wrote:
>>
>>> I get a HeaderParseError during decode_header(), but Thunderbird can
>>> display the name.
>>>
>>>>>> from email.header i
Phlip wrote:
> Tx, all!. But...
>
>> For example I use this function to copy a stream and return a SHA512 and
>> the output streams size:
>>
>> def write(self, in_handle, out_handle):
>> m = hashlib.sha512()
>> data = in_handle.read(4096)
>> while True:
>> if not data:
>> break
>> m.update(data)
Phlip wrote:
>> - Open the file in binary mode.
>
> I had tried open(path, 'rb') and it didn't change the "wrong" number.
>
> And I added --binary to my evil md5sum version, and it didn't change
> the "right" number!
>
> Gods bless those legacy hacks that will never die, huh? But I'm using
> Ub
Kannan Varadhan wrote:
> Here is something I don't fully understand.
>
> 1 def DefaultTracer(fmt, *args):
> 2 fmt = 'in DefaultTracer ' + fmt
> 3 print(fmt % args)
> 4 pass
> 5 def myTracer(fmt, *args):
> 6 fmt = 'in myTracer ' + fmt
> 7 print(fmt % args)
> 8
> 9 class
prakash jp wrote:
> Could any one help to get max and min values from a specified column of a
> csv file. The* csv file is large* and hence the below code did go bad.
> *Alternate
> methods would be highly appreciated
> **
> minimum.py*:
> import csv
> filename = "testLog_4.csv"
> f = open(filenam
Peter Otten wrote:
> or you wrap the callable in a descriptor:
>
>>>> def DefaultTracer(*args): print args
> ...
>>>> class D(object):
> ... def __init__(self, f):
> ... self.f = f
> ... def __get__(self, *args):
> ...
MRAB wrote:
>> for line2 in nxxReg.findall(soup):
>> nxxlist.insert(count2, line2)
>> count2 = count2 + 1
>>
> enumerate will help you here:
> for count2, line2 in enumerate(nxxReg.findall(soup)):
> nxxlist.insert(count2, line2)
An insert() at the end of a list is usually spelt appe
Ellerbee, Edward wrote:
> I've been working on this for 3 weeks as a project while I'm learning
> python. It's ugly, only function in there is from a fellow lister, but
> it works perfectly and does what it is intended to do.
>
> I'd love to hear comments on how I could improve this code, what wo
Steven D'Aprano wrote:
> I have a custom object that customises the usual maths functions and
> operators, such as addition, multiplication, math.ceil etc.
>
> Is there a way to also customise math.sqrt? I don't think there is, but I
> may have missed something.
There seem to be only three metho
Hello, please I have problem with "The following modules appear to be
missing" message during compiling my app exe file with py2exe. What should I
do with this? Many thanks in advance.
The following modules appear to be missing
['Carbon', 'Carbon.Files', '_scproxy', 'fixedpoint', 'gdk', 'mx', 'un
J wrote:
> I am looking to improve the performance of the following piece of Python
> code:-
>
> for cc in StatusContainer:
> for srv in StatusContainer[cc]:
> for id in StatusContainer[cc][srv]['RECV']:
> if id in StageContainer['13']:
> StatusContainer[c
Saul Spatz wrote:
> In tcl/tk an Entry widget can be set to validate its contents with the
> validate option. You have to give it a validatecommand (vcmd), which is a
> tcl script that runs when some action triggers validation. Usually, the
> script would use "percent substitutions" so the scrip
Saul Spatz wrote:
> That doesn't work, I'm being stupid, The user might type anywhere in the
> string, not just at the end. I need
>
> return all([c in '1234567890abcdefABCDEF ' for c in after])
Ah, you found out already. Here's what I've come up with in the meantime.
I also changed the comman
Steven W. Orr wrote:
> I have been doing a lot of reading. I'm starting to get it. I think it's
> really cool as well as dangerous, but I plan on being respectful of the
> construct. I found a web page that I found quite readable.
>
> http://cleverdevil.org/computing/78/
>
> So, I tried to run t
Terry Reedy wrote:
> On 7/25/2011 8:31 AM, Peter Otten wrote:
>> Saul Spatz wrote:
>>
>>> That doesn't work, I'm being stupid, The user might type anywhere in
>>> the
>>> string, not just at the end. I need
>>>
>>> return all
pyt...@bdurham.com wrote:
> How would your examples work with text being inserted or deleted via the
> clipboard?
>
> Is there anything special that would have to happen for changes to a
> widget's value as the result of one of these events?
I think it doesn't matter whether you type in text, or
Bevan Jenkins wrote:
> Hello,
>
> I am trying to create a tree structure for use with a PyQt QTreeView.
> But first I need to get my head around how to create the tree
> structure. I have a dictionary (for testing purposes) but I will
> later use a table via sqlalchemy.
>
> The use case is hydr
Kumar Mainali wrote:
> I have a dataset with occurrence records of multiple species. I need to
> get rid of multiple listings of the same occurrence point for a species
> (as you see below in red and blue typeface). How do I create a dataset
> only with unique set of longitude and latitude for eac
Sells, Fred wrote:
> I'm tring to unzip a buffer that is uploaded to django/python. I can
> unzip the file in batch mode just fine, but when I get the buffer I get
> a "BadZipfile exception. I wrote this snippet to try to isolate the
> issue but I don't understand what's going on. I'm guessing
Steven Kauffmann wrote:
> I have written a small GUI application in python 3.x using the tkinter
> module. Program is running fine, but multiple instances of the program
> can now be created. I would like to reduce the number of instances of
> the program to only 1 instance. I know that this is po
Christian Doll wrote:
> i have e little performance problem with my code...
>
> i have to compare many lists of very much floats. at moment i have
> nested for-loops
>
> for a in range( len(lists) ):
> for b in range( a+1 , len(lists) ):
> for valuea in lists[a]:
> equal=
Hello guys,
I would like to translate all strings in my application for several
languages (eng, es, de, etc) and user should be able to switch app
from one language to another. I am still newbie with python so is
there any "step-by-step" tutorial how to to this? thanks for help
--
http://mail.pyt
for double posting but when I post my message on googlegroups I
can't see it in googlegroups (don't know why)
thanks
2011/7/28 Chris Rebert
> On Thu, Jul 28, 2011 at 2:11 AM, Peter Irbizon
> wrote:
> > Hello guys,
> >
> > I would like to translate all strings
AlienBaby wrote:
> When using re patterns of the form 'A|B|C|...' the docs seem to
> suggest that once any of A,B,C.. match, it is captured and no further
> patterns are tried. But I am seeing,
>
> st=' Id NameProv Type CopyOf BsId
> Rd -Detailed_State-Adm
hello,
I am using gettext fo localization
local_path=os.path.join(module_path(), lang_folder)
gettext.bindtextdomain(lang_name, local_path)
gettext.textdomain(lang_name)
# Get the language to use
lang = gettext.translation(lang_name, local_path, languages=['s
hello Chris,
I am using pygtk.
2011/7/29 Chris Rebert
> On Thu, Jul 28, 2011 at 6:20 PM, Peter Irbizon
> wrote:
> > hello,
> > I am using gettext fo localization
>
> > Now I would like to switch all texts in my app when I click on item in
> menu.
> >
Hello Thomas,
> The usual way of using gettext is to use the system locale to determine
> the right language. Of course, you can have different translations and
> install() them (I expect), but you'll have to re-load all the strings
> displayed in your application when you switch language, which m
Hello geeks, I have this code in my app:
self.menu_items = (
( "/_Languages", None,None, 0, "" ),
( "/Languages/_english", None,self.print_lang, 0, ""
),
( "/Languages/_german", None,self.print_lang, 0, ""
),
)
self.vbox = gt
> Well, it depends on how you're constructing your interface. If you're
> creating all the widgets in Python code, you could move all your
> foo.text = "Bar"; statements to one method that updates the text for all
> widgets, and call that both from the constructor and from the
> language-switching
601 - 700 of 9316 matches
Mail list logo