Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Christian Gollwitzer
ghtly different to your eye, but they are exactly the same for Python. The .py file doesn't have a difference, regardless how you set the font. As others have said, the underscore of some fonts is so long that they overlap, if you put more than on in a row. Christia

Spam, bacon, sausage and Spam (was: EuroPython 2020: Data Science Track)

2020-07-22 Thread Christian Heimes
e and year (!) sounds sensible to me. You have posted 21 new threads about EP 2020 since January on this list, thereof 5 threads this month. In comparison I could only find two ads for other conferences in the last 12 month (FlaskCon, PyCon TZ). Christian -- https://mail.python.org/mailman/lis

Re: Spam, bacon, sausage and Spam (was: EuroPython 2020: Data Science Track)

2020-07-23 Thread Christian Heimes
On 23/07/2020 02.12, Cameron Simpson wrote: > On 22Jul2020 15:00, Christian Heimes wrote: >> Hi MAL, >> >> would it be possible to reduce the amount of EuroPython spam on >> @python.org mailing lists to a sensible level? This mailing list is a >> general discussio

Re: Installing Python 3.8.3 with tkinter

2020-07-23 Thread Christian Gollwitzer
nsions, you need X11 development headers. Maybe that is one problem. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: The speed of glob()

2020-07-29 Thread Christian Heimes
ly the build system builds Python again. The compiler uses the runtime information to create optimized code. Some distributions also use special compiler flags or other tricks to make Python even faster. Victor Stinner (a Python core dev) and his co-workers have done some research to speed up Python by up to 30% on top of PGO, https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/ Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to diagnose import error when importing from .so file?

2020-07-29 Thread Christian Heimes
right. The extension module is compiled for Python 2. _Py_ZeroStruct is only available in Python 2. You need the C code for the extension module. and possibly even modify the C code to make the extension work with Python 3. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: How to diagnose import error when importing from .so file?

2020-07-30 Thread Christian Gollwitzer
ntent e.g. as a JSON file to read it in under Python 3. Christian -- https://mail.python.org/mailman/listinfo/python-list

How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to work with and more readable. I don't feel like it is easier to use b

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
On Thursday, August 6, 2020 at 10:52:00 AM UTC-5, Chris Angelico wrote: > The point of learning a > language isn't that you can take a piece of pre-existing code and > figure out what it'll do, step by step; the point is to be able to > encode your intentions in that language, and to read the code

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
> Trying to maintain that recursive list of unclosed lists in your > brain is fun. It stretches the brain in interesting ways. I was > way into Lisp at one point, including writing several Lisp > interpreters (that simple structure makes Lisp very easy to > implement). But I never found Lisp code v

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-06 Thread Christian Seberino
Some problems are well suited to recursion but perhaps //most// problems are better suited to iteration? Maybe the spread is 10% vs 90%? Therefore in general more often the Python way seems simpler than Lisp? -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> If "the Python way" seems simpler to you than "the Lisp way," > or iteration seems simpler to you than recursion, then so be it. Other > languages and other programmers are different. I think this is so true. I've had similar conversations with Lisp fans and it has confused me at times why the

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> ChrisA You're definitely an expert programmer. -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> 1. Python mostly separates computation of values (expressions) from flow > control and name binding (statements). When the latter are mixed with > the former, most people restrict the mixing to a line or two. This is an interesting observation. I've heard people say the fact that Python ha

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Gollwitzer
Am 06.08.20 um 17:13 schrieb Christian Seberino: Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to work with and more

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
Your iterative fib(x) code and comment was quite nice. -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
hunt down a > library. Therefore, solve the task "download the gimp installer from > github via https" requires 2,3 lines in Python and installing a > (possibly complex) library for the same task in Lisp or C. > > Christian I like this post so much I printed it. I

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> In Lisp, your hammer is the list. > In, say, Java, your tool is classes and inheritance. And yet if Lisp or Java programmers were here they would say their languages //are// multi-paradigm too. For example, Lisp has the Common Lisp Object System (CLOS) and Java has the Vector class and so on

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
>> Readability of programming languages was measured >> using an objective method, and Python was one of >> the most readable. Do you have a source for this? -- https://mail.python.org/mailman/listinfo/python-list

Re: Video file to subtitles file

2020-08-29 Thread Christian Gollwitzer
defer to the experts if there are any usable speech recognitino engines for this task. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Video file to subtitles file

