<[EMAIL PROTECTED]> wrote:
>I mainly work on OS X, but thought I'd experiment with some Python code on XP.
> The
>problem is I can't seem to get these things to work at all.
>
>First of all, I'd like to use Greek letters in the command prompt window, so I
>was going to
>use unicode to do this.
i am trying out tkinter to make a gui..i want to have a frame with an
embedded file explorer next to a 'open directory' label..i tried out
FileDialog and tkFileDialog methods but they open as pop up dialogs..
how do i make this packed into the frame the way button and other
widgets can be packed?
On Sat, 15 Dec 2007 06:46:44 +, Steven D'Aprano wrote:
> Here's how *not* to use it to do what you want:
>
arrays = [[1, 2, 3, 4], [101, 102, 103, 104]] tupl = tuple("ab")
map(lambda alist, x: alist.append(x), arrays, tupl)
> [None, None]
arrays
> [[1, 2, 3, 4, 'a'], [101, 102,
On Fri, 14 Dec 2007 21:47:06 -0800, igor.tatarinov wrote:
> Given a bunch of arrays, if I want to create tuples, there is
> zip(arrays). What if I want to do the opposite: break a tuple up and
> append the values to given arrays:
>map(append, arrays, tupl)
> except there is no unbound append()
[EMAIL PROTECTED] wrote:
> Given a bunch of arrays, if I want to create tuples, there is
> zip(arrays). What if I want to do the opposite: break a tuple up and
> append the values to given arrays:
>map(append, arrays, tupl)
> except there is no unbound append() (List.append() does not exist,
>
On Dec 15, 5:47 am, [EMAIL PROTECTED] wrote:
> Given a bunch of arrays, if I want to create tuples, there is
> zip(arrays). What if I want to do the opposite: break a tuple up and
> append the values to given arrays:
>map(append, arrays, tupl)
> except there is no unbound append() (List.append(
Given a bunch of arrays, if I want to create tuples, there is
zip(arrays). What if I want to do the opposite: break a tuple up and
append the values to given arrays:
map(append, arrays, tupl)
except there is no unbound append() (List.append() does not exist,
right?).
Without append(), I am forc
If you are involved in the development of scientific computing
software, you are invited to participate in a survey on developing
this kind of software. If you have already received this request, I
apologize for the cross-posting, but I am attempting to advertise to
as many developers as possible.
On Fri, 14 Dec 2007 21:15:44 +, Neil Cerutti wrote:
> When implementing the rich comparison operators for some sort of
> container, it's tempting to save code by doing something like:
>
> class LarchTree:
>...
>def __gt__(self, other):
> # A lot of code to traverse the tree
>
On 15 Des, 02:59, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> oowriter --print some.doc | ps2pdf
> encapsulate, encapsulate. Unfortunately, apps using inter-app
> communication tend to do the opposite.
That pipe is a form of IPC as well.
--
http://mail.python.org/mailma
thx.
--
http://mail.python.org/mailman/listinfo/python-list
Standard disclaimer: read, googled, read some more. If you have a link,
please free free to point me there.
I'm using HTTPlib to construct some functional tests for a web app we're
writing. We're not using urllib2 because we need support for PUT and
DELETE methods, which urllib2 does not do.
We
On 14 Des, 11:42, Wolfgang Draxinger <[EMAIL PROTECTED]>
wrote:
> > I will not make reverse engineering impossible, but it will be
> > extremely difficult.
>
> No. It's just a matter of reading the decrypted bytecode from
> memory.
Ok, let med rephrase that: It may not be difficult to you. But th
En Fri, 14 Dec 2007 23:24:24 -0300, Unknown <[EMAIL PROTECTED]>
escribió:
> I have successfully connected to SQL2000 and MSDEE databases in the
> past, however I have to move to SQL2005 and SQLEXPRESS databases now.
> Conn.ConnectionString = "Provider=SQLNCLI;Server=10.1.1.2;
> Database=cs
Hi
I have successfully connected to SQL2000 and MSDEE databases in the
past, however I have to move to SQL2005 and SQLEXPRESS databases now.
I've tried the following but with no luck [this is what i used in the
earlier incarnation except the Provider resource was SQLOLEDB.1]
Conn = Dispatch
On Dec 15, 11:38 am, [EMAIL PROTECTED] wrote:
> On Dec 14, 4:51 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> > On Dec 15, 9:01 am, [EMAIL PROTECTED] wrote:
>
> > > I have created what amounts to a simple GUI email sending program
> > > using Python + wxPython. I have modified the mailto registrat
Python programmers may find the application to decoding an encrypted
map
image format known as Memory Map to produce a standard PNG image file
interesting.
Someone obviously very well versed in Python and in the intricacies
of image
files has written a routine to decode originally the UK Land
Python programmers may find the application to decoding an encrypted
map
image format known as Memory Map to produce a standard PNG image file
interesting.
Someone obviously very well versed in Python and in the intricacies
of image
files has written a routine to decode originally the UK Land
On Fri, 14 Dec 2007 10:26:54 -0800, John Nagle wrote:
> Yes. One of the basic design flaws of UNIX was that interprocess
> communication was originally almost nonexistent, and it's still not all
> that great. It's easy to run other programs, and easy to send command
> line parameters, but a
Python programmers may find the application to decoding an encrypted map
image format known as Memory Map to produce a standard PNG image file
interesting.
Someone obviously very well versed in Python and in the intricacies of image
files has written a routine to decode originally the UK Landra
On Fri, 14 Dec 2007 23:06:28 +0100, Bruno Desthuilliers wrote:
> Now the question is: why do you think it's so important for your users
> to only see functions ? What's so wrong with:
>
> from state_machine import *
> m = get_state_machine()
> m.set_state(42)
I can't speak for the "only" part, b
farsheed <[EMAIL PROTECTED]> writes:
> Let me be clear for you: there are someone in my company who love to
> use my software in other companies that she works there also. and
> because it is an inhouse tool, my CEO wanted me to protect it from
> stealing.
If the person is that untrustworthy, yet
On Dec 14, 4:51 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 15, 9:01 am, [EMAIL PROTECTED] wrote:
>
> > I have created what amounts to a simple GUI email sending program
> > using Python + wxPython. I have modified the mailto registration in
> > the Windows Registry so that it launches the
En Fri, 14 Dec 2007 12:19:41 -0300, Hans Müller <[EMAIL PROTECTED]> escribió:
> I cannot read a binary file into a mysql database. Everything I tried
> did not succeed.
>
> What I tried (found from various google lookups...) is this:
>
> con = MySQLdb.connect(to server)
> cur = con.cursor()
>
>
On Wed, 2007-12-12 at 07:04 -0800, massimo s. wrote:
> If by "thoroughly" you mean "it actually describes technically what it
> is and does but not how to really do things", yes, it is thoroughly
> documented.
> The examples section is a joke.
Actually I rarely use the csv module these days, but
On Dec 15, 12:02 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Dec 14, 2007 4:43 PM, <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 14, 11:06 pm, Bruno Desthuilliers
> > <[EMAIL PROTECTED]> wrote:
> > > [EMAIL PROTECTED] a écrit :
>
> > > > Dear list,
> > > > I'm writing very simple state machin
kramer31 wrote:
> Hi. First, I'm not sure if this is the correct group, but becuase I
> couldn't find a jython newsgroup, I'll post here.
>
> I'm new to jython and am just trying to get it to work. Interpreted
> jython works just fine, but I still can't get my compiled jython to
> work.
>
> Wh
On Dec 14, 2007 4:43 PM, <[EMAIL PROTECTED]> wrote:
> On Dec 14, 11:06 pm, Bruno Desthuilliers
> <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] a écrit :
>
> >
> > > Dear list,
> > > I'm writing very simple state machine library, like this:
> >
> > > _state = None
> >
> > > def set_state(state):
On Dec 15, 9:01 am, [EMAIL PROTECTED] wrote:
> I have created what amounts to a simple GUI email sending program
> using Python + wxPython. I have modified the mailto registration in
> the Windows Registry so that it launches the script when someone
> clicks on someone's email link in a web page.
>
SMALLp wrote:
> remember worked file when i wrote eg. import myFile but now in
> Ubuntu it says Module not found. (I'm using Ubuntu and I've
> installed python 2.5 and wxPython 2.8.4, and I'm using GedIt as my
> favorite text editor). The question is how to make this work
> (files are in the same
On Dec 14, 11:06 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] a écrit :
>
> > Dear list,
> > I'm writing very simple state machine library, like this:
>
> > _state = None
>
> > def set_state(state):
> > global _state
> > _state = state
>
> > def get_state():
> >
En Fri, 14 Dec 2007 15:33:44 -0300, Bret <[EMAIL PROTECTED]> escribió:
> The thing is, I'm not so much trying to fix indentation issues as
> spacing problems that affect readability but not program structure.
> All the indentation is fine, this is more trying to change things
> like:
>
> if ((one=
Carl Friedrich Bolz wrote:
> Jim Vickroy wrote:
>> Hello all,
>>
>> I'm a first time user of py.tests.
>>
>> My setup is:
>> * py.test v0.9.0
>> * Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
>> (Intel)] on win32
>> * Microsoft Windows XP Pro (service pack 2)
>>
>> The attached
Terry Reedy wrote:
> "Ron Provost" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> But here's my problem, most of my coworkers, when they see my apps and
> learn that they are written in Python ask questions like, "Why would you
> write that in a scripting language?" Whenever I
Jim Vickroy wrote:
> Hello all,
>
> I'm a first time user of py.tests.
>
> My setup is:
> * py.test v0.9.0
> * Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
> (Intel)] on win32
> * Microsoft Windows XP Pro (service pack 2)
>
> The attached file (py-test-generator-trial.py) de
[EMAIL PROTECTED] wrote:
> On Dec 14, 3:44 pm, SMALLp <[EMAIL PROTECTED]> wrote:
>> Hy!
>> I'm new in Linux, and i feel little less newer in python.
>>
>> I need advice and help. I'm making an application witch purpose is
>> irrelevant. It has a lot of code for now and I've only made interface.
>>
Berco Beute a écrit :
>>Having a decent knowledge of Python's object model
>
>
> As explained clearly here:
>
> http://www.cafepy.com/article/python_types_and_objects/python_types_and_objects.html
> http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.html
I
On Dec 14, 3:44 pm, SMALLp <[EMAIL PROTECTED]> wrote:
> Hy!
> I'm new in Linux, and i feel little less newer in python.
>
> I need advice and help. I'm making an application witch purpose is
> irrelevant. It has a lot of code for now and I've only made interface.
> So I've tried to split code into
> Having a decent knowledge of Python's object model
As explained clearly here:
http://www.cafepy.com/article/python_types_and_objects/python_types_and_objects.html
http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.html
2B
--
http://mail.python.org/mailma
[EMAIL PROTECTED] a écrit :
> Dear list,
> I'm writing very simple state machine library, like this:
>
>
>
> _state = None
>
> def set_state(state):
> global _state
> _state = state
>
> def get_state():
> print _surface
>
NameError here !-)
>
> but I hate to use global variable
On Dec 14, 3:51 pm, kramer31 <[EMAIL PROTECTED]> wrote:
> Hi. First, I'm not sure if this is the correct group, but becuase I
> couldn't find a jython newsgroup, I'll post here.
If you go to the main jython site at www.jython.com, you will notice a
link on the left under the "Community" header t
I have created what amounts to a simple GUI email sending program
using Python + wxPython. I have modified the mailto registration in
the Windows Registry so that it launches the script when someone
clicks on someone's email link in a web page.
While this works great if I create a convoluted path
Welcome to Python!
One way to get you up to speed fast (and fun) is take some java app
you've written and implement it in Jython. After you've done that, and
gotten over the pleasant surprise of how short and clean your code has
become, go over the source again and see where you can replace calls
[EMAIL PROTECTED] a écrit :
>
> Bruno Desthuilliers wrote:
>
>>Then the first move is to carefully eval existing solutions:
>>http://wiki.python.org/moin/LanguageParsing
>
>
> Always good advice, Bruno. How did you come by that list address?
> Google or is there something special known to Pytho
Nirav Thaker a écrit :
> Yo Group,
>
> I'm excited to learn Python as new language coming year, I consider
> myself good Java developer and, not so unusually, with very limited
> experience with dynamic programming languages such as Python or Ruby.
Then you'll probably have to unlearn a few thing
Hi. First, I'm not sure if this is the correct group, but becuase I
couldn't find a jython newsgroup, I'll post here.
I'm new to jython and am just trying to get it to work. Interpreted
jython works just fine, but I still can't get my compiled jython to
work.
When I do this:
jythonc fac.py (wh
Hy!
I'm new in Linux, and i feel little less newer in python.
I need advice and help. I'm making an application witch purpose is
irrelevant. It has a lot of code for now and I've only made interface.
So I've tried to split code into separate files and in windows as I
remember worked file when i
On Dec 14, 11:52 am, [EMAIL PROTECTED] wrote:
> Dear list,
> I'm writing very simple state machine library, like this:
>
> _state = None
>
> def set_state(state):
> global _state
> _state = state
>
> def get_state():
> print _surface
>
> but I hate to use global variable. So, please, is
Hello all,
I'm a first time user of py.tests.
My setup is:
* py.test v0.9.0
* Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
* Microsoft Windows XP Pro (service pack 2)
The attached file (py-test-generator-trial.py) demonstrates a behavior I
do not underst
download free reference regex for phyton
http://freepdf-ebook.blogspot.com/2007/12/regex-for-python.html
--
http://mail.python.org/mailman/listinfo/python-list
When implementing the rich comparison operators for some sort of
container, it's tempting to save code by doing something like:
class LarchTree:
...
def __gt__(self, other):
# A lot of code to traverse the tree
def __le__(self):
return not self > other
However, if I'm thinking
On Dec 14, 2:48 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Dec 14, 2007 2:09 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 11, 10:34 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> > > "Ron Provost" <[EMAIL PROTECTED]> wrote in message
>
> > >news:[EMAIL PROTECTED]
> > >
follow this link
http://freenewsoftware.blogspot.com/2007/12/python.html
--
http://mail.python.org/mailman/listinfo/python-list
I need some examples on using asycore for a client app im creating. I
need to be able to connect to my server 10 times and i dont want any
lag nor my cpu to be taxed.
The examples ive found are for the server and i dont know how to
implement asyncore on the client.
--
http://mail.python.org/mailm
I was wondering how and if it's possible to write a
loop in python
which updates two or more variables at a time. For
instance, something
like this in C:
for (i = 0, j = 10; i < 10 && j < 20; i++, j++) {
printf("i = %d, j = %d\n", i, j);
}
So that I would get:
i = 0, j = 0
i = 1, j = 1
i = 2
Hi,
I'm testing an application that sends an HTTPS GET request in the form
of:
https://localhost/cgi-bin/parse_eas.cgi?vers=2+"&msg=This+is+a+simple+%26+short+test.
I need to get a hold of that entire request for comparison /
verification purposes.
The closet thing I found is Sebastien Martini'
Bruno Desthuilliers wrote:
> Then the first move is to carefully eval existing solutions:
> http://wiki.python.org/moin/LanguageParsing
Always good advice, Bruno. How did you come by that list address?
Google or is there something special known to Python experts?
--
http://mail.python.org/mailm
herbasher pisze:
> How do I built highly available and lighting fast Python webservice?
Write optimized code and use it in conjunction with twisted.web.
--
Jarek Zgoda
http://zgodowie.org/
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 14, 2007 2:09 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Dec 11, 10:34 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> > "Ron Provost" <[EMAIL PROTECTED]> wrote in message
> >
> > news:[EMAIL PROTECTED]
> > But here's my problem, most of my coworkers, when they see my apps and
> >
On Dec 14, 5:01 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-12-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > I was wondering how and if it's possible to write a loop in python
> > which updates two or more variables at a time. For instance, something
> > like this in C:
>
> >
Il Fri, 14 Dec 2007 11:07:49 -0800, herbasher ha scritto:
> Hello!
>
> I'm wondering: I'm really not so much into heavy frameworks like Django,
> because I need to build a fast, simple python based webservice.
>
> That is, a request comes in at a certain URL, and I want to utilize
> Python to re
On Dec 14, 7:35 pm, Matimus <[EMAIL PROTECTED]> wrote:
> On Dec 14, 8:52 am, [EMAIL PROTECTED] wrote:
>
>
>
> > Dear list,
> > I'm writing very simple state machine library, like this:
>
> > _state = None
>
> > def set_state(state):
> > global _state
> > _state = state
>
> > def get_state()
On Dec 11, 10:34 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Ron Provost" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> But here's my problem, most of my coworkers, when they see my apps and
> learn that they are written in Python ask questions like, "Why would you
> write t
Python-related projects: join the PyCon Development Sprints!
The development sprints are a key part of PyCon, a chance for the
contributors to open-source projects to get together face-to-face for
up to four days of intensive learning and development. Newbies sit at
the same table as the gurus, g
herbasher wrote:
> I'm wondering: I'm really not so much into heavy frameworks like
> Django, because I need to build a fast, simple python based
> webservice.
>
> That is, a request comes in at a certain URL, and I want to utilize
> Python to respond to that request.
>
> Ideally, I want the scri
Hello!
I'm wondering: I'm really not so much into heavy frameworks like
Django, because I need to build a fast, simple python based
webservice.
That is, a request comes in at a certain URL, and I want to utilize
Python to respond to that request.
Ideally, I want the script to be "cached" so it d
On Dec 14, 8:52 am, [EMAIL PROTECTED] wrote:
> Dear list,
> I'm writing very simple state machine library, like this:
>
> _state = None
>
> def set_state(state):
> global _state
> _state = state
>
> def get_state():
> print _surface
>
> but I hate to use global variable. So, please, is
The thing is, I'm not so much trying to fix indentation issues as
spacing problems that affect readability but not program structure.
All the indentation is fine, this is more trying to change things
like:
if ((one==two)and(three==four)):
a=b+42
c=Classname (a,b)
print "Class %s create
On Dec 10, 1:28 pm, [EMAIL PROTECTED] wrote:
> Seongsu Lee:
>
> >I have a dictionary with million keys. Each value in the dictionary has a
> >list with up to thousand integers.<
>
> Let's say each integer can be represented with 32 bits (if there are
> less numbers then a 3-byte representation may
On Dec 14, 2007 10:52 AM, <[EMAIL PROTECTED]> wrote:
> Dear list,
> I'm writing very simple state machine library, like this:
>
>
>
> _state = None
>
> def set_state(state):
> global _state
> _state = state
>
> def get_state():
> print _surface
>
>
>
> but I hate to use global variable
Chris Mellon wrote:
> On Dec 14, 2007 2:07 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>> On Thu, 13 Dec 2007 10:43:18 +0100, Bruno Desthuilliers
>> <[EMAIL PROTECTED]> declaimed the
>> following in comp.lang.python:
>>
>>> I still wait to see any clear, unambiguous definition of "scripting
>>
Tlis schrieb:
> Hi,
>
> I have found that it is possible to reassign the instance.__class__
> reference to the same class (but after reloading) to make the
> isinstance() test work again! I know that it is a kind of hacking of
> the Python interpreter, but it works :-)
It's not especially "hackin
Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-12-14, farsheed <[EMAIL PROTECTED]> wrote:
>
> > Let me be clear for you: there are someone in my company who
> > love to use my software in other companies that she works
> > there also. and because it is an inhouse tool, my CEO wanted
> > me to
John Nagle wrote:
> John Nagle wrote:
>> Matt Nordhoff wrote:
>>> John Nagle wrote:
Here's a hostile URL that "urlparse.urlparse" seems to have mis-parsed.
>> ...
>>
>>>
>>> It's breaking on the first slash, which just happens to be very late in
>>> the URL.
>>>
>> urlparse('http
On Dec 14, 3:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 14 Dec 2007 06:06:21 -0300, Sean DiZazzo <[EMAIL PROTECTED]>
> escribió:
>
>
>
> > On Dec 14, 12:04 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> >> On Thu, 13 Dec 2007 17:49:20 -0800, Sean DiZazzo wrote:
> >
On Tue, 11 Dec 2007 12:51:52 -0800, Nishkar Grover wrote:
> I'm trying to replace a built-in exception type and here's a simplified
> example of what I was hoping to do...
>
>
> >>> import exceptions, __builtin__
> >>>
> >>> zeroDivisionError = exceptions.ZeroDivisionError
I don't know why y
On Dec 14, 12:07 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> On Dec 14, 2007 10:54 AM, nirvana <[EMAIL PROTECTED]> wrote:
>
> > I need to count the number of continous character occurances(more than
> > 1) in a file, and replace it with a compressed version, like below
> > XYZDEFAAcdAA
On Dec 14, 11:53 am, Nirav Thaker <[EMAIL PROTECTED]> wrote:
> Yo Group,
>
> I'm excited to learn Python as new language coming year, I consider
> myself good Java developer and, not so unusually, with very limited
> experience with dynamic programming languages such as Python or Ruby.
>
> I have s
On Dec 14, 2007 10:54 AM, nirvana <[EMAIL PROTECTED]> wrote:
> I need to count the number of continous character occurances(more than
> 1) in a file, and replace it with a compressed version, like below
> XYZDEFAAcdAA --> XYZ8ADEF2Acd2A
>
This sounds like homework. Google for run length e
On Fri, 14 Dec 2007 08:54:58 -0800, nirvana wrote:
> I need to count the number of continous character occurances(more than
> 1) in a file, and replace it with a compressed version, like below
> XYZDEFAAcdAA --> XYZ8ADEF2Acd2A
Great. Then go ahead an implement it. :-)
`itertools.groupb
On Dec 14, 9:57 am, Stargaming <[EMAIL PROTECTED]> wrote:
> On Tue, 11 Dec 2007 08:57:16 -0800, George Sakkis wrote:
> > Closer, but still wrong; for some weird reason, __import__ for modules
> > in packages returns the top level package by default; you have to use
> > the 'fromlist' argument:
>
>
I need to count the number of continous character occurances(more than
1) in a file, and replace it with a compressed version, like below
XYZDEFAAcdAA --> XYZ8ADEF2Acd2A
Thanks
Sumod
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-12-14, farsheed <[EMAIL PROTECTED]> wrote:
> Let me be clear for you: there are someone in my company who
> love to use my software in other companies that she works
> there also. and because it is an inhouse tool, my CEO wanted
> me to protect it from stealing. and really we havn't time t
Yo Group,
I'm excited to learn Python as new language coming year, I consider
myself good Java developer and, not so unusually, with very limited
experience with dynamic programming languages such as Python or Ruby.
I have started with basics at http://docs.python.org, but I'm more
interested in
Dear list,
I'm writing very simple state machine library, like this:
_state = None
def set_state(state):
global _state
_state = state
def get_state():
print _surface
but I hate to use global variable. So, please, is there a better way
of doing this? All I want is that a user has
On Dec 14, 2007 2:07 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 13 Dec 2007 10:43:18 +0100, Bruno Desthuilliers
> <[EMAIL PROTECTED]> declaimed the
> following in comp.lang.python:
>
> >
> > I still wait to see any clear, unambiguous definition of "scripting
> > language". Which one
John Nagle wrote:
> Matt Nordhoff wrote:
>> John Nagle wrote:
>>> Here's a hostile URL that "urlparse.urlparse" seems to have mis-parsed.
>>>
> ...
>
>>
>> It's breaking on the first slash, which just happens to be very late in
>> the URL.
>>
> urlparse('http://example.com?blahblah=http:/
Neil Cerutti wrote:
> An inefficient parsing technique is probably to blame. You first
> inspect the line to make sure it is valid, then you inspect it
> (number of column type) times to discover what data type it
> contains, and then you inspect it *again* to finally translate
> it.
>
I was thi
Hi, TKinter question
Let's say I use:
...
files = tkFileDialog.askopenFilenames(filetypes=[('AccessDB Files',
'*.mdb')])
...
This works OK - I can select multiple files and the var "files" will
be a tuple of the files.
But let's say the files I want to select are in different folders/
director
> But reading through the warts and reading about a lack of "do while
> statements" I also started to ponder about the "'do something' if
> 'true' else 'do this'", and pondered if perhaps this statement could
> do with the including of the keyword do.
I often miss what can be done in other langua
Stephen_B wrote:
> This doesn't seem to work in a dos terminal at the start of a script:
>
> from os import popen
> print popen('clear').read()
>
> Any idea why not? Thanks.
>
As others have mentioned, you should just do:
os.system("cls")
Or, you can use my WConio module for fancier work.
htt
The SpamBayes antispam filter (http://www.spambayes.org/) is fairly popular
as a way to suppress spam. We have lots of people who use the Outlook
plugin. Unfortunately, for the past year or two we've suffered from a
dearth of Windows experience as our Windows development experts all got busy
doin
On Dec 14, 2007, at 11:21 AM, Victor Subervi wrote:
> whatever[0:2] will yield THREE characters, so my "by " is correct
> and "by" will fail every time :))
> Victor
Nope, whatever[0:2] is two characters:
ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
Python 2.5.1 (r251:54863, May
[EMAIL PROTECTED] a écrit :
> Most unclear. My apologies.
>
> I'm trying to structure a tokenizer. The stupid concatenations are
> just placeholders for the actual tokenizing work. By rebuilding the
> input they demonstrate that the framework correctly processes all the
> input.
>
> I'm currently
[EMAIL PROTECTED] a écrit :
> Jonathan Garnder said:
>
>> Well, if using something like PLY ( http://www.dabeaz.com/ply/ ) is
>> considered more Pythonic than writing your own parser and lexer...
>
> Lex is very crude.
Possibly. Anyway, there are quite a few other parser generators :
http://wik
whatever[0:2] will yield THREE characters, so my "by " is correct and "by"
will fail every time :))
Victor
On Dec 14, 2007 12:06 PM, Derek Broughton <[EMAIL PROTECTED]> wrote:
> Encolpe Degoute wrote:
>
> > Derek Broughton a écrit :
> >> Victor Subervi wrote:
> >>
> >>> Hi;
> >>> Why can't I do t
Hi There,
I have been working on this script, and the part that this issue that
I have occurs in is when iterating through some results from the db,
asking the admin input to delete the entry or not - everything works
fine up until the last entry, then it bombs out. I know why - but I am
not quite
Jonathan Garnder said:
> Well, if using something like PLY ( http://www.dabeaz.com/ply/ ) is
> considered more Pythonic than writing your own parser and lexer...
Lex is very crude. I've found that it takes about half a day to
organize your token definitions and another half day to write a
tokeniz
On 2007-12-14, Neal Becker <[EMAIL PROTECTED]> wrote:
> I have a list of strings (sys.argv actually). I want to print them as a
> space-delimited string (actually, the same way they went into the command
> line, so I can cut and paste)
>
> So if I run my program like:
> ./my_prog a b c d
>
> I wan
On 2007-12-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I was wondering how and if it's possible to write a loop in python
> which updates two or more variables at a time. For instance, something
> like this in C:
>
> for (i = 0, j = 10; i < 10 && j < 20; i++, j++) {
> printf("i = %d, j =
1 - 100 of 150 matches
Mail list logo