ad of having initialdir='.' (current directory), I
would like it set to the last visited directory, which can be from a
previous run or even a previous day. Is that possible? If so how?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
operators can be overloaded.
So can I define a new operator? If so, can I
define func1 as an operator?
(on the side, I have always wanted to define the
++ operator as +=1. Is that possible?)
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
and 'int'
Is there some easy way to get what the bytes of the float are?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Simon Forman
Sent: Wednesday, July 26, 2006 2:56 PM
To: python-list@python.org
Subject: Re: Splitting a float into bytes:
Michael Yanowitz wrote:
> Hello:
>
> For some reason I can't figure ou
the set values
for the next time it is called.
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
-Original Message-
From: Cliff Wells [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:55 PM
To: Michael Yanowitz
Cc: python-list@python.org
Subject: Re: Static Variables in Python?
On Mon, 2006-07-31 at 15:21 -0400, Michael Yanowitz wrote:
> Is it possible to have a sta
gt;> -10/3
-4
It behaves correct for positive numbers, but for negative
integers it seems to subtract one from the expected result.
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
if not, C-to-C++ would
be ok?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
Python over-ride its rules so that if I type in a number
followed by a dot followed by number followed by a dot followed by a
number followed by a dot and another number, it can call
make_ip_address() on the value?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
,7,8,9,190,1,2,
3,4,
5,6,7,8,9,200,1,2,3,4,5,6,7,8,9,210,1,2,3,4,5,6,7,8,9,220,1,2,3,4,5,6,7,8,9,
230,
1,2,3,4,5,6,7,8,9,240,1,2,3,4,5,6,7,8,9,250,1,2,3,4,5,6,7,8,9)
SyntaxError: more than 255 arguments
Is there a way to increase this limit?
(This is just a made up example, I would not normally do this).
Thanks
nt to do is to
search for it myself.
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
Thanks.
That is what I was looking for. The configure command (as you and John
pointed out),
should do what I need. The first response of starting a new thread was not
what I was
looking for.
Michael Yanowitz
-Original Message-
In article <[EMAIL PROTECTED]>,
Michael Ya
when finished rather than
exit the shell. How do I do that?
Or would it cause a problem (so that Python no longer works) if
I change the default .py extension to open in an editor rather
than execute it if I open it?
Thanks:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
13, 2006 9:48 AM
To: python-list@python.org
Subject: Re: .py and running in Windows:
Andrew Gwozdziewycz wrote:
> You'll have better results posting this to it's own thread.
>
He certainly should have, but since I've read it here anyway:
> On Jun 13, 2006, at 9:29 AM, M
d?
Of course when I then try to go into python and
import example, I get:
>>> import example
Traceback (most recent call last):
File "", line 1, in ?
File "example.py", line 5, in ?
import _example
ImportError: No module named _example
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
++ compiler I have presently is Cygwin gcc.
Thanks in advance:
Michael Yanowitz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Michael Yanowitz
Sent: Tuesday, June 20, 2006 3:39 PM
To: python-list@python.org
Subject: SWIG problems with gcc and Cygwin?
Hello
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Steve Holden
Sent: Tuesday, June 27, 2006 2:55 AM
To: python-list@python.org
Subject: Re: SWIG problems with gcc and Cygwin?
Michael Yanowitz wrote:
> No response yet. The SWIG test works fine in Linux
Thanks.
It now works for me in Cygwin.
I would never have guessed to write it as a dll.
Michael Yanowitz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Norman Vine
Sent: Tuesday, June 27, 2006 4:21 PM
To: python-list@python.org
Subject: Re: SWIG
The one thing I observed (just an observation) is that:
a) on 32-bit machines:
sizeof(int) = 32
sizeof(long) = 32
b) on 64-bit machines:
sizeof(int) = 32
sizeof(long) = 64
This in C and Python.
Thanks in advance:
Michael Yanowitz
-Original Message-
From: [EMAIL
hing which determines when a word ends, and I will
define
a word as containing only 'A'-'Z','a'-'z','0'-'9','_' . As long as the
string
contains more of the word digits after the match, don't replace?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
>Michael Yanowitz wrote:
>> Hello:
>>
>> I am hoping someone knows if there is an easier way to do this or
someone
>> already implemented something that does this, rather than reinventing the
>> wheel:
>> I have been using the string.replace(from_string
, strMessage)
Thanks in advance:
Michael Yanowitz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Ramon Diaz-Uriarte
Sent: Wednesday, December 06, 2006 5:12 PM
To: Steve Bergman
Cc: python-list@python.org
Subject: Re: About the 79 character line recommendation
|
| [Abort Script] |
+-+
So, every tenth of a seconds or ??? better time, I
would like to 'return' to the GUI and check if the
"Abort Script" button has been pressed.
How do I do this? Or is there a better way to
implement this?
Thanks
check if the "Abort Script"
button is pressed.
Presently what happens is that the script takes over and all the buttons
on the GUI disappear
as the GUI is not given any cpu time to refresh or check if any activity in
the dialog.
Thanks in advance:
Michael Yanowitz
-Origin
make, without knowing any
of the
GUI objects, I can call from test3.py (or while test3.py is running) which
will
refresh the GUI and check for activity such as button presses on the GUI
itself.
For example, if I just call sleep(), will it do this?
Thanks in advance:
Michael Yanowitz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of hg
Sent: Tuesday, December 19, 2006 9:44 AM
To: python-list@python.org
Subject: Re: Can a Tkinter GUI check for abort script:
Michael Yanowitz wrote:
> Hello:
>
>I have successfully impl
Hello:
If I have a long string (such as a Python file).
I search for a sub-string in that string and find it.
Is there a way to determine if that found sub-string is
inside single-quotes or double-quotes or not inside any quotes?
If so how?
Thanks in advance:
Michael Yanowitz
--
http
=127.0.0.1)")
without the internal quotes.
How can I do this?
I presumed that I would have to check to see if the string
was already in quotes and if so remove the quotes. But not
sure how to do that?
Or is there an easier way?
Thanks in advance:
Michael Yanowitz
-Original Mess
Let me guess - the next step will be to restrict the identifiers
to be at most 6 characters long.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Stefan Behnel
Sent: Monday, May 14, 2007 2:53 PM
To: python-list@python.org
Subject: Re: PEP 3131: Supporting Non
ak it up from:
(E1 AND_or_OR E2) and make that int [AND_or_OR, E1, E2]
and apply the same to E1 and E2 recursively until E1[0] != '('
But the main problem I am running to is, how do I split this up
by outer parentheseis. So that I get the proper '(' and ')' to split
this upper correctly?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Adam Atlas
Sent: Monday, April 09, 2007 11:28 PM
To: python-list@python.org
Subject: Re: Breaking up Strings correctly:
On Apr 9, 8:19 am, "Michael Yanowitz" <[EMAIL PROTECTED]> wrote:
> H
max_run_time of 30 seconds.
Unhandled exception in thread started by
Traceback (most recent call last):
File "./testthread.py", line 10, in abort
raise thread_finished
MAX RUN TIME EXCEEDED!
HELLO 30
HELLO 31
HELLO 32
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Benjamin Niemann
Sent: Monday, January 22, 2007 11:19 AM
To: python-list@python.org
Subject: Re: Is there a better way to implement this:
Michael Yanowitz wrote:
> Hello:
>
>I wrote the code be
1
>>> div7 (14)
1
>>> div7 (21)
2
>>> div7 (700)
98
>>> div7 (7000)
984
Michael Yanowitz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Krypto
Sent: Thursday, February 01, 2007 3:25 PM
To: python-list@python.org
Subjec
How about having something from Monty Python in the logo rather
than something snakelike. Python was named after Monty Python and not
the snake. Snakes also don't appear friendly to me.
I used to have rats as pets. Snakes are murderers of rats. Which I
do find strange that there is a rat on th
'map'
Is that a problem?
Plus many other warnings about my naming convention or unused variables
which I will ignore
at this time.
I did find it to be a very useful too any how in cleaning up my code.
I raised my code rate from about -8 to about +7.
Thanks:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
dress,
strHostname,
nPortNumber)
Am I missing something obvious? Is there a better, or more standard way
to return values from functions?
Thanks in advance:
Michael Yanowitz
--
http://mail.python.org/mailman/listinfo/python-list
Hello:
Someone on my team tried out installing my Python code and
found that setting PYTHONPATH does not work, but setting PATH
environment variable works the way PYTHONPATH should. Is that
how it supposed to be, or is that a bug or feature?
-Original Message- (parts deleted)
Subject:
Hello:
Many times, people are warning things like
"Don't use 'str' as a variable name as it will shadow the
built in str function."
Is there some way to determine if a string is already
defined in some higher scope?
Maybe something like
if isdefined ('str'):
print 'str is already define
Hello:
Below I have included a stripped down version of the GUI I am working on.
It contains 2 dialog boxes - one main and one settings. It has the following
problems, probably all related, that I am hoping someone knows what I am
doing wrong:
1) Pressing the Settings.. Button multiple times,
> Hello:
>
>Below I have included a stripped down version of the GUI I am working
> on.
> It contains 2 dialog boxes - one main and one settings. It has the
> following
> problems, probably all related, that I am hoping someone knows what I am
> doing wrong:
>
> 1) Pressing the Settings.. Butto
Hello:
Is there a version testing tool available for Python
such that I can check to see if my code will still run in
versions 2.2, 2.3, 2.4.3, and 1.1 (for example) (or whatever)
without having to install all these different versions on my
computer?
Thanks in advance:
Michael Yanowitz
Is there something like a .pythoninitrc which can run whenever we start
Python
that can load a file with many sys.path.append(), etc?
If not is there some way to modify the Python shell constructor and
destructor?
Thanks in advance:
Michael yanowitz
-Original Message-
From: [EMAIL
Hello:
I am relatively new to Python and this is my first post on
this mailing list.
I am confused as to why I am getting size differences in the following
cases:
>>> print struct.calcsize("I")
4
>>> print struct.calcsize("H")
2
>>> print struct.calcsize("HI")
8
>>> print struct.calcsize("
), but I am content that it is
working now.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Fredrik Lundh
Sent: Wednesday, March 22, 2006 9:28 AM
To: python-list@python.org
Subject: Re: struct size confusion:
Michael Yanowitz wrote:
>I am relatively n
how about this solution:
def printDecimal(number):
if (number < 0):
print number - int(number)
else:
print int(number) - number
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Grant Edwards
Sent: Thursday, March 23, 2006 5:11 PM
Sorry, got it backwards:
def printDecimal(number):
if (number >= 0):
print number - int(number)
else:
print int(number) - number
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Michael Yanowitz
Sent: Thursday, March 23, 2006 5
Sorry about the Top Posting that I did before.
It is just the style I am used to using, and I didn't
realize that it was different here. I won't do it again.
--
http://mail.python.org/mailman/listinfo/python-list
Hello:
I am still relatively new to Python. I am confused by the syntax for
tuples.
I had:
thread.start_new_thread(read_data_thread, (strDataFilename))
and got back the following error:
File "scene.py", line 256, in readData
thread.start_new_thread(read_data_thread, (strDataFilename)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Peter Hansen
Sent: Thursday, April 06, 2006 8:47 AM
To: python-list@python.org
Subject: Re: "The World's Most Maintainable Programming Language"
Mirco Wahab wrote:
> Hi Ralf
>>So we should rename Python into
Hello:
One topic that has always interested me are the Language translators.
Are there any that convert between Python and C++ or Python and Java?
I remember seeing one that converts from Python to or from Perl but couldn't
find it on a quick google search. I did find a Python2C
http://sourcefo
> First of all: why do you want to translate pythont to C++?
>
> Anyway, this has a C back-end:
> http://www.pypy.org
>
> Szabi
Thanks. I want to translate from Python to C++ for a few reasons:
1) Curiosity. I would like to see how well the translation goes.
2) Efficiency. It is alot quicker to
52 matches
Mail list logo