2020-08-30 Thread Christian Gollwitzer
s thing 2) They have an enormous corpus of training data. Many videos already have user-provided subtitles. They can feed all of this into the training. I'm waiting to be disproven on this point ;) Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Video file to subtitles file

2020-08-30 Thread Christian Gollwitzer
Am 30.08.20 um 21:43 schrieb MRAB: On 2020-08-30 18:10, Christian Gollwitzer wrote: Well, with enough effort it is possible to build a system that is more useful than "entertaining". Google did that, English youtube videos can be annotated with subtitles from speech recognition. F

Re: Use of a variable in parent loop

2020-09-27 Thread Christian Gollwitzer
ost recent call last) in () > 1 a NameError: name 'a' is not defined So the "def f()" obviously introduces local scope, but control structures like if and while do not. Christian [*] In Python it's called "name binding", but it mostly works like v

Re: Use of a variable in parent loop

2020-09-28 Thread Christian Gollwitzer
g and it works fine. #include int main(int argc, char * argv[]) { if(1 == 1) ; No. You put ";", that's not nothing. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Interference tkinter and plot from matplotlib

2020-09-30 Thread Christian Gollwitzer
If you want a simple solution instead of full-blown GUI programming, use IPython https://ipython.readthedocs.io/en/stable/config/eventloops.html or jupyter notebooks. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: ValueError: arrays must all be same length

2020-10-04 Thread Christian Gollwitzer
dataframe to look like? dataframes are 2D tables, JSON is a tree. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Covariance matrix syntax

2020-10-12 Thread Christian Gollwitzer
function signature, there is a link [source]. Click there and it takes you to the implementation. Apparently it is done in straightforward Python. Christian PS: Snipped a lot of unrelated citation at the bottom On Tue, Oct 13, 2020, 10:14 Bruno P. Kinoshita wrote: [...] I think the

Re: Covariance matrix syntax

2020-10-18 Thread Christian Gollwitzer
the source code of the function. Best regards, Christian Thanks Meghna On Tue, Oct 13, 2020 at 11:46 AM Christian Gollwitzer wrote: Am 13.10.20 um 06:52 schrieb Meghna Karkera: Could you let me know what is the back end calculation of this covariance matrix syntax np.cov You can

Re: GUI (tkinter) popularity and job prospects for

2020-10-23 Thread Christian Gollwitzer
with a native Python for Android. https://www.androwish.org/home/home Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange terminal behavior after quitting Tkinter application

2020-11-03 Thread Christian Gollwitzer
the terminal and then close the terminal (which sends SIGHUP to the program). In this case the program might later on throw I/O errors, when printing to stdout. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Why can't numpy array be restored to saved value?

2020-11-26 Thread Christian Gollwitzer
array. This is an optimization to avoid copying. If you want a copy, do svary = npary.copy() Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: how to plot the FFT of a list of values

2020-12-05 Thread Christian Gollwitzer
numpy as np fx = fft(x) pylab.semilogy(np.abs(fx)) pylab.show() Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: linear algebric equations

2020-12-08 Thread Christian Gollwitzer
) time python3 430.py real0m0.318s user0m0.292s sys 0m0.046s If it takes longer than 1s, there is something wrong with your system. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Function returns old value

2020-12-18 Thread Christian Gollwitzer
by itself. It also has other useful features like menus and popup-dialogs for searching etc. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Debian testing and virtual environment error message

2020-12-27 Thread Christian Heimes
object-oriented language (pyvenv binary, > version 3.9) Don't worry, you are not the first person that ran into this issue. Debian's packaging of Python has caused multiple issues. I have reported some issues to downstream Debian/Ubuntu. You can find a list of all know

Re: I'm finally disentangled from Python 2, thank you everyone

2020-12-30 Thread Christian Gollwitzer
'dist' environment) to the target where you want to run it Try and run it on the target Iteratively work through the errors it throws up when you run it, in my case these were:- Missing .so system library files, copy them from the build system to somewhere they will be found on the target. You could put them in a 'private to the package' directory and set LD_LIBRARY_PATH or do as I did and put them in a standard library location (and run ldconfig after adding each). I've used pyinstaller in the past, and it seems to do a better job with that. It usually copies all the sytem libraries, too, but would fail with /usr/libexec/okimfputl & friends Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Class and tkinter problem

2021-01-06 Thread Christian Gollwitzer
import tkinter @staticmethod ^^it works if you remove the staticmethod here def cmd(): print("Test") Maybe there is a bug in tkinter, that it doesn't work with static methods? Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: creating/attaching menubar to top level window

2021-01-08 Thread Christian Gollwitzer
dd_cascade(menu=self.menu_file, label='File') and then it works, Why am I getting an invalid syntax error here? Because the dot would indicate the access of an attribute. but no name follows. What it does here, instead, is indexing - the correct line is similar to setting a d

Re: dayofyear is not great when going into a new year

2021-01-08 Thread Christian Gollwitzer
us, because then the weekend is split into the first and last day of the week (?) - even if, historically, the week was the time from Sunday to Sunday. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Alternatives to Stackless Python?

2005-09-28 Thread Christian Tismer
down in a set of nested calls they might be? And that NanoThreads are > simply generators, which means you can switch contexts only at the top > level, with a yield statement? > > I don't know what the OP wants, but I could imagine that would be a > pretty fundamental differe

Re: Alternatives to Stackless Python?

2005-09-28 Thread Christian Tismer
this as an entry point for people to try these ideas. The switching speed is several times slower by principle. ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9A

Re: Comparing lists

2005-10-10 Thread Christian Stapfer
B-A, A|B, A & B and A ^ B in one single pass seems to me very likely to be much faster for large lists. Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing lists

2005-10-10 Thread Christian Stapfer
"George Sakkis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Christian Stapfer" <[EMAIL PROTECTED]> wrote: > >> <[EMAIL PROTECTED]> wrote: >> > try to use set. >> >> Sorting the two lists and then extract

Re: Comparing lists

2005-10-10 Thread Christian Stapfer
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: >> "George Sakkis" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>"Christian Stapfer" <[EMAIL

Re: Comparing lists

2005-10-11 Thread Christian Stapfer
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: >> "Steve Holden" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>Christian Stapfer wrote: >>> &

Re: cgi python

2005-10-13 Thread Christian Hausknecht
n help me? There is no Parameter 'year' in the Format-String sent by the Webserver! You can test it like this: if(query.has_key("yaer")): xyz = query["year"].value If you want to get a Parameter called 'year', you must call the cgi-Script like this: http://host/path-to-cgi-dir/script.py?year=2005 Another method is, to use a form in the calling html-Page and put a hidden value into it. Ciao, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-13 Thread Christian Stapfer
so I'll have > to do this myself in the next few days... > > 0. Make a shortcut to cmd.exe, stick it somewhere get-at-able, > eg. quick launch toolbar 0.0. ... and add an item to your SendTo folder that allows you to have Windows Explorer open a terminal window with its cu

How to delete yourself????

2005-10-14 Thread christian . siegl
Hello, I got a problem deleting objects, which are placed in a hirarchy Asume we have the following code: class parent: MyChilds = [] # this list is filled with childs def AddChild(self, child): # add childs here,

Re: How to delete yourself????

2005-10-14 Thread christian . siegl
well, of course these classes are dummies. in my application they have of course more functionality they shall only describe the problem here one certain event which could appear is, that the child wants to delete itself by calling self.deleteMe() somewhere in one of the member functio

Re: Comparing lists

2005-10-14 Thread Christian Stapfer
marketing-type characterizations like this one... Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing lists

2005-10-15 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 15 Oct 2005 06:31:53 +0200, Christian Stapfer wrote: > >> "jon" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> >>>

Re: Comparing lists

2005-10-15 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 15 Oct 2005 18:17:36 +0200, Christian Stapfer wrote: > >>>> I'd prefer a (however) rough characterization >>>> of computational complexity in terms of B

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Ron Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: > >> This discussion begins to sound like the recurring >> arguments one hears between theoretical and >> experimental physicists. Experimentalists tend >&

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Christian Stapfer
"Ron Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: > >> This discussion begins to sound like the recurring >> arguments one hears between theoretical and >> experimental physicists. Experimentalists tend >&

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: > >> As to the value of complexity theory for creativity >> in programming (even though you seem to believe that >> a theoretical bent of mind can only s

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Ron Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer wrote: >> "Ron Adam" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>Christian Stapfer wrote: >>> >>>

Re: Comparing lists - somewhat OT, but still ...

2005-10-16 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 16 Oct 2005 15:16:39 +0200, Christian Stapfer wrote: > >> Come to think of an experience that I shared >> with a student who was one of those highly >> creative exp

Re: Comparing lists

2005-10-16 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 16 Oct 2005 19:42:11 +0200, Christian Stapfer wrote: > >> Pauli's prediction of >> the existence of the neutrino is another. It took >> experimentalists a gre

Re: Comparing lists

2005-10-17 Thread Christian Stapfer
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer <[EMAIL PROTECTED]> wrote: > >> This is why we would like to have a way of (roughly) >> estimating the reasonableness of the outlines of a >> program

Re: How to delete yourself????

2005-10-17 Thread christian . siegl
Well, this might be the best way, but my special case is programming a GUI. And a (child) window receives a close event and wants to destroy itself. The main window (parent) will never notice that (or its lots of code and not very nice). So that is the case and there is no way that the parent d

Re: Comparing lists

2005-10-17 Thread Christian Stapfer
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Christian Stapfer <[EMAIL PROTECTED]> wrote: > >> "Alex Martelli" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > Christian Stapfer &l

Re: Floating numbers and str

2005-11-09 Thread Christian Stapfer
imiting that to 4 sign. digits. I know that if you use the > print statement, you can do something like %.4d, but how can I do this > with converting the number to a string? Thanks! from scipy import round print round(0.13241414515,4) Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

Delays getting data on sys.stdin.readline() ?

2005-11-19 Thread Christian Convey
This delay prevents my program from being responsive in the way it must be. Has anyone else seen this effect? If so, is there a reasonable workaround? Thanks very much, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Delays getting data on sys.stdin.readline() ?

2005-11-20 Thread Christian Convey
On 11/19/05, Mike Meyer <[EMAIL PROTECTED]> wrote: > Christian Convey <[EMAIL PROTECTED]> writes: > > I've got a program that (ideally) perpetually monitors sys.stdin for > > lines of text. As soon as a line comes in, my program takes some > > action. > >

Re: pickle - recursion - stack size limit - MS windows

2005-12-09 Thread Christian Tismer
... If you can live with Python 2.3 at the moment (2.4.2 support is expected after PyCon 2006 the latest), you can just use Stackless Python. It is not limited by stack size and also includes a version of cPickle that is unlimited. cheers -- chris -- Christian Tismer :^) <mailt

Re Wide Unicode build for Windows available somewhere?

2005-01-12 Thread Christian Wittern
> Wide unicode is currently not supported on Windows. A number of > internal APIs (in particular for the registry, and for the "mbcs" > codec) assume that sizeof(Py_UNICODE) is 2. Contributions are > welcome. >Even with that fixed, Pythonwin would still need a major rework > to support wide Unicod

Einrichtung von de.comp.lang.python - Deine Stimme zählt!

2005-01-17 Thread Christian Helmbold
d Zustimmung zu der Einrichtung geäußert. Proponent - ----- Christian Helmbold <[EMAIL PROTECTED]> Abstimmungsmodalitäten - -- Wahlleiter: Thomas Hochstein <[EMAIL PROTECTED]> Abstimmadresse: [EMAIL PROTECTED] Abstimmungsende: Mit Ablauf des 13. Febru

Pointer: CfV de.comp.lang.python

2005-01-24 Thread Christian Helmbold
hi I ask german speaking python programmers to contest the election to establish the german python newsgroup de.comp.lang.python. You can find the ballot in de.admin.news.annouce <[EMAIL PROTECTED]> or via Google http://tinyurl.com/5g5gf. Thank You! Christian -- http://mail.python.org/m

inherit without calling parent class constructor?

2005-01-26 Thread Christian Dieterich
any ideas how to inherit the data attributes and the methods of a class without calling it's constructor over and over again? Thank, Christian Here's the "proper" example: class B: def __init__(self, length): size = self.method(length) self.size = size def

Re: inherit without calling parent class constructor?

2005-01-26 Thread Christian Dieterich
in your solution? The size attribute only needs to be computed once and stays constant after that. The lazy property recipe of Scott David Daniels looks promising. I'll try that, when I've installed Python 2.4. However, I need my package to work on machines where there is Python 2.2 and 2.3 only. Thanks for more ideas, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: inherit without calling parent class constructor?

2005-01-26 Thread Christian Dieterich
h for your help, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: inherit without calling parent class constructor?

2005-01-27 Thread Christian Dieterich
try with the descriptors first. Thanks for all the help, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: inherit without calling parent class constructor?

2005-01-27 Thread Christian Dieterich
ostly wanted to point out that there are other ways to use OO than inheritance...) I appreciate your input anyway. Thinking of how I could use containers it became clear, that I'm going to use them for something else, where I want something to be calculated upon request only. Christian -- h

Re: inherit without calling parent class constructor?

2005-01-27 Thread Christian Dieterich
this particular case, but maybe in another case... :) Yeah, maybe not. But I'll remember it as a useful recipe. Cheers, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-01 Thread Christian Dieterich
the loop was to a more I believe those using Numeric/Numarray might have heard of algebra and in-place operations. So, one could even argue that it's up to the user to find an efficient way to avoid rebinding of y. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding user's home dir

2005-02-02 Thread Christian Dieterich
returns on different operating systems because I'm developing a multiplatform software. It works with Python 2.2 and Python 2.3 on Mac OS 10.2 and Debian Linux. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-02 Thread Christian Dieterich
under /sw. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Christian Dieterich
On Déardaoin, Feabh 3, 2005, at 01:52 America/Chicago, Robert Kern wrote: Christian Dieterich wrote: On Dé Céadaoin, Feabh 2, 2005, at 17:48 America/Chicago, [EMAIL PROTECTED] wrote: Hi there I started a very long and roundabout process of attempting to install python 2.3.4 along side my apple

Re: SysV IPC message queues

2005-02-03 Thread Christian Dieterich
ython. Swig is also (rudimentary) supported by distutils, so you don't even need to deal with the generation of the library. Christian Example: > cat src/SomeModule.i %module SomeModuleLib %{ #include "SomeModule.h" %} %include src/SomeModule.c > swig -python src/SomeModule.i > gcc

Re: Pickling and inheritance are making me hurt

2005-02-04 Thread Christian Dieterich
nit__() __init__() __del__() Maybe this interferes with pickling your first instance? Hope this helps debugging, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Help! Python either hangs or core dumps when calling C malloc

