Re: Screen placement based on screen resolution

2006-04-08 Thread Fredrik Lundh
Pat [EMAIL PROTECTED] wrote: I am trying to place a dialog in the center of the screen based on a users screen resolution. I can get the width and height of the screen, but I can't seem to use the following: root.geometry('WxH+X+Y') It appears the values for X and Y need to be integers

Re: Screen placement based on screen resolution

2006-04-08 Thread Fredrik Lundh
Lonnie Princehouse wrote: Tkinter takes strings as its arguments; it's TCL's legacy. geometry strings are an X windows thing... You can use string formatting for this: x = width/2-40 y = height/2-30 root.geometry('%ldx%ld+%ld+%ld' % (width, height, x, y)) note that +%ld (why bother with

Re: minidom + wxPython woes

2006-04-08 Thread Frank Millman
Lonnie Princehouse wrote: Hi all, I'm getting a seg fault when I try to use minidom to parse some XML inside a wxPython app. I was wondering if someone else could run the simple code below on Linux and, if it doesn't crash horribly, post which versions of (Python, wxPython) they are

Re: unicode wrap unicode object?

2006-04-08 Thread Fredrik Lundh
ygao [EMAIL PROTECTED] wrote: import sys sys.setdefaultencoding(utf-8) hmm. what kind of bootleg python is that ? import sys sys.setdefaultencoding(utf-8) Traceback (most recent call last): File stdin, line 1, in ? AttributeError: 'module' object has no attribute 'setdefaultencoding'

Re: very strange problem in 2.4

2006-04-08 Thread Fredrik Lundh
John Zenger wrote: Your list probably contains several references to the same object, instead of several different objects. This happens often when you use a technique like: list = [ object ] * 100 ..because although this does make copies when object is an integer, it just makes

Re: how you know you're a programming nerd

2006-04-08 Thread Ron Adam
John Salerno wrote: Ron Adam wrote: When you are working on your programming project on Friday night instead of going out. Ok, you win. :) Oh wait, it's Friday night and I'm typing this message...dang it! Yep, Hah Hah... No wait, I'm here too. ;-) --

Re: output formatting for user-defined types

2006-04-08 Thread Steven D'Aprano
On Fri, 07 Apr 2006 21:18:23 -0700, Russ wrote: dist = 4 * ft print out, dist/ft 4 Note, however, that this requires the user to explicity ask for the conversion. How is this any more explicit and any less safe than: dist = 4 * ft print float(dist) Because the former specifies the

Re: The World's Most Maintainable Programming Language

2006-04-08 Thread Christos Georgiou
On Fri, 07 Apr 2006 11:11:14 +0200, rumours say that Azolex [EMAIL PROTECTED] might have written: At-least Pythetic isn't a word (yet). :))) now that's quite pythetic ! Well, pythetic could become a synonym to un-pythonic. -- TZOTZIOY, I speak England very best. Dear Paul, please stop

Re: minidom + wxPython woes

2006-04-08 Thread Fredrik Lundh
Frank Millman wrote: This sounds similar to a problem I reported a few months ago. This is the link. http://groups.google.com/group/comp.lang.python/browse_frm/thread/6fc1097d26083e43/5fbdf493f3c38942?q=rnum=1hl=en#5fbdf493f3c38942 In my case, it turned out to be a bug in the pyexpat module

Re: calculating system clock resolution

2006-04-08 Thread Steven D'Aprano
On Fri, 07 Apr 2006 16:39:40 -0700, jUrner wrote: Maybe it was not too clear what I was trying to point out. I have to calculate the time time.time() requires to return the next tick of the clock. Should be about 0.01ms but this may differ from os to os. I suspect that Python isn't quite

Re: GUI Treeview

2006-04-08 Thread Christos Georgiou
On Fri, 7 Apr 2006 22:52:06 +0200, rumours say that Arne [EMAIL PROTECTED] might have written: Peter Hansen [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Arne wrote: Hello ! I am looking for a widget with the following properties: - showing the tree file structure/

Re: best way to install python modules on linux

2006-04-08 Thread Fabian Braennstroem
Hi to all, thanks for your ideas! I just figured out a different way using archlinux 'pacman' (package management tool like apt). As a former archlinux user I am more used to adjust those PKDBUILDs (kind of ebuilds under archlinux) than adjusting debian packages. The downside is that apt does not

Re: calculating system clock resolution

2006-04-08 Thread Steven D'Aprano
Ah, drat -- hit the wrong key and sent the last post before I had finished writing it... the following is what I *intended* to send. On Fri, 07 Apr 2006 16:39:40 -0700, jUrner wrote: Maybe it was not too clear what I was trying to point out. I have to calculate the time time.time() requires

Re: Appending Elements in Element Tree

2006-04-08 Thread Ron Adam
Ron Adam wrote: In my program I have a lot of statements that append elements, but sometimes I don't want to append the element so it requres an if statement to check it, and that requires assigning the returned element from a function to a name or calling the funtion twice. e =

Re: How to change the docs - a case study

2006-04-08 Thread Fredrik Lundh
Kent Johnson wrote: Here is an example. This morning I noticed a minor discrepancy in the docs for the 'rot13' encoding. I posted a bug to SourceForge at 10:05 GMT. At 10:59 someone commented that maybe the code was broken rather than the docs. At 11:18 another poster responded that the

Re: unicode wrap unicode object?

2006-04-08 Thread ygao
sorry,my poor english. I got a solution from others. I must use utf-8 for chinese. import sys reload(sys) sys.setdefaultencoding(utf-8) s='\xe9\xab\x98' #this uff-8 string ss=U'\xe9\xab\x98' ss1=ss.encode('unicode_escape').decode('string_escape') s1=s.decode('unicode_escape') s1==ss

Re: calculating system clock resolution

2006-04-08 Thread Ron Adam
Steven D'Aprano wrote: On Fri, 07 Apr 2006 16:39:40 -0700, jUrner wrote: Maybe it was not too clear what I was trying to point out. I have to calculate the time time.time() requires to return the next tick of the clock. Should be about 0.01ms but this may differ from os to os. I suspect

Re: output formatting for user-defined types

2006-04-08 Thread Russ
So what you are saying is, if I enter a unit in feet, you automatically change that unit to some base unit (say, metres if you use SI) behind my back. So, assuming SI units as the base, if I say: print 2*ft + 1*ft you're going to give me an answer of 0.9144 metres, instead of the expected 3ft.

Re: unicode wrap unicode object?

2006-04-08 Thread ygao
sorry,my poor english. I got a solution from others. I must use utf-8 for chinese. import sys reload(sys) sys.setdefaultencoding(utf-8) s='\xe9\xab\x98' #this uff-8 string ss=U'\xe9\xab\x98' ss1=ss.encode('unicode_escape').decode('string_escape') s1=s.decode('unicode_escape') s1==ss True

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread malv
Looks pretty good, except for your difficult to read examples. Don't use black backrounds with green characters. A plain white background with black text would be a major improvement. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode wrap unicode object?

2006-04-08 Thread Fredrik Lundh
ygao wrpte_ I must use utf-8 for chinese. yeah, but you shouldn't store it in a *Unicode* string. Unicode strings are designed to hold things that you've already decoded (that is, your chinese text), not the raw UTF-8 bytes. if you store the UTF-8 in an ordinary 8-bit string instead, you can

Re: unicode wrap unicode object?

2006-04-08 Thread ygao
thanks for your advice. -- http://mail.python.org/mailman/listinfo/python-list

How can I reduce the number of queries to my PostgreSQL database?

2006-04-08 Thread SR
As a starter project for learning Python/PostgreSQL, I am building a Books database that stores information on the books on my bookshelf. Say I have three tables. Table books contains rows for book_id, title, subtitle, ISBN. Table authors contains rows for author_id, author surname, author

Re: unicode wrap unicode object?

2006-04-08 Thread Martin v. Löwis
ygao wrote: I must use utf-8 for chinese. Sure. But please don't do that: import sys reload(sys) sys.setdefaultencoding(utf-8) As Fredrik says, you should really avoid changing the default encoding. s='\xe9\xab\x98' #this uff-8 string ss=U'\xe9\xab\x98'

Re: freeze.py builds, but binary doesn't even run locally (shared GTK problem?)

2006-04-08 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: from _gtk import * ImportError: No module named _gtk If you look at the freeze output, you'll notice that _gtk is not linked into your application: It is a shared library (.so), so it can't be frozen. Instead, the resulting binary will look for _gtk.so on

Re: How can I reduce the number of queries to my PostgreSQL database?

2006-04-08 Thread Frank Millman
SR wrote: As a starter project for learning Python/PostgreSQL, I am building a Books database that stores information on the books on my bookshelf. Say I have three tables. Table books contains rows for book_id, title, subtitle, ISBN. Table authors contains rows for author_id, author

Documentation for Tkinter/Tix

2006-04-08 Thread Arne
Hello! Where can I find a documentation for Tkinter/Tix. I already have the standard documentation ditributed with Python. Especially I am looking for documentation about the options for some tix widgets like Dirlist (How can I link it to a certain directory, etc.) Thanks! Arne --

ftp putting information in a variable

2006-04-08 Thread Arne
Hello!I am looking for a way to put ftp returns in a variable.My OS is XP and I want to get the owner of a file. So I have to connect to ftp. But I am stacked with how I can receive this information and put it in a variable.Thanks! ArneHere is a intend of doing thisfrom ftplib import FTP ftp =

Re: DO NOT USE JAVA BECAUSE IT IS NOT OPEN SOURCE

2006-04-08 Thread geletine
Nobody has mentioned that c was proprietary until richard stallman wrote gcc in 1987, c is a great for system programming. Just because something is originally proprietary does not mean its technically rubbish, there are plenty of merits in java escially for new programmers or anyone who wants to

scipy/numpy inverse cumulative normal

2006-04-08 Thread bartsimpson8882002
I was wondering if scipy/numpy has the inverse cumulative normal function, ie the function f in this expression f(scipy.stats.norm.cdf(1.2)) = 1.2 or more generally, a function f which fits the criteria f(scipy.stats.norm.cdf(x)) = x There is a distribution called invnorm, but I am not sure

Re: calculating system clock resolution

2006-04-08 Thread jUrner
def calc_time_res(): now = time.time start = now() x = start while start == x: x = now() print x, start # -- print x - start print calc_time_res() 1.50203704834e-05 Something is going wrong here. If you look at the function ,time.time() returns time in

Re: calculating system clock resolution

2006-04-08 Thread Steven D'Aprano
On Sat, 08 Apr 2006 04:16:20 -0700, jUrner wrote: def calc_time_res(): now = time.time start = now() x = start while start == x: x = now() print x, start # -- print x - start print calc_time_res() 1.50203704834e-05 Something is going wrong here. If

Compleated Begginers Guide. Now What?

2006-04-08 Thread Jay
I have compleated the beginers guide to python http://www.freenetpages.co.uk/hp/alan.gauld/. then i found the Toolkit Tkinter and started on that. its graight and av made lots of apps to help me with litle things but i have a big problem. the CLASS method. when i seperate things up into classes i

Re: calculating system clock resolution

2006-04-08 Thread Peter Hansen
Steven D'Aprano wrote: This brings me to an even simpler method of getting the resolution of time.time(), without the overhead of a while loop: abs(time.time() - time.time()) 1.0013580322265625e-05 which is approximately 0.01ms, just as you expected. This doesn't necessarily work, at

Re: calculating system clock resolution

2006-04-08 Thread Tim Peters
[jUrner] def calc_time_res(): now = time.time start = now() x = start while start == x: x = now() print x, start # -- print x - start print calc_time_res() 1.50203704834e-05 Something is going wrong here. If you look at the function ,time.time()

download for official Python logo artwork?

2006-04-08 Thread has
Anyone know where I can find source artwork, preferably vector-based, for python.org's new 'ying-yang' snake icon? I think it's hiding. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Characters contain themselves?

2006-04-08 Thread Kent Johnson
WENDUM Denis 47.76.11 (agent) wrote: While testing recursive algoritms dealing with generic lists I stumbled on infinite loops which were triggered by the fact that (at least for my version of Pyton) characters contain themselves.See session: Strings are sequences and this is a problem for

Re: minidom + wxPython woes

2006-04-08 Thread Frank Millman
Fredrik Lundh wrote: Frank Millman wrote: This sounds similar to a problem I reported a few months ago. This is the link. http://groups.google.com/group/comp.lang.python/browse_frm/thread/6fc1097d26083e43/5fbdf493f3c38942?q=rnum=1hl=en#5fbdf493f3c38942 In my case, it turned out to be

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Bruno Desthuilliers
malv a écrit : Looks pretty good, except for your difficult to read examples. Don't use black backrounds with green characters. A plain white background with black text would be a major improvement. May I suggest a system like Trac-Wiki, that knows how to display Python code with

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread James
On the calculator page you describe the difference between 3.0 / 2 and 3 / 2, but an absolute beginner probably wouldn't know about the difference between integers and floats, or even what the two terms meant. If you don't know much about computers then the fact that they are separate types would

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Bruno Desthuilliers
Clodoaldo Pinto a écrit : bill pursell wrote: (snip) 2) In the section on installing, you begin with: Python is an interpreted, interactive, object-oriented programming language.. The complete novice sees those words and expects them to be explained, but there is no definition given. I would

Re: very strange problem in 2.4

2006-04-08 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : The Problem (very basic, but strange): I have a list holding a population of objects, each object has 5 vars and appropriate funtions to get or modify the vars. Which are probably not necessary: http://dirtsimple.org/2004/12/python-is-not-java.html (in short:

Re: wxPython and SuSE 10.0

2006-04-08 Thread Steve
Jorge Godoy wrote: Steve [EMAIL PROTECTED] writes: I was wondering if there is a wxPython RPM for SuSE 10.0 available. I Googled for it with no luck, but I'm hopeful that there is one out there. There are RPMs within SuSE's DVD / CDs, IIRC. Anyway, you can get it with

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Neal Becker
Maybe find a spell checker? -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I reduce the number of queries to my PostgreSQL database?

2006-04-08 Thread Martin Christensen
SR == [EMAIL PROTECTED] writes: SR Scenario: I have a python script which creates web page listing SR all books in the database, and all authors for each book. My SR python script does essentially three things: SR 1. retrieve a list of all book_ids and book_titles. SR 2. for each book_id,

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Martin Christensen
Jay == Jay [EMAIL PROTECTED] writes: Jay when i seperate things up into classes i carnt get one class to Jay tell the other class somthing. it just opens another coppy of the Jay class. i am confused. I'm sorry, it's very difficult to understand what you mean. You'll have to be a lot more

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Jay
Verry true but no help at all -- http://mail.python.org/mailman/listinfo/python-list

Re: Screen placement based on screen resolution

2006-04-08 Thread Pat
Thanks a lot for you response. S Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Pat [EMAIL PROTECTED] wrote: I am trying to place a dialog in the center of the screen based on a users screen resolution. I can get the width and height of the screen, but I can't

Re: download for official Python logo artwork?

2006-04-08 Thread Brian Quinlan
has wrote: Anyone know where I can find source artwork, preferably vector-based, for python.org's new 'ying-yang' snake icon? I think it's hiding. Thanks. I don't know how office it is, but you can get the artwork here: http://tinyurl.com/n4rge Cheers, Brian --

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Jay
Verry true but no help at all -- http://mail.python.org/mailman/listinfo/python-list

Working with decimal points

2006-04-08 Thread Byte
How come: sum = 1/4 print sum returns 0? 1/4=0.25, not 0. How do I fix this? -- /usr/bin/byte -- http://mail.python.org/mailman/listinfo/python-list

Re: kinterbas and Python

2006-04-08 Thread David Rushby
[EMAIL PROTECTED] wrote: My error code is : concorrency level error use kinterbas.init(concurrency_level=?) to set the concurrency level legally... That's not the actual error message. The actual error message is: The concurrency level cannot be changed once it has been set. Use

Where python looks for path

2006-04-08 Thread Philippe Martin
Hi, I am currently packaging python and a few libraries: PyWin32, PySerial, PIL, wxPython, HTML generator, numarray for U3 distribution. Basically that means that the complete system initially in $path1\host will be moved dynamically to $path2\at execution. To take PIL as an example, I notice

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Jay
Thank you Martin Christensen and i am sorry for not explaning well. i will tack that advice -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with decimal points

2006-04-08 Thread [EMAIL PROTECTED]
Byte wrote: How come: sum = 1/4 print sum returns 0? 1/4=0.25, not 0. How do I fix this? Make sure there is at least one float in your equation. In your example Python is doing interger math for you and returing the floor. You need to give it a hint that you would like to do floating point

recognize a drive as removable media (e.g. compact flash, sd card or usb drive)

2006-04-08 Thread Mike Joyce
I am trying to write a portable script that will find removable media, such as compact flash, sd card, usb, etc. drive and then upload files from the media. I want this to be portable so that I can write and maintain one program for both Linux and Windows. Each platform uses different

Re: Working with decimal points

2006-04-08 Thread Byte
That dosnt work either: sum = 0.1+1/4 print sum Just returns 0.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with decimal points

2006-04-08 Thread Fredrik Lundh
Byte wrote: How come: sum = 1/4 print sum returns 0? because 1 and 4 are integer objects, so 1/4 is an integer division, which rounds down to the nearest integer. 1/4=0.25, not 0. How do I fix this? use floating point numbers: 1.0/4.0 = 0.25 or convert one of the numbers to a

Re: Working with decimal points

2006-04-08 Thread Peter Hansen
Byte wrote: That dosnt work either: sum = 0.1+1/4 print sum Just returns 0.1 That's because the 1/4 is executed first, and the problem mentioned still applies (i.e. you get a 0, then add it to 0.1). The best fix for you might be simply to place this line at the start (before all other

jpype and zxJDBC

2006-04-08 Thread benchline
I would love to be able to use jdbc drivers using the python db 2.0 api and cpython. Has anyone used jpype and zxJDBC (distributed with jython) together? I am trying and what I have tried does not yet work. If I figure anything out that works I will post it here. Thanks --

Re: Working with decimal points

2006-04-08 Thread Byte
Fredrik Lundh's way works: thank a million! -- http://mail.python.org/mailman/listinfo/python-list

Re: Where python looks for path

2006-04-08 Thread Philippe Martin
PS: I forgot to say that on the win32api import I get a DLL load failed Philippe Philippe Martin wrote: Hi, I am currently packaging python and a few libraries: PyWin32, PySerial, PIL, wxPython, HTML generator, numarray for U3 distribution. Basically that means that the complete system

Re: download for official Python logo artwork?

2006-04-08 Thread has
That'll do nicely. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Clodoaldo Pinto
Bruno Desthuilliers wrote: Clodoaldo Pinto a écrit : bill pursell wrote: (snip) 2) In the section on installing, you begin with: Python is an interpreted, interactive, object-oriented programming language.. The complete novice sees those words and expects them to be explained, but there

Re: Working with decimal points

2006-04-08 Thread Steven D'Aprano
On Sat, 08 Apr 2006 08:21:06 -0700, Byte wrote: How come: sum = 1/4 print sum returns 0? 1/4=0.25, not 0. How do I fix this? By default, / does integer division, not floating point. In integer division, 1/4 is 0, exactly as calculated. (How many fours go into one? Zero fours go into

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Clodoaldo Pinto
James wrote: On the calculator page you describe the difference between 3.0 / 2 and 3 / 2, but an absolute beginner probably wouldn't know about the difference between integers and floats, or even what the two terms meant. If you don't know much about computers then the fact that they are

Re: calculating system clock resolution

2006-04-08 Thread jUrner
Starts getting confusing... on linux I get print time.time() xxx.23 Is it mentioned somewhere that print truncates floats ? Thats new to me. Kinda surprising that is. print '%.30' % time.time() xxx.23456678990... I knew it must have been hiding somewhere On windows I'd expect a resolution of

Re: debug CGI with complex forms

2006-04-08 Thread R. Bernstein
Sullivan WxPyQtKinter [EMAIL PROTECTED] writes: When the form in one HTML is very complex with a lot of fields(input, button,radio,checkbox etc.), setting the environment is quite burdernsome, so I usually change the stdout and stderr of the submit processing script to a file object to see

Re: calculating system clock resolution

2006-04-08 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: Is it mentioned somewhere that print truncates floats ? 'print' prints str(time()). On the interactive prompt, you see repr(time()). float.__str__ truncates. I don't know where it's documented, but this is the reason why you see the truncation. Sybren --

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread James
Perhaps use the phrase whole number there and mention that in programming they're called integers. Having a glossary with definitions for things like integer, float etc etc. would be good if when you talked about integers it linked to the glossary. And similarly use decimals for floats? Less sure

Re: Documentation for Tkinter/Tix

2006-04-08 Thread [EMAIL PROTECTED]
wesley's core python programming (i m havin the old one) has a good chaper on Tkinter. -- http://mail.python.org/mailman/listinfo/python-list

Re: advice on this little script

2006-04-08 Thread R. Bernstein
BartlebyScrivener [EMAIL PROTECTED] writes: There are several of these writing quotes, all good in their own way, And from Hamlet: brevity is the soul of wit. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where python looks for path

2006-04-08 Thread Philippe Martin
Hi, I had to move the dlls from pywin32_system32 to where python.exe is. PS: if someone has a great desire to have another library included in the package, let me know. Regards, Philippe Philippe Martin wrote: Hi, I am currently packaging python and a few libraries: PyWin32, PySerial,

Re: Working with decimal points

2006-04-08 Thread [EMAIL PROTECTED]
Byte wrote: That dosnt work either: sum = 0.1+1/4 print sum Just returns 0.1 You get precedence right? Your equation does not evaluate from left to right. 1/4 happens first, and since there are no floats you get 0. in that equation you basically are doing this: sum = 1/4 print sum 0 sum

Re: Working with decimal points

2006-04-08 Thread Fredrik Lundh
Byte wrote: That dosnt work either: sum = 0.1+1/4 print sum Just returns 0.1 division has higher precedence than addition, so 1/4 is calculated first, and the result is then added to 0.1. and as I've already explained, 1/4 is an integer division, so the result is rounded down to the the

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread John Salerno
Clodoaldo Pinto wrote: Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java. Some of its key distinguishing features include:... I'd be careful with that definition for

Re: recognize a drive as removable media (e.g. compact flash, sd card or usb drive)

2006-04-08 Thread Larry Bates
Mike Joyce wrote: I am trying to write a portable script that will find removable media, such as compact flash, sd card, usb, etc. drive and then upload files from the media. I want this to be portable so that I can write and maintain one program for both Linux and Windows. Each platform

Do I Need This?

2006-04-08 Thread sdavies6
I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders are DLLs, Lib, libs, Scripts, and, td. I am not a programmer, so I'm wondering if I can

Re: minidom + wxPython woes

2006-04-08 Thread Paul Boddie
Frank Millman wrote: Fredrik Lundh wrote: no, it's not a bug in the pyexpat module -- the problem is that wxPython uses it's own incompatible version of the expat library, and loads it in a way that causes problems for any library that's tries to use its own statically linked version.

Re: Do I Need This?

2006-04-08 Thread Paul Boddie
sdavies6 wrote: I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders are DLLs, Lib, libs, Scripts, and, td. I am not a programmer, so I'm

Re: Do I Need This?

2006-04-08 Thread Terry Reedy
sdavies6 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have no idea how this got onto my month old HP computer; I must have downloaded something which uses it. It seems I have a folder and subfolders equaling about 29 MB, called PYTHON 22. The subfolders are DLLs, Lib, libs,

Re: best way to install python modules on linux

2006-04-08 Thread Robert Kern
Fabian Braennstroem wrote: Hi to all, thanks for your ideas! I just figured out a different way using archlinux 'pacman' (package management tool like apt). As a former archlinux user I am more used to adjust those PKDBUILDs (kind of ebuilds under archlinux) than adjusting debian packages.

How to determine if a line of python code is a continuation of the line above it

2006-04-08 Thread Sandra-24
I'm not sure how complex this is, I've been brainstorming a little, and I've come up with: If the previous line ended with a comma or a \ (before an optional comment) That's easy to cover with a regex But that doesn't cover everything, because this is legal: l = [ 1, 2, 3 ]

Re: scipy/numpy inverse cumulative normal

2006-04-08 Thread Robert Kern
[EMAIL PROTECTED] wrote: I was wondering if scipy/numpy has the inverse cumulative normal function, ie the function f in this expression f(scipy.stats.norm.cdf(1.2)) = 1.2 or more generally, a function f which fits the criteria f(scipy.stats.norm.cdf(x)) = x Look in the file where all

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Duncan Smith
James wrote: Perhaps use the phrase whole number there and mention that in programming they're called integers. Having a glossary with definitions for things like integer, float etc etc. would be good if when you talked about integers it linked to the glossary. And similarly use decimals for

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Clodoaldo Pinto
John Salerno wrote: Clodoaldo Pinto wrote: Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java. Some of its key distinguishing features include:... I'd be careful

Re: recognize a drive as removable media (e.g. compact flash, sd card or usb drive)

2006-04-08 Thread Tim Golden
Mike Joyce wrote: I am trying to write a portable script that will find removable media, such as compact flash, sd card, usb, etc. drive and then upload files from the media. I want this to be portable so that I can write and maintain one program for both Linux and Windows. Each platform uses

Insertion (sql) bug in Py2.4 pySQLite 2.2

2006-04-08 Thread DurumDara
Hi ! I have this code in my program. Before this I use APSW, but that project's connection object doesn't have close method... ... crs.execute(*'''create table files (*f_id integer not null primary key, f_name varchar(255), f_size long, f_attr integer, f_crtime varchar(20), f_mdtime

Re: How to determine if a line of python code is a continuation of the line above it

2006-04-08 Thread Dan Sommers
On 8 Apr 2006 11:24:04 -0700, Sandra-24 [EMAIL PROTECTED] wrote: I'm not sure how complex this is, I've been brainstorming a little, and I've come up with: [This meaning how to determine if a line of python code is a continuation of the line above it.] If the previous line ended with a comma

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread James
If you're serious about this being a real introduction for someone who knows nothing, then you might want to start off by explaining what a programming language is (and why there are more than one) and then what a standard library is - perhaps explain it in terms of a large set of tools you can

Re: Programming Tutorial for absolute beginners

2006-04-08 Thread Clodoaldo Pinto
Duncan Smith wrote: James wrote: Perhaps use the phrase whole number there and mention that in programming they're called integers. Having a glossary with definitions for things like integer, float etc etc. would be good if when you talked about integers it linked to the glossary. And

Receiving emails with attachments

2006-04-08 Thread tomer . ha
Hi there, I'm new to Python, but know other scripting and programming languages. I want to develop a script which will receive emails with attachments from my POP3 account, perform certain actions on it and email it back to someone else. However, I'm not familiar with any Python library which

how relevant is C today?

2006-04-08 Thread John Salerno
Because of my 'novice-ness' in programming, I had always thought that C was replaced by C++ and wasn't really used anymore today. I know that's not the case at all now, but I'm still curious how much C is used anymore in programming today, and what purpose it serves. Is it used for actual

programming puzzles?

2006-04-08 Thread John Salerno
Similar to the Python Challenge, does anyone know of any other websites or books that have programming puzzles to solve? I found a book called Puzzles for Hackers, but it seems like it might be a little advanced for me, and I've also read that it focuses too much on encryption and security

How's python's web scraping capabilities (vs LWP) ...

2006-04-08 Thread ArKane
Hello all, I've been hacking away at perl for a few months now, mainly using the LWP module, used for web scraping. Amoung its capabilities include support for HTTPS and proxies, authentication, cookies (including the ability to automatically import Internet Explorer cookies), etc. It seems to

Re: How to determine if a line of python code is a continuation of the line above it

2006-04-08 Thread Sandra-24
No it's not an academic excercise, but your right, the situation is more complex than I originally thought. I've got a minor bug in my template code, but it'd cause more trouble to fix than to leave in for the moment. Thanks for your input! -Sandra --

Re: Compleated Begginers Guide. Now What?

2006-04-08 Thread Mirco Wahab
Jay wrote: I have compleated the beginers guide to python http://www.freenetpages.co.uk/hp/alan.gauld/. then i found the Toolkit Tkinter and started on that. its graight and av made lots of apps to help me with litle things but i have a big problem. the CLASS method. Ledds viddy, my

Re: Receiving emails with attachments

2006-04-08 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: Hi there, I'm new to Python, but know other scripting and programming languages. I want to develop a script which will receive emails with attachments from my POP3 account, perform certain actions on it and email it back to someone else. However, I'm not familiar

Re: Python-list Digest, Vol 31, Issue 119

2006-04-08 Thread Jay Parlar
On Apr 8, 2006, at 1:40 PM, [EMAIL PROTECTED] wrote: Hi there, I'm new to Python, but know other scripting and programming languages. I want to develop a script which will receive emails with attachments from my POP3 account, perform certain actions on it and email it back to someone

Re: how relevant is C today?

2006-04-08 Thread Martin v. Löwis
John Salerno wrote: Because of my 'novice-ness' in programming, I had always thought that C was replaced by C++ and wasn't really used anymore today. I know that's not the case at all now, but I'm still curious how much C is used anymore in programming today, and what purpose it serves. Is it

  1   2   >