Re: Anonymous email users

2024-06-23 Thread Sebastian Wells via Python-list
On Fri, 14 Jun 2024 18:00:37 -0400, avi.e.gross wrote: > I notice that in some recent discussions, we have users who cannot be > replied to directly as their email addresses are not valid ones, and I > believe on purpose. Examples in the thread I was going to reply to are: > >

Re: sharing data across Examples docstrings

2022-01-11 Thread Sebastian Luque
On Wed, 12 Jan 2022 09:28:16 +1100, Cameron Simpson wrote: [...] > Personally I'd be inclined to put long identical examples in the class > docstring instead of the method, but that may not be appropriate. Good point, and perhaps it's best to put a comprehensive example in the class docstring,

sharing data across Examples docstrings

2022-01-11 Thread Sebastian Luque
Hello, I am searching for a mechanism for sharing data across Examples sections in docstrings within a class. For instance: class Foo: def foo(self): """Method foo title The example generating data below may be much more laborious. Examples

Discussion forum for typing Q&A and review requests

2021-09-13 Thread Sebastian Rittau
the appropriate issue trackers. - Sebastian -- https://mail.python.org/mailman/listinfo/python-list

A news aggregator for the Python community

2019-10-18 Thread Sebastian Steins
Hi! Over the last few weeks I've build a hacker news clone for the Python community: https://news.python.sc The source is at github.com/sebst/pythonic-news I thought that might be of interest to you and I'd be more than happy to hear your thoughts on this. Best, --Sebastian

Python for Bioinformatics: New book announcement

2017-07-30 Thread Sebastian Bassi
I am glad to announce the second edition of Python for Bioinformatics. In today's data driven biology, programming knowledge is essential in turning ideas into testable hypothesis. Based on my extensive experience, Python for Bioinformatics, Second Edition helps biologists get to grips with the bas

Re: debugging during package development

2015-08-01 Thread Sebastian Luque
On Sat, 01 Aug 2015 15:30:34 +1000, Ben Finney wrote: > Seb writes: >> With lots of debugging to do, the last thing I'd want is to worry >> about the search path. > Short answer: you need ‘python3 ./setup.py develop’. > Medium-length answer: you need to add some infrastructure to get your > pr

Re: Gmail eats Python

2015-07-26 Thread Sebastian P . Luque
On Sat, 25 Jul 2015 18:34:30 +0200, Laura Creighton wrote: > Gmail eats Python. We just saw this mail back from Sebastian Luque > which says in part: >>>> try: all_your_code_which_is_happy_with_non_scalars except >>>> WhateverErrorPythonGiv

Re: scalar vs array and program control

2015-07-25 Thread Sebastian P . Luque
On Sat, 25 Jul 2015 14:44:43 +0200, Laura Creighton wrote: > And because I was rushed and posted without revision I left out > something important. >> So this is, quite likely, the pattern that you are looking for: >> try: all_your_code_which_is_happy_with_non_scalars except >> WhateverErrorPyt

anaconda upgrade

2015-06-17 Thread Sebastian M Cheung via Python-list
What is the best way to upgrade an existing virtual environment anaconda from 2.7.9 to 2.7.10 -- https://mail.python.org/mailman/listinfo/python-list

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 11:19:48 AM UTC+1, Mark Lawrence wrote: > On 15/06/2015 11:12, Sebastian M Cheung via Python-list wrote: > > How to do financial data cleaning ? Say I assume a list of 1000 finance > > series data in myList = Open, High, Low and Close. For missing Close

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 12:35:18 PM UTC+1, Laura Creighton wrote: > I don't know anything about this program, and in particular how > complete it is, but worth a look > https://github.com/benjaminmgross/clean-fin-data > > Laura Thanks Laura, I will check it out, but basically it is to clean f

Re: python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
On Monday, June 15, 2015 at 11:13:07 AM UTC+1, Sebastian M Cheung wrote: > How to do financial data cleaning ? Say I assume a list of 1000 finance > series data in myList = Open, High, Low and Close. For missing Close Price > data, What is best practice to clean data in Python Thanks

python financial data cleaning

2015-06-15 Thread Sebastian M Cheung via Python-list
How to do financial data cleaning ? Say I assume a list of 1000 finance series data in myList = Open, High, Low and Close. For missing Close Price data, What is best practice to clean data in Python -- https://mail.python.org/mailman/listinfo/python-list

Java to Python autoconverters

2015-06-12 Thread Sebastian M Cheung via Python-list
Are these available? Any good ones to recommend? -- https://mail.python.org/mailman/listinfo/python-list

Re: XCode and Python

2015-06-11 Thread Sebastian M Cheung via Python-list
On Thursday, June 11, 2015 at 11:07:59 PM UTC+1, Sebastian M Cheung wrote: > For some reason I cannot build now in XCode: > > $ xcodebuild -find python > /Users/sebc/anaconda/bin/python > > $python > Python 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42)

XCode and Python

2015-06-11 Thread Sebastian M Cheung via Python-list
For some reason I cannot build now in XCode: $ xcodebuild -find python /Users/sebc/anaconda/bin/python $python Python 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more informat

Re: How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread Sebastian M Cheung via Python-list
On Thursday, June 11, 2015 at 7:33:12 PM UTC+1, Sebastian M Cheung wrote: > How to pretty mathematical formulas in Python? Similar to Mathematica formats. > > Are there good packages to prettify mathematica formulas in Python? Thanks Pythonistas -- https://mail.python.org/mailman

How to pretty mathematical formulas in Python? Similar to Mathematica formats.

2015-06-11 Thread Sebastian M Cheung via Python-list
How to pretty mathematical formulas in Python? Similar to Mathematica formats. Are there good packages to prettify mathematica formulas in Python? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find number of whole weeks between dates?

2015-06-10 Thread Sebastian M Cheung via Python-list
yes just whole weeks given any two months, I did looked into calendar module but couldn't find specifically what i need. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find number of whole weeks between dates?

2015-06-10 Thread Sebastian M Cheung via Python-list
On Wednesday, June 10, 2015 at 6:06:09 PM UTC+1, Sebastian M Cheung wrote: > Say in 2014 April to May whole weeks would be 7th, 14th 28th April and May > would be 5th, 12th and 19th. So expecting 7 whole weeks in total What I mean is given two dates I want to find WHOLE weeks, so if giv

How to find number of whole weeks between dates?

2015-06-10 Thread Sebastian M Cheung via Python-list
Say in 2014 April to May whole weeks would be 7th, 14th 28th April and May would be 5th, 12th and 19th. So expecting 7 whole weeks in total -- https://mail.python.org/mailman/listinfo/python-list

Updated Python 2.7.10 and now causing XCode not to build new project?

2015-06-07 Thread Sebastian M Cheung
Updated my anaconda Python to 2.7.10 and now when I start my XCode new project i get: env: python: No such file or directory Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 127 Anyone experienced this issue? -- https:

Re: An "alternative" to Learning Perl

2012-01-10 Thread Sebastian Rooks
eady. I'll check out the first link, also. Thanks! -- Sebastian -- http://mail.python.org/mailman/listinfo/python-list

An "alternative" to Learning Perl

2012-01-08 Thread Sebastian Rooks
can't find one (just one) python book shorter than 500 pages that is worth its weight in salt. Anyone know of any, any at all? All suggestions welcomed! -- Sebastian -- http://mail.python.org/mailman/listinfo/python-list

subprocess.Popen() and a .msi installer

2010-12-17 Thread Sebastian Alonso
r: [Error 8] %1 no es una aplicación Win32 válida >>> Has this ever happen to any of you? The idea is to get this running, make it an exe (with py2exe) and use it whenever I need to install my whole development environment in the right order. Thanks in advance to all of you. Alonso Sebastian. -- http://mail.python.org/mailman/listinfo/python-list

Runtime Error

2010-10-28 Thread Sebastian
2.6/site.py", line 76, in makepath dir = os.path.abspath(os.path.join(*paths)) RuntimeError: maximum recursion depth exceeded What is going wrong with my python install? What do I have to change? Thanks, Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Runtime error

2010-10-28 Thread Sebastian
2.6/site.py", line 76, in makepath dir = os.path.abspath(os.path.join(*paths)) RuntimeError: maximum recursion depth exceeded What is going wrong with my python install? What do I have to change? Thanks, Sebastian -- http://mail.python.org/mailman/listinfo/python-list

yield all entries of an iterable

2010-10-23 Thread Sebastian
Hi, Is there a simpler way to yield all elements of a sequence than this? for x in xs: yield x I tried googling but fond only the other direction (turning a generator into a list with "list(my_generator())". Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Global hoykey on windows

2010-10-05 Thread Sebastian Alonso
Hey everyone, I've been working on an app that uses global hotkey and it's a very important part of the app, so far I have been using python-keybinder [0] and it's been working great on linux, but now I want to make it work under windows and there was no way to make it work. Any other library I

Issue 1 of "PET: English Translation" a Python magazine is out!

2010-09-12 Thread Sebastian Bassi
-- Forwarded message -- From: Roberto Alsina Date: Fri, Sep 10, 2010 at 12:00 AM Subject: [pyar] Issue 1 of "PET: English Translation" a Python magazine is out! To: python-announce-l...@python.org, Python Argentina This magazine is a community effort. It's done by Python guys in

Running pygtk app under windows.

2010-08-16 Thread Sebastian Alonso
Hey everyone, I'm trying to be able to run my app, which uses pygtk, under windows, but unfortunately I'm having big problems with it. The main purpose of this is to later on make an .exe file but i havent even been able to run the app at least. I've followed every single step from this faq

Re: biopython

2010-06-14 Thread Sebastian Bassi
On Mon, Jun 14, 2010 at 11:02 AM, madhuri vio wrote: > TypeError: Need a file handle, not a string (i.e. not a filename) This says that the error is that you are using a filename where you should be using a filehandle. So this line: for seq_record in SeqIO.read("ls_MTbH37Rv.fasta", "fasta"): Sh

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-28 Thread Sebastian Bassi
On Fri, May 28, 2010 at 9:41 AM, Tino Wildenhain wrote: > Did you consider adding a part dealing with postgresql too? > (Especially interesting in the way you can write stored functions > in python there) That is a good idea for the next version/edition. But meanwhile I could write something in m

Re: Free chapter about Python and databases (MySQL and SQLite)

2010-05-27 Thread Sebastian Bassi
On Fri, May 28, 2010 at 12:37 AM, John Bokma wrote: > I feel more than uncomfortable with example code that uses: user="root" What's wrong with this? It is just an example of connection string. The reader will use his/her user/pass/dbname according to their own settings. > (e.g. p291). I never g

Free chapter about Python and databases (MySQL and SQLite)

2010-05-27 Thread Sebastian Bassi
Hello, I want to announce that the publisher of "Python for Bioinformatis" (CRC Press) allowed me to publish a chapter from my book. I decided to publish the chapter about "Python and databases". I think it may be useful for somebody. The official announcement and download link is here: http://py4b

Re: ElementTree write creates large one line XML file ....

2010-05-27 Thread Sebastian Bassi
On Thu, May 27, 2010 at 9:13 PM, Robert Kern wrote: > ElementTree writes exactly what you tell it to. In XML, whitespace is > significant. If you want newlines and/or indentation to make it > pretty-looking, then you need to add those to your elements. This is not always true. Let me quote an XML

Re: MySQLdb - weird formatting inconsistency

2010-04-24 Thread Sebastian Bassi
Hi, Could you post a minimal version of the DB (a DB dump) to test it? Just remove most information and leave on the ones needed to reproduce the error. Also remove any personal/confidential information. Then dump the DB so I can test it here. Best, SB. -- http://mail.python.org/mailman/listinfo/

Re: Japanese (speaking) developer needed for a bit of regex magic

2010-04-21 Thread Sebastian
> > This works fine as long as they are in English: > > "??? is not a valid  value for BrowseNodeId. > >  >  Please change this value and retry your request.", >  > for instance, will raise an InvalidParameterValue > > > exception. However, the Japanese version returns the error message "??? > > は、

Re: Japanese (speaking) developer needed for a bit of regex magic

2010-04-21 Thread Sebastian
> > My regular expressions turn the Amazon error messages into Python > > exceptions. > > > This works fine as long as they are in English: "??? is not a valid > > value for BrowseNodeId. Please change this value and retry your > > request.", for instance, will raise an InvalidParameterValue > > ex

Re: Japanese (speaking) developer needed for a bit of regex magic

2010-04-21 Thread Sebastian
e with more knowledge of Japanese than me can have a look at my expressions. Maybe the Japanese messages are completely different... I have a collection of sample messages here (all files *-jp-*.xml): http://bitbucket.org/basti/python-amazon-product-api/src/tip/tests/2009-11-01/ Any help is app

Japanese (speaking) developer needed for a bit of regex magic

2010-04-20 Thread Sebastian
Hi all, I'm working on Python bindings for the Amazon Product Advertising API (http://pypi.python.org/pypi/python-amazon-product-api/) which supports the different localised versions - among them a Japanese one (for http://www.amazon.co.jp). All locales return error messages in English. Only the

Re: Converting Python CGI to WSGI scripts

2010-03-16 Thread Sebastian Bassi
On Tue, Mar 16, 2010 at 2:18 PM, wrote: > I have a few dozen simple Python CGI scripts. > Are there any advantages or disadvantages to rewriting these CGI scripts as > WSGI scripts? It depends of the script. WSGI should be faster since you don't start a Python instance for each call (as in CGI).

Re: parametrizing a sqlite query

2010-02-24 Thread Sebastian Bassi
On Wed, Feb 24, 2010 at 3:41 PM, Dennis Lee Bieber wrote: >        No there isn't... The problem is that you need to put the wildcards > into the parameter instead of the placeholder. Thank you, it works now. Best, SB -- http://mail.python.org/mailman/listinfo/python-list

parametrizing a sqlite query

2010-02-24 Thread Sebastian Bassi
c.execute("SELECT bin FROM bins WHERE qtl LIKE '%:keys%'",{'keys':keywords}) This query returns empty. When it is executed, keywords = 'harvest'. To check it, I do it on the command line and it works as expected: sqlite> SELECT bin FROM bins WHERE qtl LIKE '%harvest%'; 11C 11D 12F I guess there

Re: os.pipe() + os.fork()

2010-02-20 Thread Sebastian Noack
is the same behaviour. Regards Sebastian Noack signature.asc Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

os.pipe() + os.fork()

2010-02-20 Thread Sebastian Noack
and if it is possible work around it. Regards Sebastian Noack --- import os def test_pipe_sync(): pipe = os.pipe() os.write(pipe[1], 'Spam') os.close(pipe[1]) print repr(os.read(pipe[0], 4))

Re: how to duplicate array entries

2010-01-11 Thread Sebastian
Thank you for your answers! I actually implemented it using for loops before I posted here, but I was curious if there is a more elegant solution (judging from the post, Alf will probably say, that for loops are already elegant). Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Re: how to duplicate array entries

2010-01-10 Thread Sebastian
On Jan 11, 4:21 pm, Sebastian wrote: > I also tried [[b,b,b] for b in x] which led to [[1,2,3],[1,2,3], > [1,2,3]] Sorry, I have to correct myself. The quoted line above resulted in [[1,1,1],[2,2,2],[3,3,3]] of course! Cheers, Sebastian -- http://mail.python.org/mailman/listinfo/python-list

how to duplicate array entries

2010-01-10 Thread Sebastian
Hi there, I have an array x=[1,2,3] Is there an operator which I can use to get the result [1,1,1,2,2,2,3,3,3] ? I tried x*3, which resulted in [1,2,3,1,2,3,1,2,3] I also tried [[b,b,b] for b in x] which led to [[1,2,3],[1,2,3], [1,2,3]], but this isn't what I want either. Cheers, Seba

Re: Manipulating MySQL Sets

2009-12-13 Thread Sebastian Bassi
On Sun, Dec 13, 2009 at 2:10 PM, Carsten Haese wrote: from sets import Set aSet = Set(['Small', 'Extra-small', 'Medium']) You don't need to import "Set" since it is built in now: >>> a=set([1,2,2,3,4,5]) >>> a set([1, 2, 3, 4, 5]) (I have Python 2.6.2 but I think that this is availabl

Re: Manipulating MySQL Sets

2009-12-13 Thread Sebastian Bassi
On Sun, Dec 13, 2009 at 12:48 PM, Victor Subervi wrote: > Who said I was expecting a string? I don't know what I'm expecting! I need > to be able to parse this thing, whatever it is. You say it's a Python Set > object. How do I parse it? Googling has been disappointing. You can walk thought a set

a is b

2009-11-04 Thread Sebastian
I have a question from the pyar list that may have been discussed on this list, but i didn't catch it. Have some common objects been somewhat hardcoded into python, like some integers as shown in the examples below? What other object have been hardcoded (strings ,etc) and what was the criteria use

Re: [ANN] "Python for Bioinformatics" available and in stock

2009-10-20 Thread Sebastian Bassi
On Mon, Oct 19, 2009 at 5:53 AM, Piter_ wrote: > Great. > I've been waiting it. > Any place in Europe to get it? Go here: http://www.crcpress.com/product/isbn/9781584889298 And then look at the bottom of the page and choose your country, I know they have offices in London. > P.S. Is anyone writi

Re: "Python for Bioinformatics" available and in stock

2009-10-20 Thread Sebastian Bassi
On Mon, Oct 19, 2009 at 5:43 AM, Bearophile wrote: > A more pythonic code is: ... > Note the use of xrange and names_with_underscores. In Python names are > usually lower case and their parts are separated by underscores. Regarding underscore (and code notation in general) I wrote in the book (pa

[ANN] "Python for Bioinformatics" available and in stock

2009-10-18 Thread Sebastian Bassi
I announced that Python for Bioinformatics was ready, now I want to announce that is available and in stock in most book sellers. Worldwide, use Amazon. In Argentina, it is more convenient buying it from me at MercadoLibre: http://articulo.mercadolibre.com.ar/MLA-64715574-libro-python-for-bioinform

Popen question (redundant processes)

2009-08-30 Thread Sebastian
That is, p1 and p2 are the same, but p3 and p4 which they are passed to, are different. Is there a way to pass p1 and p2 to p3 AND p4 simultaneously, so as to not need to run p1 and p2 twice, as above? What arguments would I need to achieve this? NOTE: "georgi_ddr7_allmag_kcor_in_test.dat" is a very large file (~1E6 records) regards, - Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Re: web frameworks that support Python 3

2009-08-23 Thread Sebastian Wiesner
At Sunday 23 August 2009 22:13:16 you wrote: > I use Chinese and therefore Unicode very heavily, and so Python 3 is > an unavoidable choice for me. Python 2.x supports Unicode just as well as Python 3. Every common web framework works perfectly with unicode. In any case, there is bottle [1], whi

Re: Python or ActionScript 3.0

2009-08-15 Thread Sebastian Bassi
On Sat, Aug 15, 2009 at 10:29 PM, Douglas Alan wrote: > Python doesn't run in your typical web browser, but it is common to > use Python for doing the server-side programming, along with a Python- > based web development framework, such as Django. > You could use Jython to make a JVM applet that wo

Re: ANN: Python for Bioinformatics book

2009-08-06 Thread Sebastian Bassi
On Thu, Aug 6, 2009 at 11:52 AM, Bearophile wrote: > The book looks interesting, but that doesn't look like a good way to > show/offer the code. I suggest to also put it into a zip that can be > downloaded. Code is also in a directory in the DVD and also inside the virtual machine. Anyway I think

ANN: Python for Bioinformatics book

2009-08-06 Thread Sebastian Bassi
"Python for Bioinformatics" ISBN 1584889292 Amazon: http://www.tinyurl.com/biopython Publisher: http://www.crcpress.com/product/isbn/9781584889298 This book introduces programming concepts to life science researchers, bioinformaticians, support staff, students, and everyone who is interested in ap

Re: pack an integer into a string

2009-07-24 Thread Sebastian Bassi
On Fri, Jul 24, 2009 at 7:28 PM, superpollo wrote: > is there a pythonic and synthetic way (maybe some standard module) to "pack" > an integer (maybe a *VERY* big one) into a string? like this: What do you mean to pack? Maybe Pickle is what you want. import cPickle variable = 124348654333577698 c

Re: Concatenating images (numpy arrays), but they look like HSV images

2009-07-10 Thread Sebastian Schabe
float array or PIL image, but before I hadn't known where to search. So again, thank you Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Concatenating images (numpy arrays), but they look like HSV images

2009-07-09 Thread Sebastian Schabe
Hello everybody, I want to concatenate 2 numpy array which in fact are RGB images: def concat_images(im1,im2): rows1 = im1.shape[0] rows2 = im2.shape[0] if rows1 < rows2: im1 = concatenate((im1,zeros((rows2-rows1,im1.shape[1],3), int)), axis=0) elif rows1 > rows2: im2 = concat

Re: deleting certain entries in numpy array

2009-07-02 Thread Sebastian Schabe
nks a lot, also to Ben. > > You will want to ask numpy questions on the numpy mailing list. > > http://www.scipy.org/Mailing_Lists > I ever thought news-groups are the right way for questions like this. And the mailing list page just confuses me, but I'm trying to ge

deleting certain entries in numpy array

2009-07-01 Thread Sebastian Schabe
array are handled in another way. I think numpy.delete is the right function for discarding the values, but I don't know how to build the indices. Maybe someone can help me with that or suggest which way to do this Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
2009/6/27 Piet van Oostrum : >>>>>> Sebastian Pająk (SP) wrote: > >>SP> Maybe this picture will tell you more: >>SP> http://files.getdropbox.com/u/1211593/tkinter.png > >>SP> The original script: >>SP> http://files.getdropbox.com

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
Maybe this picture will tell you more: http://files.getdropbox.com/u/1211593/tkinter.png The original script: http://files.getdropbox.com/u/1211593/test1.py May someone can confirm this osx behaviour? 2009/6/26 Sebastian Pająk : > 2009/6/26 norseman : >> Sebastian Pająk wrote: >

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
>  in place where polish >> accented character should be (like "ęłąśł" etc) >> This problem is only on mac os x and it doesn't apply to button widget >> (where characters are correct) > > I see. So it is a font problem: if the square box is displayed, it means > that the font just doesn't have a gl

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Sebastian Pająk
2009/6/26 norseman : > Sebastian Pająk wrote: >>> >>> Can, but should not. >>> I read that the problem is when using the Polish language only. Otherwise >>> things work normally. Is that correct? >> >> Yes, correct >> >>> If so

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-25 Thread Sebastian Pająk
> Can, but should not. > I read that the problem is when using the Polish language only. Otherwise > things work normally. Is that correct? Yes, correct > If so then byte swap may be a problem.  Using the u'string' should solve > that. I am assuming you have the Polish alphabet working correctly

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-25 Thread Sebastian Pająk
2009/6/25 "Martin v. Löwis" : >> I've tried various UTF file encoding (also with BOM mark), use of >> u"text" > > Always use u"text". This should work. Everything else might not work. But I tried this here without success >> After applying this, the effect remains the same - one big garbage. > >

Tkinter - non-ASCII characters in text widgets problem

2009-06-25 Thread Sebastian Pająk
Hello I'm writing an application in Python 2.5.4 under Windows (xp sp3 en). I use Tkinter as the main GUI toolkit. The app is intended to be portable (not fully but win & mac os x is a must). It works as it should on my system, but when I've sent the program to my friend who has a mac computer, he

Re: Once again, comparison wxpython with PyQt

2009-06-18 Thread Sebastian Wiesner
> On Jun 18, 3:49 pm, "Diez B. Roggisch" wrote: >> Hans Müller wrote: >> > Here we have to select between wxPython and PyQt for a medium size >> > project. In this project several hundred dialogs are to be created. >> > This work will be done by a program generator which has to re-written. >> >>

Re: exit() or sys.exit()

2009-06-17 Thread Sebastian Wiesner
> What is the difference on exit() and sys.exit() when called in the > main body of a script? From the command line they seem to have the > same effect. As of Python 2.5 there is no difference, however documentation [1] says about exit() and quit(): > They are useful for the interactive interp

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-02 Thread Sebastian Wiesner
> Diez B. Roggisch wrote: >> Joseph Garvin schrieb: >> > So I was curious whether it's possible to use the ctypes module with >> > C++ and if so how difficult it is. I figure in principal it's possible >> > if ctypes knows about each compiler's name mangling scheme. So I >> > searched for "ctyp

Re: newbie: popen question

2009-05-28 Thread Sebastian Wiesner
> Your best bet is to make sudo not ask for a password. :) If you > don't have the rights, then you can use pexpect to do what you want to > do. http://pexpect.sourceforge.net/pexpect.html > > See the second example on that page. > > child = pexpect.spawn('scp foo myn...@host.example.com:.')

Re: LaTeXing python programs

2009-05-24 Thread Sebastian Wiesner
> On May 20, 10:10 pm, John Reid wrote: >> Alan G Isaac wrote: >> > The listings package is great and highly configurable. >> > Note that you can also input entire files of Python code >> > or pieces of them based on markers. Really quite great. >> >> I tried listings. I believe pygments makes

Re: Question about the wording in the python documents.

2009-05-02 Thread Sebastian Wiesner
> On May 2, 4:14 am, Sebastian Wiesner wrote: >> > >> > In either case, I think you're picking a nit so small that it isn't >> > actually there. All objects are instances (in Python), and all >> > instances are objects. >> >> Exactl

Re: Question about the wording in the python documents.

2009-05-02 Thread Sebastian Wiesner
> I don't understand your objection. Is it that the documentation calls it > Request instead of urllib2.Request? Or that it calls it an object instead > of an instance? I guess the latter ... > In either case, I think you're picking a nit so small that it isn't > actually there. All objects are i

Re: getting linux distro used...

2009-04-27 Thread Sebastian Wiesner
> In message a88b-2ded6f8af...@y33g2000prg.googlegroups.com>, deostroll wrote: > >> I just found that you could use platform.system() to get the >> underlying os used. But is there a way to get the distro used...? > > Mostly the differences will not be important. But if you want to know, I > h

Re: Presentation software for Python code

2009-04-24 Thread Sebastian Wiesner
> I'm willing to consider TeX- and HTML-based approaches. I can recommend latex with the beamer package. It doesn't directly support formatting of code snippets, but the pygments syntax highlighter comes with a Latex formatter. -- Freedom is always the freedom of dissenters.

Re: pyqt4 qTableWidget add items help

2009-04-19 Thread Sebastian Wiesner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > from PyQt4 import ?? QtGui? QtCore? Those are already loaded other > options are pyqtconfig and uic and those don't sound correct... from PyQt4 import QtGui QtGui.QTableWidgetItem See [1] for an example. [1] http://hg.lunaryorn.de/snippets/fi

Re: pyqt4 qTableWidget add items help

2009-04-18 Thread Sebastian Wiesner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [...] > I've been trying > > while(len(orders)> i): > ui.tb1_tblOrders.setCurrentCell(i,0,orders[i][1]) > i+=1 > > which to me, says go add in the first column row with the first order, > and it makes sense to me Rea

Re: Automatically generating arithmetic operations for a subclass

2009-04-14 Thread Sebastian Wiesner
> I have a subclass of int where I want all the standard arithmetic > operators to return my subclass, but with no other differences: > > class MyInt(int): > def __add__(self, other): > return self.__class__(super(MyInt, self).__add__(other)) > # and so on for __mul__, __sub__, e

Re: Does Python have certificate?

2009-03-23 Thread Sebastian Bassi
On Mon, Mar 23, 2009 at 9:15 PM, Muddy Coder wrote: > I wonder that does Python have certificate? You see, java, .NET, PHP, > and so on, they have certificates for developers to get. Python is > quite popular nowadays, I wonder is there such a thing? If so, I > certainly want to get one. I searche

doctest + shelve question

2009-03-06 Thread Sebastian Bartos
t work. I'd like to keep a consistent doctest documentation here and not spawn my project with additional test modules or similar. Any idea on how I can make it work like as if it would be called from the interactive interpreter? The documentation and Google were not too helpful. ps. Sys: Linux, P

Re: Problem trying to install ReportLab with easy_install

2009-02-22 Thread Sebastian Bassi
On Sun, Feb 22, 2009 at 10:07 AM, Garrett Cooper wrote: >It's not building lib_renderPM_libart properly, or it's a typo > that supposed to be librenderPM_libart, or bad LDFLAGS... >More details need to be provided like an ls of your site-packages > directory and a partial ls of your local

Problem trying to install ReportLab with easy_install

2009-02-21 Thread Sebastian Bassi
I don't understand what is wrong when I try to install ReportLab. This is under Ubuntu and all build packages are installed. Here is what I get when trying to install it: (I could install it with apt-get, but I am testing virtualenv and easy_install). (testbio149)vi...@maricurie:~/Public/testbio14

Re: How to store passwords?

2009-01-07 Thread Sebastian Bassi
On Wed, Jan 7, 2009 at 6:42 PM, Oltmans wrote: > I'm writing a program in which I will ask users to enter user name and > password once only. It's a console based program that will run on In general you don't store the password, but a "hash" of it. Then when the user logs-in, you hash it and comp

Re: How to find the beginning of last line of a big text file ?

2009-01-01 Thread Sebastian Bassi
On Thu, Jan 1, 2009 at 2:19 PM, Barak, Ron wrote: > I have a very big text file: I need to find the place where the last line > begins (namely, the offset of the one-before-the-last '\n' + 1). > Could you suggest a way to do that without getting all the file into memory > (as I said, it's a big fi

Re: Python advocacy ... HELP!

2008-12-04 Thread Sebastian Kaliszewski
Michael_D_G wrote: how do I refute the notion that Python is a "marginal" language because according to TOBIE it only less than a 6% market share. According to the same TIOBE, C++ has less than 11%. So it must be niche then as well :) -- "Never underestimate the power of human stupidity" --

Re: IDLE home page?

2008-10-22 Thread Sebastian Bassi
On Wed, Oct 22, 2008 at 3:49 AM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Depending on the answer you get here, you might send the same observation > and question to [EMAIL PROTECTED] OK, I've just sent it. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

IDLE home page?

2008-10-21 Thread Sebastian Bassi
If I put IDLE in the search box at python.org, the first hit is: http://www.python.org/idle/ But this page is a directory without any index file: Index of /idle Icon NameLast modified Size Description[DIR] Parent Directory - [ ] Makefile

Re: Commercial Products in Python

2008-10-21 Thread Sebastian Bassi
On Tue, Oct 21, 2008 at 2:50 PM, Paulo J. Matos <[EMAIL PROTECTED]> wrote: > I was just wondering, if you wish to commercialize an application > developed in Python, what's the way to go? You choose the conditions. Nothing in Python license prevents you of selling your work. > I guess the only wa

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-17 Thread Sebastian Wiesner
At Thu, 16 Oct 2008 18:21:38 +0200 wrote Bruno Desthuilliers <[EMAIL PROTECTED]>: >> It doesn't look like there's >> any way to browse the subversion any more, though. > > Doh :( > > Is there any way to get this version then ??? svn co https://python-mode.svn.sourceforge.net/svnroot/python-mode/

Re: python for *nix system admins

2008-09-27 Thread Sebastian Bassi
On Sat, Sep 27, 2008 at 3:32 PM, Eric Wertman <[EMAIL PROTECTED]> wrote: > I've been growing a library of my own functions, that use the names of > unix commands. They are just conveniences, of course, but I'd suggest > the same for sysadmins, it's handy. Can you share it? Best, SB. -- http://ma

Re: Making small executive file for distribution

2008-09-24 Thread Sebastian Bassi
On Wed, Sep 24, 2008 at 10:17 AM, Marin Brkic <[EMAIL PROTECTED]> wrote: > As far as I know py2exe is the only option which can do such a thing > (make exe files from scripts). Is there a way to make those exe files > a little smaller (for a small script they easily go up to 5-10 mb). An alternati

biopython

2008-09-09 Thread Sebastian Bassi
On 9/9/08, Beema Shafreen <[EMAIL PROTECTED]> wrote: > I am using Biopython to fetch pumed Id's ,The module i use is (from Bio > import Entrez) > But i am getting this error from Bio import Entrez > Traceback (most recent call last): > File "", line 1, in ? > ImportError: cannot import name

Re: Python program as daemon?

2008-07-25 Thread Sebastian "lunar" Wiesner
Johny <[EMAIL PROTECTED]>: > Is it possible to run a Python program as daemon? You can write daemons in basically any language out there. -- Freedom is always the freedom of dissenters. (Rosa Luxemburg) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >