On Tue, 18 Oct 2022 at 03:51, Stefan Ram wrote:
>
> MRAB writes:
> >It can't optimise that because, say, 'print' could've been bound to a
> >function that rebinds 'str'.
>
> It would be possible to find out whether a call of a function
> named "print" is to the standard function, but the over
On 2022-10-17 16:43, David Lowry-Duda wrote:
One can use the `dis` module and investigate the generated python
bytecode. For me, I get
# file "dis1.py"
thing = 123
for i in range(10):
if "hi" == str(thing):
print("found")
break
The bytecode is then
1 0 L
One can use the `dis` module and investigate the generated python
bytecode. For me, I get
# file "dis1.py"
thing = 123
for i in range(10):
if "hi" == str(thing):
print("found")
break
The bytecode is then
1 0 LOAD_CONST 0 (123)
2 STORE
On 10/14/22 16:25, DFS wrote:
> -
> this does a str() conversion in the loop
> -
> for i in range(cells.count()):
>if text == str(ID):
> break
>
>
> ---
In John Kelly
writes:
> I received Python with another install and my update software keeps
> signaling I need to install a newer version, and once I do, the older
> version is still there, so I keep getting told I need to update. Should
> I be able to uninstall the old version each time?
Yes,
On 3/31/15 10:09 AM, John Kelly wrote:
Pythonites,
I received Python with another install and my update software keeps
signaling I need to install a newer version, and once I do, the older
version is still there, so I keep getting told I need to update. Should
I be able to uninstall the old vers
On 19/10/2014 21:18, Ryan Shuell wrote:
Ok, thanks everyone. I just need to spend more time with this stuff.
It's definitely slow going.
Please don't top post on this list, thank you.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
M
Ok, thanks everyone. I just need to spend more time with this stuff. It's
definitely slow going.
On Sat, Oct 18, 2014 at 11:16 PM, Rustom Mody wrote:
> On Sunday, October 19, 2014 8:25:53 AM UTC+5:30, Ben Finney wrote:
> > Chris Angelico writes:
>
> > > Try learning Python itself, rather than
On Sunday, October 19, 2014 8:25:53 AM UTC+5:30, Ben Finney wrote:
> Chris Angelico writes:
> > Try learning Python itself, rather than playing around with extension
> > packages like pytz.
> To be fair, "You need to install 'pytz' to work correctly with date and
> time values" is correct advice.
On Sun, Oct 19, 2014 at 1:54 PM, Ben Finney wrote:
> Chris Angelico writes:
>
>> Try learning Python itself, rather than playing around with extension
>> packages like pytz.
>
> To be fair, “You need to install ‘pytz’ to work correctly with date and
> time values” is correct advice. If the OP doe
Chris Angelico writes:
> Try learning Python itself, rather than playing around with extension
> packages like pytz.
To be fair, “You need to install ‘pytz’ to work correctly with date and
time values” is correct advice. If the OP doesn't install it early, then
works with timestamps, problems ar
ryguy7272 writes:
> So, when I run it, the setup.py text file opens. Nothing runs; nothing
> installs.
You have somehow (either manually, or by answering a question to some
program) associated the ‘.py’ suffix with “Open this file in my text
editor”.
That's fine, but it means that if you don't
On Sun, Oct 19, 2014 at 1:44 PM, ryguy7272 wrote:
> I'll probably give it until the end of the year, and start learning Chinese.
> There's other things I want to do with my time. I know 10 programming
> languages. I thought it would be fun to learn Python, but after 2 months, I
> still can't
On Saturday, October 18, 2014 3:55:02 PM UTC-4, ryguy7272 wrote:
> I downloaded PYTZ and put it here.
>
> C:\Python27\pytz
>
>
>
> Now, in the cmd window, I typed this:
>
> C:\Python27\pytz\setup.py
>
>
>
> A text file opens and nothing else happens. I thought it was supposed to
> install
On 18/10/2014 20:54, ryguy7272 wrote:
I downloaded PYTZ and put it here.
C:\Python27\pytz
Now, in the cmd window, I typed this:
C:\Python27\pytz\setup.py
A text file opens and nothing else happens. I thought it was supposed to
install the PYTZ library.
What am I doing wrong?
You will end
On Sat, Oct 18, 2014 at 3:54 PM, ryguy7272 wrote:
> I downloaded PYTZ and put it here.
> C:\Python27\pytz
>
> Now, in the cmd window, I typed this:
> C:\Python27\pytz\setup.py
>
> A text file opens and nothing else happens. I thought it was supposed to
> install the PYTZ library.
>
> What am I d
On Mon, Aug 1, 2011 at 6:04 AM, Ira Gray wrote:
> I come along, write a .DLL and throw it into the program. My .dll has its
> own thread (right?),
Not unless you actually create one. A DLL is simply a puddle of code;
the application calls your code, you do whatever you do, you return.
At no time
Ok thanks. I'll avoid to do that.
--- Giampaolo
http://code.google.com/p/pyftpdlib/
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Nov 24, 2008 at 5:52 PM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote:
> Sorry for the title but I didn't find anything more appropriate.
> To have a less verbose code would it be ok doing:
>
> if a > b:
>
> ...instead of:
>
> if a is not None and a > b:
>
> ...?
> Is there any hidden compli
On Nov 24, 7:52 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
> Sorry for the title but I didn't find anything more appropriate.
> To have a less verbose code would it be ok doing:
>
> if a > b:
>
> ...instead of:
>
> if a is not None and a > b:
>
> ...?
> Is there any hidden complication behi
En/na xkenneth ha escrit:
> I want to be able to cycle through an array and print something in
> hexadecimal. Such as this
> thisArray = ["AF","0F","5F"]
> for x in range(len(thisArray)):
>print "\x" + thisArray[x]
>
> However python chokes on the escaped identifier, how can I get arou
xkenneth wrote:
> I want to be able to cycle through an array and print something in
> hexadecimal. Such as this
> thisArray = ["AF","0F","5F"]
> for x in range(len(thisArray)):
>print "\x" + thisArray[x]
>
> However python chokes on the escaped identifier, how can I get around
> this?
xkenneth a écrit :
> I want to be able to cycle through an array and print something in
> hexadecimal. Such as this
> thisArray = ["AF","0F","5F"]
> for x in range(len(thisArray)):
>print "\x" + thisArray[x]
>
> However python chokes on the escaped identifier, how can I get around
> th
I'm glad to have helped. Good luck with your project.
--
Want to play tabletop RPGs over the internet?
Check out Koboldsoft RPZen:http://www.koboldsoft.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi Dave,
Thanks for taking the time to reply to my posts. It really heped me
understand this better.
Thanks again.
Chris
--
http://mail.python.org/mailman/listinfo/python-list
Hi again. frameA in the __init__ is a parameter that is required to be
the FrameA object that is creating the FrameB. In my example, I was
assuming that the FrameB is created in a method of FrameA, so I created
it passing self as frameA:
w2 = FrameB(self, None, -1,"")
w2.Show()
--
HI Dave,
Thanks for the reply.
I am a bit confused by this piece of code:
class FrameB(wx.Frame):
def __init__(self, frameA, ...):
self.frameA = frameA
What is frameA in the __init__ definition?
Do I need to create something called frameA in order to pass it to that
__init__ func
Chris S wrote:
> Hello All,
> Just starting out with Python and wxPython. I have two Frames, FrameA
> and FrameB. FrameA opens FrameB when a button on FrameA is clicked. I
> can get this. Now I want a button on FrameB to update a control on
> FrameA. I am having an issue with this. Can anyone
A little further clarification. FrameA and FrameB are in different
modules.
Thanks.
Chris
--
http://mail.python.org/mailman/listinfo/python-list
Simon Brunning wrote:
On Mon, 7 Mar 2005 18:58:20 -0500, Leeds, Mark <[EMAIL PROTECTED]> wrote:
I want to get rid of the beginning
And ending quotes.
my_string = '"8023 "'
my_string.strip('"')
'8023 '
Note the risk in this approach, as it blindly
removes any number of leading and trailin
On Mon, 7 Mar 2005 18:58:20 -0500, Leeds, Mark <[EMAIL PROTECTED]> wrote:
>
> I have a string variable say "8023 " and
>
> I want to get rid of the beginning
>
> And ending quotes.
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "cre
--
Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 46
D-01307
Dresden
Germany
Tel : +49 (0)351 4173 154
e-mail : [EMAIL PROTECTED]
Cenix Website : http://www.cenix-bioscience.com
--- Begin Message ---
Leeds, Mark wrote:
I have a string variable say “8023 “ and
Leeds, Mark wrote:
I have a string variable say “8023 “ and
I want to get rid of the beginning
And ending quotes.
I’ve tried different things
But haven’t had any success.
I’m definitely a python hacker and
Not an expert. Thanks.
>>> x = '"This is a quoted string"'
>>> print x
"This is a
If you simply wanted to get rid of quotes entirely, you could use:
"\"Hello!\"".replace( "\"" , "" )
However, since you only want the beginning and ending quotes removed:
>>> string = "\"If thou wert my fool, nuncle...\""
>>> print string
"If thou wert my fool, nuncle..."
>>> if string.startswi
34 matches
Mail list logo