2005-09-08 Thread Christian Stapfer
ok out > the tracing, the core dump came back. "sigh" Check your program for _uninitialized_variables_. (Just a guess: but what other side-effect than changing the values of uninitialized variables - and the program's timing, of course - might the stepping through with a debu

Re: Removing duplicates from a list

2005-09-14 Thread Christian Stapfer
er than O(n*log(n)) [depending on the implementation], then you are well advised to sort the list first (n*log(n)) and then throw out the duplicate keys with a single walk over the list. In this case you know at least what to expect for large n... Regards, Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: reading files with error

2005-09-17 Thread Christian Stapfer
%% %6d:%02d %6.1fMB/s\r" >>% (i, f, i-f, i * 100. / total, rm, rs, spd)) >>sys.stderr.write("\n") >> >> > Sorry but what are SEEK_END and SEEK_SET? The Python 2.3 documentation seems to specify the *numeric* values of these constants only. But since Python's file objects are "implemented using C's stdio package", you can read http://www.opengroup.org/onlinepubs/009695399/functions/lseek.html Regards, Christian Stapfer -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-libnjb on macosx

2005-02-10 Thread Christian Dieterich
rrect linker arguments for you. I (distutils) usually include -bundle -flat_namespace -undefined suppress to build .so files. Maybe this helps in your case too. But the setup.py is definitively the safer way. Christian -- http://mail.python.org/mailman/listinfo/python-list

Ann: PyPy Sprint before PYCON 2005 in Washington

2005-02-14 Thread Christian Tismer
if applicable. Registered Participants --- all days: Jacob Hallén Armin Rigo Holger Krekel Samuele Pedroni Anders Chrigström Bea Düring Christian Tismer Richard Emslie -- Christian Tismer :^) <mailto:[EMAIL

[German] Deutsche Python Newsgroup ist eingerichtet

2005-03-09 Thread Christian Helmbold
(This posting will be interesting for german speaking folks only.) Hallo, die deutsche Pyhton-Newsgroup de.comp.lang.python wurde endlich eingerichtet. Vielen Dank an alle, die fuer die Einrichtung gestimmt haben! Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: character encoding conversion

2004-12-12 Thread Christian Ergh
Martin v. Löwis wrote: Dylan wrote: Things I have tried include encode()/decode() This should work. If you somehow manage to guess the encoding, e.g. guess it as cp1252, then htmlstring.decode("cp1252").encode("us-ascii", "xmlcharrefreplace") will give you a file that contains only ASCII charact

Re: character encoding conversion

2004-12-13 Thread Christian Ergh
Martin v. Löwis wrote: Dylan wrote: Things I have tried include encode()/decode() This should work. If you somehow manage to guess the encoding, e.g. guess it as cp1252, then htmlstring.decode("cp1252").encode("us-ascii", "xmlcharrefreplace") will give you a file that contains only ASCII charact

Re: character encoding conversion

2004-12-13 Thread Christian Ergh
Peter Otten wrote: Steven Bethard wrote: Christian Ergh wrote: flag = true for char in data: if 127 < ord(char) < 128: flag = false if flag: try: data = data.encode('latin-1') except: pass A little OT, but (assuming I got your indentation right[1]) t

Re: character encoding conversion

2004-12-13 Thread Christian Ergh
Once more, indention should be correct now, and the 128 is gone too. So, something like this? Chris import urllib2 url = 'www.someurl.com' f = urllib2.urlopen(url) data = f.read() # if it is not in the pagecode, how do i get the encoding of the page? pageencoding = '???' xmlencoding = 'whatever

Re: character encoding conversion

2004-12-13 Thread Christian Ergh
- snip - def get_encoded(st, encodings): "Returns an encoding that doesn't fail" for encoding in encodings: try: st_encoded = st.decode(encoding) return st_encoded, encoding except UnicodeError: pass -snip- This works fine, but after this

Re: character encoding conversion

2004-12-13 Thread Christian Ergh
Dylan wrote: Here's what I'm trying to do: - scrape some html content from various sources The issue I'm running to: - some of the sources have incorrectly encoded characters... for example, cp1252 curly quotes that were likely the result of the author copying and pasting content from Word Finally:

Re: character encoding conversion

2004-12-13 Thread Christian Ergh
Forgot a part... You need the encoding list: encodings = [ 'utf-8', 'latin-1', 'ascii', 'cp1252', ] Christian Ergh wrote: Dylan wrote: Here's what I'm trying to do: - scrape some html content from various sources The issue I&#x

Re: Suggestion for "syntax error": ++i, --i

2004-12-13 Thread Christian Ergh
Hmm, i never liked the i++ syntax, because there is a value asignment behind it and it does not show - except the case you are already used to it. >>> i = 1 >>> i +=1 >>> i 2 I like this one better, because you see the assignment at once, it is easy to read and inuitive usability is given - in m

Re: A beginner's problem...

2004-12-16 Thread Christian Ergh
DogWalker wrote: "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> said: In <[EMAIL PROTECTED]>, Amir Dekel wrote: When I import a module I have wrote, and then I find bugs, it seems that I can't import it again after a fix it. It always shows the same problem. I try del module but it doesn't work

Re: Suggestion for "syntax error": ++i, --i

2004-12-13 Thread Christian Ergh
Ah, ok, i misunderstood you. Well, to mark it as a syntax error sounds good, and at the Moment I would not know a case where this conflicts with a implementation. Chris Petr Prikryl wrote: Hi Christian, The suggestion is to mark PREFIX version ++i as syntax error. It is not related to the

Re: convert \uXXXX to native character set?

2004-12-21 Thread Christian Ergh
Miki Tebeka wrote: Hello Joe, Is there any library to convert HTML page with \u encoded text to native character set, e.g. BIG5. Try: help("".decode) I use HTMLFilter.py, you can download it at http://www.shearersoftware.com/software/developers/htmlfilter/ Cheers Chris -- http://mail.pyth

Re: Read word tables

2004-12-25 Thread Christian Tismer
use an XML parser to easily get at any structure. It might be simpler to use than using all the COM objects directly. (Well, the structures aren't that easy, of course). ciao - chris -- Christian Tismer :^) <mailto:[EMAIL PROTECTED]> tismerysoft GmbH : H

Re: Importing by file name

2013-11-24 Thread Christian Gollwitzer
er) # load module module = imp.load_source(namespace,os.path.join(folder,'pluginmain.py')) Modifying sys.path is only necessary because the file could further import modules from the same path. Christian -- https://mail.python.org/mailman/listinfo/python-list

Re: Access database - GUI - Python - I need architectural advice

2013-11-28 Thread Christian Gollwitzer
grid for entry, more like a spreadsheet and with less canned functionality. http://tkinter.unpythonic.net/wiki/TkTableWrapper Christian -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >