Re: OCBC connection

2007-09-28 Thread kyosohma
On Sep 28, 9:57 am, Sugrue, Sean [EMAIL PROTECTED] wrote: I'm trying to make an odbc connection to postgresql which is on a server using python. Does anyone have a code snippet to make a basic connection with a select query? Sean Sean, This appears to be what you're looking for:

Re: OCBC connection

2007-09-28 Thread kyosohma
On Sep 28, 1:07 pm, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 28, 9:57 am, Sugrue, Sean [EMAIL PROTECTED] wrote: I'm trying to make an odbc connection to postgresql which is on a server using python. Does anyone have a code snippet to make a basic connection

Re: Cross-platform time out decorator

2007-09-27 Thread kyosohma
On Sep 26, 5:21 am, Joel [EMAIL PROTECTED] wrote: I've been using this nice timing out decorator :http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307871. The problem is that since it relies on sigalarm, it doesn't work under windows. Would anyone know how to do a cross-platform

Re: Launching command on windows

2007-09-27 Thread kyosohma
On Sep 27, 8:17 am, Alexandre Badez [EMAIL PROTECTED] wrote: Hy, I'm working on windows and I try to do something like: import os APP = os.path.abspath(C:\\Program Files\\Notepad++\\notepad++.exe) FILE1 = os.path.abspath(D:\\Documents and settings\\test1.py) FILE2 =

Re: setuptools without unexpected downloads

2007-09-27 Thread kyosohma
On Sep 26, 5:52 pm, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Sep 26, 8:30 am, Steve Holden [EMAIL PROTECTED] wrote: Fredrik Lundh wrote: Paul Boddie wrote: P.S. Of course, the package maintainer problem manifests itself most prominently on Windows where you

Re: Launching command on windows

2007-09-27 Thread kyosohma
On Sep 27, 10:46 am, Alexandre Badez [EMAIL PROTECTED] wrote: On Sep 27, 4:20 pm, [EMAIL PROTECTED] wrote: I got it to work using subprocess.Popen Not sure why it doesn't work with os.system though. Mike Thanks Mike and Mauro, Mauro, your solution do not seems to work (or I made a

Re: setuptools without unexpected downloads

2007-09-26 Thread kyosohma
On Sep 26, 8:30 am, Steve Holden [EMAIL PROTECTED] wrote: Fredrik Lundh wrote: Paul Boddie wrote: P.S. Of course, the package maintainer problem manifests itself most prominently on Windows where you often see people asking for pre-built packages or installers. for the record, I'd

Re: TRying to import files from my folder not pythons lib folder

2007-09-21 Thread kyosohma
On Sep 21, 12:32 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to create my own lib of functions, but it seems like I can only import them if they are in pythons lib folder. Example I have a folder called K:\mypython Now in the interactive python shell I type Import

Re: Finding prime numbers

2007-09-20 Thread kyosohma
On Sep 19, 1:31 pm, Shawn Milochik [EMAIL PROTECTED] wrote: If you'd just search the archives, you would have found this: http://groups.google.com/group/comp.lang.python/browse_thread/thread/... Yeah, but that's no fun. ;o) Yes! Never do what you can fool others into doing for you. Mike

Re: Extracting xml from html

2007-09-19 Thread kyosohma
On Sep 19, 3:13 am, Stefan Behnel [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Does this make sense? It works pretty well, but I don't really understand everything that I'm doing. def Parser(filename): It's uncommon to give a function a capitalised name, unless it's a factory

Re: Drag image

2007-09-19 Thread kyosohma
On Sep 19, 1:06 am, ndoe [EMAIL PROTECTED] wrote: i want show image from button? and the image can be drag and rezise ? any body help me!!! i try to make it but is not sucsseful yet Please post some code so we can see what you're up to. Mike --

Re: Finding prime numbers

2007-09-19 Thread kyosohma
On Sep 19, 12:15 pm, Shawn Milochik [EMAIL PROTECTED] wrote: Okay, I caught one bug already myself: for y in range(3,(math.sqrt(x) + 1)): should be for y in range(3,(int(math.sqrt(x)) + 1)): If you'd just search the archives, you would have found this:

Re: Extracting xml from html

2007-09-18 Thread kyosohma
On Sep 18, 1:56 am, Stefan Behnel [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I am attempting to extract some XML from an HTML document that I get returned from a form based web page. For some reason, I cannot figure out how to do this. Here's a sample of the html: html body

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread kyosohma
On Sep 18, 12:23 pm, W. Watson [EMAIL PROTECTED] wrote: What would be appropriate? What are the choices? I'm pretty new to Python, but am familiar with the XWindow widget set. I think it is available under Python, but if there's a more suitable choice, that's fine. I would think Tkinter would

Re: Extracting xml from html

2007-09-18 Thread kyosohma
On Sep 17, 4:51 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 17 Sep 2007 17:31:19 -0300, [EMAIL PROTECTED] escribi?: I am attempting to extract some XML from an HTML document that I get returned from a form based web page. For some reason, I cannot figure out how to do this. I

Re: (wxPython) icon on panel

2007-09-17 Thread kyosohma
On Sep 16, 3:42 am, Jimmy [EMAIL PROTECTED] wrote: hi,all! have you used 'dictionary' of linux, the program that rests on the panel as an icon, and when you click on the icon, it will display a window and do something. So i'm wondering how to achieve this. I guess it's a dialog window, right?

Extracting xml from html

2007-09-17 Thread kyosohma
Hi, I am attempting to extract some XML from an HTML document that I get returned from a form based web page. For some reason, I cannot figure out how to do this. I thought I could use the minidom module to do it, but all I get is a screwy traceback: Traceback (most recent call last): File

Re: Extracting xml from html

2007-09-17 Thread kyosohma
On Sep 17, 4:01 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 17 Sep, 22:31, [EMAIL PROTECTED] wrote: What's the best way to get at the XML? Do I need to somehow parse it using the HTMLParser and then parse that with minidom or what? Probably easiest is to use an XML processing toolkit or

Re: (wxPython) wx.ProgressDialog - how to cancel out of?

2007-09-15 Thread kyosohma
On Sep 15, 12:57 am, Terry Carroll [EMAIL PROTECTED] wrote: I'm trying to use wx.ProgressBar, and the cancel button is not responding. Here is a simple program that exhibits the problem: # import wx import time max = 10 app =

Re: wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace

2007-09-13 Thread kyosohma
On Sep 13, 6:29 am, Laszlo Nagy [EMAIL PROTECTED] wrote: Hello, I wrote a small program that works uses wxPython. The same application works on Linux and Windows. When I start it from MS Windows, I see this error message appearing each time I open a window: ---

Re: wxstyledtextctrl and xml markup

2007-09-13 Thread kyosohma
On Sep 13, 6:23 am, OpenPavilion Team [EMAIL PROTECTED] wrote: Hello community, I want to create an editor for a self defined xml markup language. I want to use wxpython with wxstyledtextctrl and I have looked around at yellowbrain site, but there are no examples. I also watched the

Re: wxstyledtextctrl and xml markup

2007-09-13 Thread kyosohma
On Sep 13, 8:27 am, stef [EMAIL PROTECTED] wrote: I highly recommend the wxPython mailing list. Right now it is down (see their website), its'up again. That's not what the website says, but I'll take your word for it. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace

2007-09-13 Thread kyosohma
On Sep 13, 8:41 am, Laszlo Nagy [EMAIL PROTECTED] wrote: See main.py of the Demo, line 1129. img2py is in the following default location: C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wxPython\tools Without seeing how you create the image, it's hard to troubleshoot, but I would guess

Re: Help to start python

2007-09-13 Thread kyosohma
python_lover wrote: Hi All, I'm new to python. I installed python 2.5 and IDLE 1.2.1 . I'm able to run shell commands. But I don't know how to execute a python program using this. When I'm opeing a py program a seperate IDLE window opeing with program text. But I don't know to to

Re: Help to start python

2007-09-13 Thread kyosohma
On Sep 13, 9:39 am, python_lover [EMAIL PROTECTED] wrote: On Sep 13, 7:23 pm, [EMAIL PROTECTED] wrote: python_lover wrote: Hi All, I'm new to python. I installed python 2.5 and IDLE 1.2.1 . I'm able to run shell commands. But I don't know how to execute a python program using

Is the wxPython list down?

2007-09-12 Thread kyosohma
Hi, Does anyone know if the wxPython mailing list is having issues? I subscribe to it and haven't seen anything come through since 09/06/2007. I went to ActiveState's archives and the last message there is from the 7th (http://aspn.activestate.com/ASPN/Mail/Browse/ Threaded/wxPython-users).

Re: Basic GUI

2007-09-12 Thread kyosohma
Don, On Sep 11, 10:54 pm, Don Hanlen [EMAIL PROTECTED] wrote: I'm writing a simple GUI that: ..gets info via telnet protocol (and sends) ..gets info via http (and sends) ..gets user-info from (currently) ...Tkinter Text windoze ...Tkinter buttons and such

Re: Sea-or-land test

2007-09-12 Thread kyosohma
On Sep 12, 6:54 am, [EMAIL PROTECTED] wrote: Could you advise if there exists a simple package, containing function that would take geographic coordinates and return information on whether this point belongs to land or sea? No great accuracy is needed -- I am interested in just major features,

Re: Is the wxPython list down?

2007-09-12 Thread kyosohma
On Sep 12, 8:26 am, stef [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, Does anyone know if the wxPython mailing list is having issues? I Yes the server has hardware problems, Robin Dunn (moderator), is informed about it. cheers, Stef Mientki And to think, we're always told

Re: newbie: self.member syntax seems /really/ annoying

2007-09-12 Thread kyosohma
Charles Fox wrote: I've just started playing around with Python, as a possible replacement for a mix of C++, Matlab and Lisp. The language looks lovely and clean with one huge exception: I do a lot of numerical modeling, so I deal with objects (like neurons) described mathematically in

Re: is it possible to use different font within one wxpython static text widget?

2007-09-12 Thread kyosohma
On Sep 12, 10:26 am, hyena [EMAIL PROTECTED] wrote: problem is as title, bear me if this too silly or too naive. I use wx.statictext widget to show some information in GUI, there are some numbers in the text to be emphasized in bigger other color. For example, in sentence the travel speed of

Re: newbie: stani's python editor if-else

2007-09-11 Thread kyosohma
On Sep 10, 11:24 pm, madzientist [EMAIL PROTECTED] wrote: hi, two quick questions: a) i am using SPE (latest version) and for some reason, when i type, say if 1==2: print not equal else: print equal the else is at the same indentation level as the preceding print

Re: wxPython unexpected exit

2007-09-10 Thread kyosohma
Hi, Thanks for your help! It seems work! Another question: I create a progress bar, and on creation, it will be displayed, How can I invisualize it when later I no longer need it? I think this is also a good way to use threads. Take a look at the wxPython demo for the ProgressDialog code.

Re: wxPython unexpected exit

2007-09-07 Thread kyosohma
On Sep 7, 3:10 am, Jimmy [EMAIL PROTECTED] wrote: Hi, wxPython is cool and easy to use, But I ran into a problem recently when I try to write a GUI. The thing is I want to periodically update the content of StatixText object, so after create them, I pack them into a list...the problem comes

Re: Finding specific date ranges

2007-09-07 Thread kyosohma
On Sep 7, 2:47 am, Tim Golden [EMAIL PROTECTED] wrote: Zentrader wrote: On Sep 6, 7:56 am, [EMAIL PROTECTED] wrote: December 31, 2006January 13, 2007 # doesn't earn January 14, 2007January 27, 2007 # does earn January 28, 2007February 10, 2007 # doesn't February 11,

Re: Finding specific date ranges

2007-09-07 Thread kyosohma
On Sep 6, 6:41 pm, Zentrader [EMAIL PROTECTED] wrote: On Sep 6, 7:56 am, [EMAIL PROTECTED] wrote: December 31, 2006January 13, 2007 # doesn't earn January 14, 2007January 27, 2007 # does earn January 28, 2007February 10, 2007 # doesn't February 11, 2007 February

Re: Generating a unique identifier

2007-09-07 Thread kyosohma
On Sep 7, 7:03 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: I have an application that will be producing many instances, using them for a while, then tossing them away, and I want each one to have a unique identifier that won't be re-used for the lifetime of the Python

Finding specific date ranges

2007-09-06 Thread kyosohma
Hi, I am working on a timesheet application in which I need to to find the first pay period in a month that is entirely contained in that month to calculate vacation time. Below are some example date ranges: December 31, 2006January 13, 2007 # doesn't earn January 14, 2007January

Re: Finding specific date ranges

2007-09-06 Thread kyosohma
On Sep 6, 10:57 am, Tim Golden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I am working on a timesheet application in which I need to to find the first pay period in a month that is entirely contained in that month to calculate vacation time. Below are some example date ranges:

Re: Finding specific date ranges

2007-09-06 Thread kyosohma
On Sep 6, 12:41 pm, Tim Golden [EMAIL PROTECTED] wrote: Thanks! I'll try it both ways and see if there's any appreciable difference in speed, although since it will be packaged into an executable, that may not be an issue anyway. Mike I honestly doubt there's any advantage to my

Re: Getting original working directory

2007-09-06 Thread kyosohma
On Sep 6, 10:19 am, rave247 rave247 [EMAIL PROTECTED] wrote: Hi, I' am unable to solve this problem. I've got python program, it is installed in standard location. I run this program from some location X (note that I just type relative myscript, leaving operating system to look up script

Re: Finding specific date ranges

2007-09-06 Thread kyosohma
On Sep 6, 2:39 pm, Tim Golden [EMAIL PROTECTED] wrote: Anyway, your method is probably clearer to read whereas mine doesn't require anything to be imported. I think I've been a SQL Python programmer for so long that I tend to do anything -- and sometimes too much -- to avoid messy

Re: Text processing and file creation

2007-09-05 Thread kyosohma
On Sep 5, 11:13 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a text source file of about 20.000 lines.From this file, I like to write the first 5 lines to a new file. Close that file, grab the next 5 lines write these to a new file... grabbing 5 lines and creating new files until

Re: Text processing and file creation

2007-09-05 Thread kyosohma
On Sep 5, 11:57 am, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I would use a counter in a for loop using the readline method to iterate over the 20,000 line file. file objects are iterables themselves, so there's no need to do that by using a method.

Re: Calling a dos batch file from python

2007-09-04 Thread kyosohma
On Sep 4, 8:42 am, n o s p a m p l e a s e [EMAIL PROTECTED] wrote: Suppose I have a batch file called mybatch.bat and I want to run it from a python script. How can I call this batch file in python script? Thanx/NSP The subprocess module should work. Mike --

Re: function call

2007-09-04 Thread kyosohma
On Sep 4, 3:17 pm, ianaré [EMAIL PROTECTED] wrote: Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like someOtherFunction: called by:

Re: create Powerpoint via com

2007-08-31 Thread kyosohma
On Aug 30, 11:55 pm, Alan Isaac [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: code OK, creating bulleted lists, or tables, or adding pictures is all straightforward. How about chart creation (in Ppt 2003)? I do not see how to do this with Python. Thanks, Alan Alan, You probably

Re: How to use Resource Editor in wxPython ?

2007-08-31 Thread kyosohma
On Aug 31, 7:49 am, codemania [EMAIL PROTECTED] wrote: Disappointing me extremely, with the generate python function within Resource Editor, I only get a segment of python code which load xrc(xml format) file, rather than real python code in which I could append my own code. Does that mean

Re: Question involving a Python app...

2007-08-31 Thread kyosohma
On Aug 31, 9:52 am, sberry [EMAIL PROTECTED] wrote: I am a Flash developer (also a Python dev) and I use an editor called SEPY Actionscript Editor. The latest release version does not support Flash CS3, so I downloaded the source from subversion, edited it, and recompiled to get a version

Re: Is there a simple way to exit a while loop on keystroke?

2007-08-31 Thread kyosohma
On Aug 31, 3:55 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: On Aug 31, 7:11 pm, gsxg [EMAIL PROTECTED] wrote: Thanks, The curses library doesn't look to helpful to me. And yet it is. -- Arnaud Maybe the OP is on Windows. The docs seem to indicate that the curses module isn't for

Re: create Powerpoint via com

2007-08-30 Thread kyosohma
Alan, On Aug 30, 1:37 pm, Alan Isaac [EMAIL PROTECTED] wrote: Can someone point me to a simple example or better yet tutorial for creating a Powerpoint using Python. Thanks, Alan Isaac You should check our the following for information on using COM itself:

Re: Pythonwin Install COM exceptions on Windows Vista Ultimate

2007-08-29 Thread kyosohma
On Aug 28, 8:20 pm, Sandipan News [EMAIL PROTECTED] wrote: What do I do? Can't do without Python! Any experience, advice, hope is welcome. Thanks. Sandipan You need to post the error traceback along with some more information so the community can help. Mike --

Re: Getting subprocesses to be hidden on Windows

2007-08-29 Thread kyosohma
On Aug 28, 1:13 pm, geoffbache [EMAIL PROTECTED] wrote: On 28 Aug, 18:18, Larry Bates [EMAIL PROTECTED] wrote: geoffbache wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will

Re: self extracting zipefile (windows) and (standard module) zipefile

2007-08-29 Thread kyosohma
On Aug 29, 6:53 am, Werner [EMAIL PROTECTED] wrote: Hi, I try to read (and extract) some self extracting zipefiles on a Windows system. The standard module zipefile seems not to be able to handle this. fName = rC:\tmp\mySelfExtratingFile.exe import zipfile zipefile.is_zipfile(fName))

Re: What's the difference ?

2007-08-29 Thread kyosohma
On Aug 29, 8:39 am, Alex [EMAIL PROTECTED] wrote: Hye, I was just wondering what is the difference between if my_key in mydict: ... and if mydict.has_keys(my_key): ... I've search a bit in the python documentation, and the only things I found was that they are equivalent.

Re: What's the difference ?

2007-08-29 Thread kyosohma
On Aug 29, 9:44 am, [EMAIL PROTECTED] (Alex Martelli) wrote: [EMAIL PROTECTED] wrote: ... Weird. Hetland's book, Beginning Python states that it's a matter of taste. If your taste is for more verbose AND slower notation without any compensating advantage, sure. Martelli's Python

Re: copying files

2007-08-29 Thread kyosohma
On Aug 29, 1:51 pm, Ricardo Aráoz [EMAIL PROTECTED] wrote: Brian McCann wrote: Hi, with the code below I set a variable TEST_HOME to a path and the variable m to a path in my current dir. I have a symbolic link setting mlib when I run the script I get no errors and the lib dir

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread kyosohma
On Aug 28, 4:08 am, geoffbache [EMAIL PROTECTED] wrote: On Aug 27, 11:28 pm, [EMAIL PROTECTED] wrote: On Aug 27, 3:21 pm, geoffbache [EMAIL PROTECTED] wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI

Re: Getting subprocesses to be hidden on Windows

2007-08-28 Thread kyosohma
On Aug 28, 8:59 am, geoffbache [EMAIL PROTECTED] wrote: Which GUI toolkit are you using? Tkinter, wxPython, pyQt? Primarily PyGTK, but I was hoping it wouldn't matter. I hope to be able to start the process as indicated in the original post from within my test tool and instruct the

Re: wxpython:how to minimize to taskbar

2007-08-28 Thread kyosohma
On Aug 28, 9:10 am, Jimmy [EMAIL PROTECTED] wrote: I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some message from network coming, it will pop out? Look at the wxPython

Re: wxpython:how to minimize to taskbar

2007-08-28 Thread kyosohma
On Aug 28, 9:50 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 28, 9:10 am, Jimmy [EMAIL PROTECTED] wrote: I'm kinda newbie to python and wxPython. Now I'm confronting a thorny problem: how can I make my program minimize to the taskbar represented as an ico, and when there is some

Re: wx.grid and different Value Choice each line ?

2007-08-27 Thread kyosohma
On Aug 27, 5:08 am, BH [EMAIL PROTECTED] wrote: Hi, Hox can I have different value choice for each line in a grid with wxPython ? I want to develop a small software for satisfaction surveys. Each line of the grid is a different question. Sometimes answers are the sames between two lines,

Re: wxpython on FreeBSD 6.2 broken

2007-08-27 Thread kyosohma
On Aug 26, 7:35 am, Michael S [EMAIL PROTECTED] wrote: Good day all, I was wondering if anyone was using the latest wxpython on FreeBSD 6. I just installed it yesterday as well as wxGlade. wxGlade doesn't function properly - it does not display any controls. I then tried some simple

Re: Best open source Python online *CHAT* apps?

2007-08-27 Thread kyosohma
On Aug 27, 3:12 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Best open source Python online chat apps? I believe there are a few PHP online chat apps to allow people to have conversation via a web server but a Python one would soothe the soul. Any available? Thanks, Chris Dunno, but

Re: Getting subprocesses to be hidden on Windows

2007-08-27 Thread kyosohma
On Aug 27, 3:21 pm, geoffbache [EMAIL PROTECTED] wrote: Hi, As part of my efforts to write a test tool that copes with GUIs nicely, I'm trying to establish how I can start a GUI process on Windows that will not bring up the window. So I try to hide the window as follows: info =

Re: creating a tar file with python

2007-08-24 Thread kyosohma
On Aug 24, 10:33 am, Ed Leafe [EMAIL PROTECTED] wrote: On Aug 24, 2007, at 11:24 AM, Carsten Haese wrote: You clearly have no idea who you're talking to. I suggest you Google for 'Steve Holden Python' to get a clue. Good luck finding any more help here. Even if it were Joe

Re: How to replace a method in an instance.

2007-08-24 Thread kyosohma
On Aug 24, 11:02 am, Steven W. Orr [EMAIL PROTECTED] wrote: In the program below, I want this instance to end up calling repmeth whenever inst.m1 is called. As it is now, I get this error: Hello from init inst = __main__.CC instance at 0x402105ec Traceback (most recent call last): File

Re: How to replace a method in an instance.

2007-08-24 Thread kyosohma
On Aug 22, 12:48 am, Bruno Desthuilliers [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] a écrit : On Aug 24, 11:02 am, Steven W. Orr [EMAIL PROTECTED] wrote: In the program below, I want this instance to end up calling repmeth whenever inst.m1 is called. As it is now, I get this error:

Re: Question: wxpython and 3d engine example with model load ?

2007-08-23 Thread kyosohma
On Aug 23, 4:11 am, OpenPavilion [EMAIL PROTECTED] wrote: Hello, did anyone succeed in combining wxpython and a 3d engine (pyogre, crystalblend, panda3d, soya etc.) ? I would like to create an application, which uses wxpython tree, menu and grid elements and embedds a 3d view of some of the

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread kyosohma
On Aug 23, 2:09 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a txt open so that notepad

Re: comparing two lists

2007-08-23 Thread kyosohma
On Aug 23, 11:27 am, Ladislav Andel [EMAIL PROTECTED] wrote: Hi, what would be the most efficient way to do following? I have a list of dictionaries taken from DB e.g. dblist = [{'id:1, 'host':'google.com','ip_address':'1.2.3.4'}, {'id:3, 'host':'yahoo.com','ip_address':'5.6.7.8'}, {'id:9,

Re: how to select between two file libraries with same name?

2007-08-23 Thread kyosohma
On Aug 23, 1:46 pm, jmborr [EMAIL PROTECTED] wrote: Imagine my file one.py contains the statement import two If there's a two.py in same directory as one.py, then this file will be loaded. However, I want to load a different file named also two.py, say file ~username/mypythonlib/two.py How

Re: Newbie: List file system roots

2007-08-23 Thread kyosohma
On Aug 23, 2:48 pm, Einar W. Høst [EMAIL PROTECTED] wrote: Hi, How would you list the file system roots in Python? That is, I'm looking for a way to list all connected drives (C:, D: etc) on a Windows box, or all /root, /tmp etc on a *nix box. In Java, there's a built-in API function to do

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread kyosohma
On Aug 23, 3:45 pm, Larry Bates [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a

Re: The folder a script is executed in

2007-08-21 Thread kyosohma
On Aug 21, 10:23 am, Benjamin [EMAIL PROTECTED] wrote: On Aug 21, 4:10 am, [EMAIL PROTECTED] wrote: Hi, How do I find out what folder a script is in while it is executing? For example, for the file C:/folder/script.py contain the following two lines of code - myLocation =

Re: How to optimise this code?

2007-08-21 Thread kyosohma
On Aug 21, 10:59 am, David N Montgomery [EMAIL PROTECTED] wrote: class testCase: def __init__(self, tc): if tc == 1:self.testCase1() if tc == 2:self.testCase2() if tc == 3:self.testCase3() if tc == 4:self.testCase4() if tc == 5:self.testCase5()

Re: str().join() isn't working

2007-08-21 Thread kyosohma
On Aug 20, 8:18 pm, Asun Friere [EMAIL PROTECTED] wrote: On Aug 21, 4:34 am, [EMAIL PROTECTED] wrote: to concatenate 2 lists to each other before it does the join, ... is impossible in Python. The + operator is only for addition and for two or more strings. Really? [1,2,3] + [4,5,6]

Re: datetime in microseconds

2007-08-20 Thread kyosohma
On Aug 20, 6:52 am, [EMAIL PROTECTED] wrote: Hi I have a time in microseconds, for example 0x8C905CBA7F84AF4. I want this to a normal view in hh:mm:ss DD:MM:. I tried with datetime, but it only takes a max of 100 microseconds is there another solution? Just truncate the value so that

Re: Python equivalent of Perl's $/

2007-08-20 Thread kyosohma
On Aug 19, 1:13 pm, John K Masters [EMAIL PROTECTED] wrote: I am currently working my way through Jeffrey Friedl's book Mastering Regular Expressions. Great book apart from the fact it uses Perl for the examples. One particular expression that interests me is '$/ = .\n' which, rather than

Re: Newbee Question

2007-08-20 Thread kyosohma
On Aug 20, 9:23 am, HD1956 [EMAIL PROTECTED] wrote: This is probably a simple code. I am a truck driver who gets paid by stops and cases. I am trying to figure out how to code my stop pay. I get 40 cents per stop up to 22 stops, and $1.40 per stops after that. def calc(num): if num

Re: Newbee Question

2007-08-20 Thread kyosohma
On Aug 20, 9:58 am, Shawn Milochik [EMAIL PROTECTED] wrote: On 8/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 20, 9:23 am, HD1956 [EMAIL PROTECTED] wrote: This is probably a simple code. I am a truck driver who gets paid by stops and cases. I am trying to figure out how to

Re: str().join() isn't working

2007-08-20 Thread kyosohma
On Aug 20, 1:16 pm, Robert Dailey [EMAIL PROTECTED] wrote: here is a more realized example of the lists I'm trying to join: _user_includes = [ ../src, ../resource, ../inc, ../src, ../data, ../gui, ../script,

Re: wxPython with directpython

2007-08-18 Thread kyosohma
On Aug 18, 8:08 am, [EMAIL PROTECTED] wrote: Hello, I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 and I'm running it on windows XP SP2. When I run my wx program, and this program run directpython code: (I run it under wx frame) example code: import d3dx

Re: Canceling events on COM Objects in python

2007-08-18 Thread kyosohma
On Aug 17, 11:54 pm, Oliver Nelson [EMAIL PROTECTED] wrote: I have MapPoint working in Python, and I'm trying to cancel events on the map, but I can't seem to make that happen. I'm responding to the events successfully in my panel object. My code is like this: global MapPointMod

Re: wxPython with directpython

2007-08-18 Thread kyosohma
On Aug 18, 9:46 am, [EMAIL PROTECTED] wrote: On 18 kol, 15:35, [EMAIL PROTECTED] wrote: On Aug 18, 8:08 am, [EMAIL PROTECTED] wrote: Hello, I'am using DirectPython 0.8, wxPython 2.8.4.2 (ansi) for Python 2.5 and I'm running it on windows XP SP2. When I run my wx program, and

Re: Downloading multiple csv files from a website

2007-08-17 Thread kyosohma
On Aug 17, 8:08 am, [EMAIL PROTECTED] wrote: I'd like to download data from the websitehttp://www.russell.com/Indexes/performance/daily_values_US.asp. On this web page, there are links to a number of .csv files, and I'd like to download all of them automatically each day. The file names are

Re: best GUI library for vector drawing program

2007-08-17 Thread kyosohma
On Aug 17, 8:27 am, chewie54 [EMAIL PROTECTED] wrote: Hello, What would be the best cross-platform GUI library to use for a vector based CAD program ( something like Visio on Windows ) WxWidgets, Tk, PyQt, Java Swing, Java SWT, I need the capibility to draw and edit in a window

Re: Question on SPE and pwintypes.dll

2007-08-17 Thread kyosohma
On Aug 17, 8:38 am, Gerry [EMAIL PROTECTED] wrote: I'm running SPE 8.3.c under XP, on a new PC. The files for SPE and Python were copied to the new machine, but the OS wasn't migrated, so the registry didn't know about either. I reinstalled Python 2.5.1, and Python seems fine.

Re: passing variables and values to texboxdisplays

2007-08-17 Thread kyosohma
On Aug 17, 6:57 am, yadin [EMAIL PROTECTED] wrote: hi! Can any one tell me why is it that i can't see my second frame and why is the value of freq not Appended in the First frame ...thanks I know it is wx python but it has to do with passing variables.thanks import wx def create(parent):

Re: Hijack! Different book:

2007-08-17 Thread kyosohma
On Aug 16, 3:50 pm, Steve Holden [EMAIL PROTECTED] wrote: Dennis Lee Bieber wrote: On Thu, 16 Aug 2007 04:21:07 -0700, Paul Boddie [EMAIL PROTECTED] declaimed the following in comp.lang.python: Is this the book that came out before TurboGears even reached 1.0, probably having diminished

Re: Python and Tkinter Programming--Expensive!

2007-08-17 Thread kyosohma
On Aug 17, 12:59 pm, W. Watson [EMAIL PROTECTED] wrote: Why is the book in Subject (author is Grayson) so expensive? $100 on Amazon and $195 on ABE. Aren't there alternatives? -- Wayne Watson (Nevada City, CA) Web Page: speckledwithStars.net

Re: wxpython log redirect

2007-08-17 Thread kyosohma
On Aug 16, 2:29 pm, [EMAIL PROTECTED] wrote: Hello, Why this wx example don't return \nHELLO WORLD and other text in same window: import wx import logging import sys def nekaj(): print \nHELLO WORLD class WxLog(logging.Handler): def __init__(self, ctrl):

Re: ming on win32 anyone ? [help a noob]

2007-08-15 Thread kyosohma
On Aug 15, 9:46 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Aug 15, 8:03 am, daz.diamond [EMAIL PROTECTED] wrote: hoping someone can help ... how do I install ming (with python) on win32? have downloaded the tar.gz of ming-0.3.0 which doesn't have a handy self-installer, and I'm

Re: Opinions about this new Python book?

2007-08-15 Thread kyosohma
On Aug 14, 1:43 pm, [EMAIL PROTECTED] wrote: On Aug 14, 12:46 pm, Shawn Milochik [EMAIL PROTECTED] wrote: Yes, please post back to the list. I saw this book on Amazon, but there's no table of contents listed, nor is there one on the publisher's site. Thanks, Shawn On 8/14/07,

Re: Python Book Recommendations

2007-08-15 Thread kyosohma
On Aug 15, 10:30 am, Azazello [EMAIL PROTECTED] wrote: On Aug 15, 7:47 am, Shawn Milochik [EMAIL PROTECTED] wrote: If I could have only one book, I would buy Core Python, Second Edition, by Wesley Chun. For the record, I own: Core Python, Second Edition (great) wxPython in Action

Re: Python, Sharepoint, .NET, NTLM

2007-08-15 Thread kyosohma
On Aug 15, 10:11 am, frikk [EMAIL PROTECTED] wrote: Hey everyone, I need to authenticate with a Sharepoint server. It looks to be using 'NTLM' authentication. I've looked on the newsgroup and it looks like there has been talk of using python and NTLM but no definite solutions are apparent.

Re: moving files in a seperate thread (and/or with progress?)

2007-08-15 Thread kyosohma
On Aug 15, 4:28 am, Jorgen Bodde [EMAIL PROTECTED] wrote: Hi all, I want to make a small batch copy tool that scans for certain files, and copies them to a specified directory. Since the files are huge (AVI / DIVX) typical 300 to 700 Mb, I want to provide the user with some feedback during

Re: Move files/directories to Recycle Bin using standard Python libs

2007-08-15 Thread kyosohma
On Aug 15, 11:39 am, Kevin D. Smith [EMAIL PROTECTED] wrote: I would like to move files and directories to the Recycle Bin on Windows from Python. I have found some older articles describing how to do this, but they require additional packages to be installed. I'm working on a plugin for an

Re: Hijack! Different book: (was: Opinions about this new Python book?

2007-08-15 Thread kyosohma
On Aug 15, 12:52 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Wed, 15 Aug 2007 08:32:30 -0700, [EMAIL PROTECTED] declaimed the following in comp.lang.python: More on the subject...the writer is very conversational in tone and it makes for a light read in the first 1 1/2 chapters that

Re: Move files/directories to Recycle Bin using standard Python libs

2007-08-15 Thread kyosohma
On Aug 15, 2:02 pm, Chris Mellon [EMAIL PROTECTED] wrote: On 8/15/07, Kevin D.Smith [EMAIL PROTECTED] wrote: I would like to move files and directories to the Recycle Bin on Windows from Python. I have found some older articles describing how to do this, but they require additional

<    1   2   3   4   5   6   7   8   >