Re: wxPython FileDialog, select folder

2007-12-20 Thread SMALLp
Chris Mellon wrote: > On Dec 20, 2007 3:19 PM, SMALLp <[EMAIL PROTECTED]> wrote: >> How can i select folder either with wx.FileDialog or with any other. I >> managed to fine only how to open files but I need to select folder to >> get files from all sub folders. >> > > > There's a separate di

Re: Python; jump to a concrete line

2007-12-20 Thread Tobiah
Horacius ReX wrote: > Hi, sorry but after looking for information, I still did not get how, > when reading a text file in python, can one jump to a concrete line > and then read the different data (separated by spaces). In each line > there is different number of columns so sometimes i get kind of

Re: Passing by reference

2007-12-20 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Is the following correct? | | x = "some string" | | x is a reference to "some string" x is a name bound to a string object with value 'some string'. Some people find is useful to call that a 'reference', as you seem to have. Others ge

Re: Connecting to SQL database

2007-12-20 Thread Rob Williscroft
bill ramsay wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Hi > > I have successfully connected to SQL2000 and MSDEE databases in the > > Conn = Dispatch('ADODB.Connection') > Conn.ConnectionString = "Provider=SQLNCLI;Server=10.1.1.2; > Database=csrctest;Uid=bill;Pwd=bill" By

Re: wxPython FileDialog, select folder

2007-12-20 Thread farsheed
import wx def dirchoose(): 'Gives the user selected path. Use: dirchoose()' global _selectedDir , _userCancel #you should define them before userPath = 'c:/' app = wx.App() dialog = wx.DirDialog(None, "Please choose your project directory:",\

Why does __builtins__ mean different things...

2007-12-20 Thread James Stroud
Hello all, Say I have the following module # amodule.py print __builtins__ # end of module Then I have the following little helper script: # helper.py import amodule # end of helper script Now, I do this at the command line: python amodule.py And I get the following output: Which is good.

Re: wxPython FileDialog, select folder

2007-12-20 Thread SMALLp
farsheed wrote: > import wx > def dirchoose(): > 'Gives the user selected path. Use: dirchoose()' > global _selectedDir , _userCancel #you should define > them before > userPath = 'c:/' > app = wx.App() > dialog = wx.DirDialog(None, "Please choose your pr

Re: Allowing Arbitrary Indentation in Python

2007-12-20 Thread Gary
On Dec 19, 10:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > ElementTree is a good candidate for processing xml: > http://effbot.org/zone/element.htm > It provides a "natural" way to access elements and attributes, instead of > writing the same handler again and again or using slow DOM

Re: Allowing Arbitrary Indentation in Python

2007-12-20 Thread Gary
On Dec 19, 10:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > ElementTree is a good candidate for processing xml: > http://effbot.org/zone/element.htm > It provides a "natural" way to access elements and attributes, instead of > writing the same handler again and again or using slow DOM

Re: readlines() reading incorrect number of lines?

2007-12-20 Thread John Machin
On Dec 21, 8:13 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > [Fixing top-posting.] > > > > > > On Thu, 20 Dec 2007 12:41:44 -0800, Wojciech Gryc wrote: > > On Dec 20, 3:30 pm, John Machin <[EMAIL PROTECTED]> wrote: > [snip] > >> > However, when I use Python's various methods

Re: Why does __builtins__ mean different things...

2007-12-20 Thread Jean-Paul Calderone
On Thu, 20 Dec 2007 14:29:35 -0800, James Stroud <[EMAIL PROTECTED]> wrote: >Hello all, > >Say I have the following module > ># amodule.py >print __builtins__ ># end of module > >Then I have the following little helper script: > ># helper.py >import amodule ># end of helper script > >Now, I do this

Re: Why does __builtins__ mean different things...

2007-12-20 Thread James Stroud
Jean-Paul Calderone wrote: > On Thu, 20 Dec 2007 14:29:35 -0800, James Stroud <[EMAIL PROTECTED]> > wrote: >> Hello all, >> >> Say I have the following module >> >> # amodule.py >> print __builtins__ >> # end of module >> >> Then I have the following little helper script: >> >> # helper.py >> impo

How to spider through a secure site?

2007-12-20 Thread Gardner Pomper
Hi, My daughter's school just put up an "Infinite Campus" website, which requires a login and does everything through https. I can find examples of how to spider a regular web site with python, but I can't figure out how to deal with the ssl certificate and how to supply name and password. I have

Re: Need to open an Url and display it in a window created using Python win extensions

2007-12-20 Thread Farsheed Ashouri
Can you post your basic wx part code? -- http://mail.python.org/mailman/listinfo/python-list

replace c-style comments with newlines (regexp)

2007-12-20 Thread lex __
I'm tryin to use regexp to replace multi-line c-style comments (like /* this /n */ ) with /n (newlines). I tried someting like re.sub('/\*(.*)/\*' , '/n' , file) but it doesn't work for multiple lines. besides that I want to keep all newlines as they were in the original file, so I can

Re: Best way to protect my new commercial software.

2007-12-20 Thread Farsheed Ashouri
Well, I think my question was a programming question not a copyright question. I expect a nice script in 15-35 lines that protects my software from working on another machine. I don't want best protection method available, like flexlm or etc. My software is some kind of business secret and working

Re: replace c-style comments with newlines (regexp)

2007-12-20 Thread Steven D'Aprano
On Fri, 21 Dec 2007 00:00:47 +, lex __ wrote: > I'm tryin to use regexp to replace multi-line c-style comments (like /* > this /n */ ) with /n (newlines). I tried someting like > re.sub('/\*(.*)/\*' , '/n' , file) but it doesn't work for multiple > lines. Regexes won't cross line boun

Re: How do I use trace to generate coverage data in multi-threaded programs?

2007-12-20 Thread Noah
On Dec 19, 7:33 pm, Noah <[EMAIL PROTECTED]> wrote: > /usr/lib/python2.5/trace.py --missing --count --summary tools/testall.py > > When I examine the *.cover files that are generated after a test run > I do not see coverage information for the methods that were run > in a separate thread. How c

A new group for MAYA - PYTHON lovers.

2007-12-20 Thread Farsheed Ashouri
New mailing list for Maya/Python users. http://groups.google.com/group/python_inside_maya -- http://mail.python.org/mailman/listinfo/python-list

Re: pop3_ssl Attachment problem

2007-12-20 Thread los117
On Dec 20, 6:57 am, Chris <[EMAIL PROTECTED]> wrote: > On Dec 20, 9:22 am, los117 <[EMAIL PROTECTED]> wrote: > > > > > > > I am trying to fetch email from gmail, but what I am really interested > > is theattachment. > > I manage to access the gmail server and get the messege but the > >attachmentca

Tkinter--unexpected behavior with pack_forget()

2007-12-20 Thread Kevin Walzer
I'm trying to toggle the visibility of a Tkinter widget using pack_forget(), and I'm running into unexpected behavior. The widget "hides" correctly, but does not become visible again. My sample code is below: from Tkinter import * root = Tk() label = Label(text="Hello") label.pack() def

2D Game Development in Python

2007-12-20 Thread PatrickMinnesota
I like to do fun stuff when learning a new language. I've been working with Python for a little while on real world problems mostly fixing bugs and writing a simulator for work. I was thinking as a hobby project developing a simple 2d game (think Donkey Kong, Space Invaders, LoadRunner) and menti

Re: sending a rip1 request via python

2007-12-20 Thread scripteaze
On Dec 19, 5:50 pm, Dirk Loss <[EMAIL PROTECTED]> wrote: > scripteaze wrote: > > >>> I need to be able to send a rip1 request to my rip1 enabled device., ok i got everthing setup and its sending the packets, do i have to create a socket server or cant i simply setup a buf = 1024 and recieve the re

Re: Tkinter--unexpected behavior with pack_forget()

2007-12-20 Thread John McMonagle
Kevin Walzer wrote: > I'm trying to toggle the visibility of a Tkinter widget using > pack_forget(), and I'm running into unexpected behavior. The widget > "hides" correctly, but does not become visible again. My sample code is > below: > > > from Tkinter import * > > root = Tk() > > lab

Re: Is this a bug in int()?

2007-12-20 Thread Terry Reedy
"Duncan Booth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | [EMAIL PROTECTED] wrote under the subject line "Is this a | bug in int()?": | int('0x', 16) | > 0 | > | I think it is a general problem in the tokenizer, not just the 'int' | constructor. The syntax for integers says

Re: Why does __builtins__ mean different things...

2007-12-20 Thread Terry Reedy
"James Stroud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Butwhat the heck? You mean if I drop an s I get predictable behavior | and if I don't, I get unpredictable behavior? In 3.0, the __builtin__ module will be renamed 'builtins'. The internal __builtins__ variable mo

Re: 2D Game Development in Python

2007-12-20 Thread Terry Reedy
"PatrickMinnesota" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I think I need at least this: 2D graphics, sound, input (kbd, mouse, | joystick maybe), some IPC might be nice (Stuff like: Sockets, TCP, | UDP, pipes, msg queues, shared memory). The IPC stuff would only be | used

Re: How to spider through a secure site?

2007-12-20 Thread Terry Reedy
"Gardner Pomper" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi, | | My daughter's school just put up an "Infinite Campus" website, which | requires a login and does everything through https. I can find examples of | how to spider a regular web site with python, but I can't fig

Re: It's ok to __slots__ for what they were intended (was: Don't use __slots__ (was Re: Why custom objects take so much memory?))

2007-12-20 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: >On Dec 18, 4:49 pm, [EMAIL PROTECTED] (Aahz) wrote: >> In article <[EMAIL PROTECTED]>, >> Chris Mellon <[EMAIL PROTECTED]> wrote: >>> >>>You can reduce the size of new-style classes (inherit from object) by >>>quite a bit if yo

Re: Passing by reference

2007-12-20 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >Is the following correct? Sort-of, but I would say that it's misleadingly correct. Try this: http://starship.python.net/crew/mwh/hacks/objectthink.html -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "T

Re: How to spider through a secure site?

2007-12-20 Thread Gardner Pomper
Thanks, I tried googling 'python ssl certificate' and I am still not finding answers. I think part of my problem is that I am not clear on what is going on under the covers. I have found an example of connecting via https herebut that

Re: Is there a simple way to parse this string ?

2007-12-20 Thread [EMAIL PROTECTED]
Stef, For clarification, there is nothing hazardous about using eval on the string that you presented. t = eval('(0, 0, 0, 255), (192, 192, 192, 255), True, 8') Whether or not this is the "simplest" solution, remains a question. -- http://mail.python.org/mailman/listinfo/python-list

socket in python with proxies

2007-12-20 Thread Astan Chee
Hi, I have a proxy server that requires authentication on a non-standard port and Im trying to connect to it via socket.connect() I tried doing this: import socket server = ("username:[EMAIL PROTECTED]",1234) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(server) I keep getting t

Re: 2D Game Development in Python

2007-12-20 Thread Steven Clark
On Dec 20, 2007 10:30 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "PatrickMinnesota" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > | I think I need at least this: 2D graphics, sound, input (kbd, mouse, > | joystick maybe), some IPC might be nice (Stuff like: Sockets, TCP, > |

Re: Is there a simple way to parse this string ?

2007-12-20 Thread Steven D'Aprano
On Thu, 20 Dec 2007 20:27:23 -0800, [EMAIL PROTECTED] wrote: > Stef, > > For clarification, there is nothing hazardous about using eval on the > string that you presented. > > t = eval('(0, 0, 0, 255), (192, 192, 192, 255), True, 8') > > Whether or not this is the "simplest" solution, remains a

Re: Best way to protect my new commercial software.

2007-12-20 Thread Steven D'Aprano
On Thu, 20 Dec 2007 21:23:05 -0800, Dennis Lee Bieber wrote: >> I expect a nice script in 15-35 lines that protects my software from >> working on another machine. > > Ah, but at that shortness, what will protect the protection script? ... > Proprietary information/trade-secret is only e

Re: [capi-sig] Deploying embedded Python

2007-12-20 Thread Jeff Rush
Andreas Raab wrote: > > 1) How to define a useful subset of the stdlib that can serve as an > initial basis for the installation but later allows upgrade to the > "full" library if desirable. There is no formal way of doing this, although you could at least start with the full library and remov

<    1   2