Ross writes:
> If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to
> return a new list of each individual element in these tuples, I can do
> it with a nested for loop but when I try to do it using the list
> comprehension b = [j for j in i for i in a], my output is b =
> [5,5,5,6
Dale Amon writes:
> Now I can move on to parsing those pesky Fortran card
> images... There wouldn't happen to be a way to take n
> continguous slices from a string (card image) where each
> slice may be a different length would there? Fortran you
> know. No spaces between input fields. :-)
>
>
On Apr 18, 4:21 pm, eric.le.bi...@spectro.jussieu.fr wrote:
> On Apr 15, 5:33 pm, Arnaud Delobelle wrote:
>
> I adjusted your code in a few ways, and put the result
> athttp://code.activestate.com/recipes/576721/(with due credit):
>
> 1) There was a strange behavior, which is fixed (by performing
I am writing a program that involves visiting several hundred webpages
and extracting specific information from the contents. I've written a
modest 'test' example here that uses a multi-threaded approach to
reach the urls with urllib2. The actual program will involve fairly
elaborate scraping and p
On 01May2009 08:37, I wrote:
| On 30Apr2009 22:57, MRAB wrote:
| > The producer could send just one None to indicate that it has finished
| > producing.
| > Each consumer could get the data from the queue, but if it's None then
| > put it back in the queue for the other consumer, then clean up and
Hello,
Im not adding any GUI elements from the changer thread. Im just
attempting to change the value of a preexisting widget made in thread
one. The point is that i need to display text generated in thread 2 in
a GUI generated in thread 1.
As far as inter thread synchronization is concerned, i see
Soumen banerjee wrote:
Hello,
you say that frame_1 is an attribute of the main class. The main
class here is guithread right? so any instance of guithread should
also have an attribute called frame_1 isnt it? Excuse me if im getting
this wrong, since i am somewhat new to python.
Regards
Soumen
In message , Steven
D'Aprano wrote:
> The reason why Lawrence's insistence is so badly wrong becomes more
> apparent if you look at what you can do with boolean contexts other than
> simple `if` tests. Compare:
>
>
> for x in a or b or c:
> do_something_with(x)
>
>
> versus:
>
>
> if le
Hello,
Another thing, here i tried changing self.frame_1 to
guithread.frame_1, so that that part of the code now reads:-
import wx,gui,threading
class guithread(threading.Thread):
def run(self):
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
guithread.frame_1 = gui.M
On Apr 30, 10:11 am, Lawrence Hanser wrote:
> Dear Pythoners,
>
> I think I do not yet have a good understanding of namespaces. Here is
> what I have in broad outline form:
>
>
> import Tkinter
>
> Class App(Frame)
> define two frames, buttons in one and
Hello,
you say that frame_1 is an attribute of the main class. The main
class here is guithread right? so any instance of guithread should
also have an attribute called frame_1 isnt it? Excuse me if im getting
this wrong, since i am somewhat new to python.
Regards
Soumen
On Fri, May 1, 2009 at 9:
On Apr 30, 9:54 pm, Soumen banerjee wrote:
> Hello,
> I am using wxglade to design a gui which i am using in another script.
> Here are the codes
>
> The main file:
> import wx,gui,threading
> class guithread(threading.Thread):
> def run(self):
> app = wx.PySimpleApp(0)
> wx.InitA
hello,
Lie Ryan wrote:
There has never been print-with-formatting in python, what we have is
the % string substitution operator, which is a string operation instead
of print operation.
Yes, I see that now, thanks for clarifying it. I guess I thought
so because I've always associated the % f
Hi!
prueba...@latinmail.com wrote:
There is also the Template class in the stdlib string module, for unix
shell/perl style "formatting".
The old mod (%) formatting will be around in 3.1 and that version not
even out yet, so it will be around for a couple more years at the very
least.
<...>
alex23 wrote:
On Apr 30, 5:33 pm, "Gabriel Genellina"
wrote:
(doesn't work as written, because [...]
Man, I don't get Python... I can write a program that runs properly on
the first try but every time I post untested code to c.l.p I regret
it...
Which is why I either cut&paste working code
Hello,
I am using wxglade to design a gui which i am using in another script.
Here are the codes
The main file:
import wx,gui,threading
class guithread(threading.Thread):
def run(self):
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
self.frame_1 = gui.MyFrame(None, -1, "
En Thu, 30 Apr 2009 21:10:12 -0300, alex23 escribió:
On Apr 30, 5:33 pm, "Gabriel Genellina" wrote:
(doesn't work as written, because [...]
Man, I don't get Python... I can write a program that runs properly on
the first try but every time I post untested code to c.l.p I regret
it...
Most
Ross wrote:
If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to
return a new list of each individual element in these tuples, I can do
it with a nested for loop but when I try to do it using the list
comprehension b = [j for j in i for i in a], my output is b =
[5,5,5,6,6,6] inste
On Thu, Apr 30, 2009 at 5:56 PM, Ross wrote:
> If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to
> return a new list of each individual element in these tuples, I can do
> it with a nested for loop but when I try to do it using the list
> comprehension b = [j for j in i for i in
Lawrence Hanser wrote:
Dear Pythoners,
I think I do not yet have a good understanding of namespaces. Here is
what I have in broad outline form:
import Tkinter
Class App(Frame)
define two frames, buttons in one and Listbox in the other
Class App2(Fra
If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to
return a new list of each individual element in these tuples, I can do
it with a nested for loop but when I try to do it using the list
comprehension b = [j for j in i for i in a], my output is b =
[5,5,5,6,6,6] instead of the corr
En Thu, 30 Apr 2009 14:33:38 -0300, Jim Carlock escribió:
I'm messing around with a program right at the moment. It
ends up as two applications, one runs as a server and one
as a client which presents a Window. It almost works, so I
need to work through it to work out it's bugs, and I'll be
rewr
Thanks.
Paul Franz
Gabriel Genellina wrote:
En Wed,
29 Apr 2009 18:15:07 -0300, Martin v. Löwis
escribió:
I can not find any directions
on how to install the version of Python build using Microsoft's
compiler.
What *is* supported is creating an MSI installer out of your build
tree. See T
Paul Franz wrote:
Mark,
The problem is that the steps are not in the readme.txt for the
building Python for Windows. The python.exe might work from the
Win32Release directory where it is compiled.
You should find the executables and DLLs directly in the PCBuild
directory (for an x86 buil
On May 1, 8:01 am, limit wrote:
> How do I get this command history filter working on the centos
> install? I see that allows history search. That is the
> workaround.
If you can, try installing & using iPython instead:
http://ipython.scipy.org/
Along with a wealth of other useful features, it
Thanks.
Paul Franz
Martin v. Löwis wrote:
I have looked and looked and looked. But I can not find any directions
on how to install the version of Python build using Microsoft's
compiler. It builds. I get the dlls and the exe's. But there is no
documentation that says how to install what has be
Дамјан Георгиевски wrote:
I'm writing a script that should modify ODF files. ODF files are just
.zip archives with some .xml files, images etc.
So far I open the zip file and play with the xml with lxml.etree, but
I can't replace the files in it.
Is there some recipe that does this ?
I ended
Mark,
The problem is that the steps are not in the readme.txt for the
building Python for Windows. The python.exe might work from the
Win32Release directory where it is compiled. But I would like to have it
create the distuils directory, and other python packages that are
normally part of
On Apr 30, 5:33 pm, "Gabriel Genellina"
wrote:
> (doesn't work as written, because [...]
Man, I don't get Python... I can write a program that runs properly on
the first try but every time I post untested code to c.l.p I regret
it...
Thanks, Gabriel :)
--
http://mail.python.org/mailman/listinfo
> I'm writing a script that should modify ODF files. ODF files are just
> .zip archives with some .xml files, images etc.
>
> So far I open the zip file and play with the xml with lxml.etree, but
> I can't replace the files in it.
>
> Is there some recipe that does this ?
I ended writing this, p
I attached a clean copy of the .py file in case others couldn't read
it in their emails.
I'll try that and let you know how SIGRTMIN+1 goes!
What about this part?
#sigemptyset(&act.sa_mask);
#python2.6 has byref(act, offset),how can i port this over?
#maybe addressof(act)+sizeof(sigaction.sa_mask)
ma gmail.com> writes:
>
>
>
>
> Here's something that I came up with so far, I'm having some issues with
segfaulting, if I want to pass a struct member by ref in ctypes(see below), if
not, I just get a
> "Real-time signal 0" sent back to me.
>
>
> Any ideas?
Try "SIGRTMIN+1", per http://s
In article ,
Steven D'Aprano wrote:
>On Wed, 29 Apr 2009 12:25:46 -0700, Iamanalien wrote:
>>
>> how can i list all the variables that i am using?
>
>You can't.
>
>What you can do though is list all the available names that Python knows
>about, whether you are using them or not, by using the di
Martin v. Löwis wrote:
How do get a printable unicode version of these path strings if they
contain none unicode data?
Define "printable". One way would be to use a regular expression,
replacing all codes in a certain range with a question mark.
What I mean by printable is that the string must
On Apr 30, 3:25 pm, MRAB wrote:
> You're running Python in a console/shell window. Python calls the
> console for a line of input and the call doesn't return until the
> Enter/carriage return key is pressed. All the fancy history stuff is a
> feature of the console, not Python.
Understood, thank
At the risk of self-promotion, you may want to try this recipe . Then just do
the following:
>>> @C_function("/home/luca/Desktop/luca/progetti_eric/Pico/libusbtc08-1.7.2/src/.libs/libusbtc08.so")
... def usb_tc08_get_single(handle: "c_short", temp: "*c_float",
overflow_flags: "*c_short", units: "
On Apr 30, 11:48 am, John Nagle wrote:
> def draininput(self) : # consume any queued input
> try:
> while True :
> ch = self.inqueue.get_nowait() # get input, if any
> except Queue.Empty: # if empty
> return
Steven D'Aprano wrote:
> There are 4,294,967,296 integers that can be represented in 32 bits. Only
> one of them represents zero.
Or you can even define it as not including zero... ;)
--
JanC
--
http://mail.python.org/mailman/listinfo/python-list
lumns of card are for
sequencing the cards in case you (or someone) dropped the deck. Last 6
columns for sequence on green bar as I recall. (decks numbers additive)
The advantage of using the .dbf is it creates a user friendly file.
Excel, well - almost any spread sheet or database program.
On 30Apr2009 22:57, MRAB wrote:
> Luis Zarrabeitia wrote:
>> The problem: when there is no more data to process, how can I signal
>> the consumers to consume until the queue is empty and then stop
>> consuming? I need them to do some clean-up work after they finish (and
>> then I need the main
limit wrote:
Oops, pardon the double-post.
Doesn't python invoke its own shell? On windows I start by running c:
\WINDOWS\system32\cmd.exe. But then I run 'python' and get the ">>>"
prompt. The same thing happens from a bash or tcsh shell on Linux,
right? Are you saying that OS-specific shell ca
Oops, pardon the double-post.
Doesn't python invoke its own shell? On windows I start by running c:
\WINDOWS\system32\cmd.exe. But then I run 'python' and get the ">>>"
prompt. The same thing happens from a bash or tcsh shell on Linux,
right? Are you saying that OS-specific shell capabilities are
Hello,
On WindowsXP with Python 2.5.1 (from the python-2.5.1.msi): when I'm
at the python prompt, up-arrow scrolls through the command history. If
I type group of characters first, up-arrow shows only the previous
commands that start with that group of characters.
On CentOS 5 with Python 2.5.4 (t
Luis Zarrabeitia wrote:
Hi. I'm building a script that closely follows a producer-consumer model. In
this case, the producer is disk-bound and the consumer is cpu-bound, so I'm
using the multiprocessing module (python2.5 with the multiprocessing backport
from google.code) to speed up the proces
Terry Reedy wrote:
Dale Amon wrote:
Now I can move on to parsing those pesky Fortran card
images... There wouldn't happen to be a way to take n
continguous slices from a string (card image) where each slice may be
a different length would there? Fortran you know. No spaces between
input field
John Nagle wrote:
> Linux doesn't do interprocess communication very well.
> The options are pipes (clunky), sockets (not too bad, but
> excessive overhead), System V IPC (nobody uses
> that) and shared memory (unsafe).
+ dbus
--
JanC
--
http://mail.python.org/mailman/listinfo/python-list
deostroll wrote:
> I just found that you could use platform.system() to get the
> underlying os used. But is there a way to get the distro used...?
Major modern distros support 'lsb_release', I suppose:
$ lsb_release -i -r -c -d
Distributor ID: Ubuntu
Description:Ubuntu 9.04
Release:
Robert Dailey wrote:
urlgrabber 3.1.0 currently does not support Python 3.0.
URLs are nice. I presume you mean the package at
http://linux.duke.edu/projects/urlgrabber/
Development appears to have stopped over two years ago with the 3.1.0
release, which was for 2.3-2.5.
> Is there a versi
On 30 Apr 2009, at 21:06, Martin v. Löwis wrote:
How do get a printable unicode version of these path strings if
they
contain none unicode data?
Define "printable". One way would be to use a regular expression,
replacing all codes in a certain range with a question mark.
What I mean by pr
Guido intends that the new str.format and associated facilities
eventually replace the old % formatting operator. But when? (Why is a
different question discussed elsewhere, but includes elimination of a
couple of problems and greatly increased flexibility and extendibility.)
A few month ago,
Scott David Daniels wrote:
Marco Mariani wrote:
What you call "code completion" cannot work in many cases with dynamic
languages. Nobody knows which methods are available to an object until
the program is running I must admit that I've never used
completion of anything while developing. I
Hi. I'm building a script that closely follows a producer-consumer model. In
this case, the producer is disk-bound and the consumer is cpu-bound, so I'm
using the multiprocessing module (python2.5 with the multiprocessing backport
from google.code) to speed up the processing (two consumers, one
Dale Amon wrote:
Now I can move on to parsing those pesky Fortran card
images... There wouldn't happen to be a way to take n
continguous slices from a string (card image) where each
slice may be a different length would there? Fortran you
know. No spaces between input fields. :-)
I know a wa
Marco Mariani wrote:
Mario wrote:
I used JCreator LE, java IDE for windows because, when I add
documentation of some new library, I have it on a F1 and index. So how
you manage documentation and code completion ? I asume that you are
geek but not even geeks could know every method of every cl
>>> How do get a printable unicode version of these path strings if they
>>> contain none unicode data?
>>
>> Define "printable". One way would be to use a regular expression,
>> replacing all codes in a certain range with a question mark.
>
> What I mean by printable is that the string must be va
On Apr 30, 2:00 pm, Sneaky Wombat wrote:
> quick update,
>
> #change this line:
> for (k,v) in zip(header,[[]]*len(header)):
> #to this line:
> for (k,v) in zip(header,[[],[],[],[]]):
>
> and it works as expected. Something about the [[]]*len(header) is
> causing the weird behavior. I'm probably
On 30 Apr 2009, at 05:52, Martin v. Löwis wrote:
How do get a printable unicode version of these path strings if they
contain none unicode data?
Define "printable". One way would be to use a regular expression,
replacing all codes in a certain range with a question mark.
What I mean by prin
Good evening Nick
Thank you for answer I will study your code and learn from it.
I subscribed to the wxPython users mailing list which is for my actual
questions probably the more accurate place.
But I always apreciate that when I post even a probably simple
question I always get an answer from thi
Sneaky Wombat writes:
> I'm really confused by what is happening here. If I use zip(), I
> can't update individual dictionary elements like I usually do. It
> updates all of the dictionary elements. It's hard to explain, so here
> is some output from an interactive session:
>
> In [52]: header
urlgrabber 3.1.0 currently does not support Python 3.0. Is there a
version out there that does support this? Perhaps Python 3.0 now has
built in support for this? Could someone provide some guidance here?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Sneaky Wombat wrote:
quick update,
#change this line:
for (k,v) in zip(header,[[]]*len(header)):
#to this line:
for (k,v) in zip(header,[[],[],[],[]]):
and it works as expected. Something about the [[]]*len(header) is
causing the weird behavior. I'm probably using it wrong, but if
anyone can
Thanks! That certainly explains it. This works as expected.
columnMap={}
for (k,v) in zip(header,[[] for i in range(len(header))]):
#print "%s,%s"%(k,v)
columnMap[k] = v
columnMap['a'].append('test')
(sorry about the double post, accidental browser refresh)
On Apr 30, 1:09 pm, Chris
Kurt Mueller wrote:
on a Linux system and python 2.5.1 I have the
following behaviour which I do not understand:
case 1
python -c 'a="ä"; print a ; print a.center(6,"-") ; b=unicode(a, "utf8"); print
b.center(6,"-")'
ä
--ä--
--ä---
To discover what is happening, try something like:
python
Aaron Brady wrote:
Um, that's the limit of what I'm familiar with, I'm afraid. I'd have
to experiment.
On Apr 28, 10:44 am, Way wrote:
Thanks a lot for the reply. I am not familiar with multi-process in
Python. I am now using something like:
snip
However, in this case, Process5's stdout can
def draininput(self) : # consume any queued input
try:
while True :
ch = self.inqueue.get_nowait() # get input, if any
except Queue.Empty: # if empty
return # done
"self.inqueue" is a Queue object.
quick update,
#change this line:
for (k,v) in zip(header,[[]]*len(header)):
#to this line:
for (k,v) in zip(header,[[],[],[],[]]):
and it works as expected. Something about the [[]]*len(header) is
causing the weird behavior. I'm probably using it wrong, but if
anyone can explain why that would
> On Apr 30, 12:45 pm, Sneaky Wombat <> wrote:
>> I'm really confused by what is happening here. If I use zip(), I
>> can't update individual dictionary elements like I usually do. It
>> updates all of the dictionary elements. It's hard to explain, so here
>> is some output from an interactive s
quick update,
#change this line:
for (k,v) in zip(header,[[]]*len(header)):
#to this line:
for (k,v) in zip(header,[[],[],[],[]]):
and it works as expected. Something about the [[]]*len(header) is
causing the weird behavior. I'm probably using it wrong, but if
anyone can explain why that would
> Omita (O) wrote:
>O> Long story short... I am installing Python 2.6 on OSX. By default the
>O> Library is installing here:
>O> /Library/Frameworks/Python.framework
>O> However, as I am using OSX Server I would ideally like the location to
>O> be here:
>O> /System/Library/Frameworks/Pyth
En Thu, 30 Apr 2009 08:00:07 -0300, Li Wang escribió:
I want to measure the actual memory cost of a particular step in my
program
(Python program), does anyone know if there is some function in Python
could
help me to do this job? Or should I seek other tools to help me?
It's hard to comp
Kurt Mueller wrote:
Hi,
on a Linux system and python 2.5.1 I have the
following behaviour which I do not understand:
case 1
python -c 'a="ä"; print a ; print a.center(6,"-") ; b=unicode(a, "utf8"); print
b.center(6,"-")'
ä
--ä--
--ä---
case 2
- an UnicodeEncodeError in this case:
p
I'm really confused by what is happening here. If I use zip(), I
can't update individual dictionary elements like I usually do. It
updates all of the dictionary elements. It's hard to explain, so here
is some output from an interactive session:
In [52]: header=['a','b','c','d']
In [53]: columnM
"Astley Le Jasper" wrote...
: Gosh ... it's all gone quite busy about logging in, gui
: etc. Certainly, I would try to make it clearer what is
: free and what isn't.
Problems with their website probably means more problems to
come...
1) The website does not fit on one page.
2) It's a lot of yack
On Apr 30, 11:55 am, Kurt Mueller wrote:
> Hi,
>
> on a Linux system and python 2.5.1 I have the
> following behaviour which I do not understand:
>
> case 1> python -c 'a="ä"; print a ; print a.center(6,"-") ; b=unicode(a,
> "utf8"); print b.center(6,"-")'
>
> ä
> --ä--
> --ä---
>
>
Weird. What
MRAB wrote:
Дамјан Георгиевски wrote:
I'm writing a script that should modify ODF files. ODF files are just
.zip archives with some .xml files, images etc.
So far I open the zip file and play with the xml with lxml.etree, but
I can't replace the files in it.
Is there some recipe that does thi
Marco Mariani wrote:
norseman wrote:
The posting needs (its creation) ... DATE. ... The code needs to
state OS and program and version used to write it. And from there -
user beware."
Which would reduce the confusion greatly. I got the same error
message and decided it was from an incomp
Hi,
on a Linux system and python 2.5.1 I have the
following behaviour which I do not understand:
case 1
> python -c 'a="ä"; print a ; print a.center(6,"-") ; b=unicode(a, "utf8");
> print b.center(6,"-")'
ä
--ä--
--ä---
>
case 2
- an UnicodeEncodeError in this case:
> python -c 'a="ä";
On Apr 28, 1:47 pm, "Kyle T. Jones"
wrote:
> Been programming for a long time, but just starting out with Python.
> Not a professional programmer, just that guy in one of those
> organizations that won't hire a pro, instead saying "Hey, Kyle knows
> computer stuff - let's have him do this (and tha
> I want add full Unicode support in my scripts. Now I have encoutered
> theoretical
> problem with command line parameters. I can't find anything in that mater. But
> I develop solution which seems to work. Question is: Is it recommendend way to
> decode command line parameters:
>
> lFileConfig
In article ,
Lawrence D'Oliveiro wrote:
>
>--
>Lawrence "Death To Wildcard Imports" D'Oliveiro
+1 QOTW
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Ad
Stephen Hansen wrote:
I have a feeling this might start one of those uber-massive "pass by
value / reference / name / object / AIEE" threads where everyone goes
around in massive circles explaining how Python uses one or another
parameter passing paradigm and why everyone else is wrong... but..
Esmail wrote:
Hello all,
I use the print method with % for formatting my output to
the console since I am quite familiar with printf from my
C days, and I like it quite well.
There has never been print-with-formatting in python, what we have is
the % string substitution operator, which is a s
On Wed, 29 Apr 2009 20:13:32 -0400, David Robinow wrote:
> On Wed, Apr 29, 2009 at 9:29 AM, wrote:
> ...
>> To reiterate, I responded to this thread because I think Ben's posting
>> gave an unfair impression of the site and i felt the need to address
>> some misconceptions. I am sorry you failed
2009/4/30 Lie Ryan
> container[:] = sorted(container, key=getkey)
>>
>> is equivalent to:
>>
>> container.sort(key=getkey)
>>
>>
> Equivalent, and in fact better since the sorting is done in-place instead
> of creating a new list, then overwriting the old one.
Not when, as pointed out
> Omita (O) wrote:
>O> Long story short... I am installing Python 2.6 on OSX Server. By
>O> default the Python.framework is installing in /Library:
>O> /Library/Frameworks/Python.framework
>O> However, as I am using OSX Server I would ideally like the install
>O> location to be here:
>O>
luca72 wrote:
> [3x the same thing]
You should learn to calm down and wait for an answer. Even if the problem
is urgent for you, it may not be to everyone, and spamming a newsgroup will
not help to get people in a friendly mood to write a helpful reply.
This is always worth a read:
http://www.cat
Hello
I want add full Unicode support in my scripts. Now I have encoutered theoretical
problem with command line parameters. I can't find anything in that mater. But
I develop solution which seems to work. Question is: Is it recommendend way to
decode command line parameters:
lFileConfig = None
i
"Paul Franz" wrote...
: I have looked and looked and looked. But I can not find directions
: on installing the version of Python built using Microsoft's
: compiler. It builds. I get the dlls and the exe's. But there is no
: documentation that says how to install what has been built. I have
: read
On Apr 30, 9:11 am, Lawrence Hanser wrote:
> Dear Pythoners,
>
> I think I do not yet have a good understanding of namespaces. Here is
> what I have in broad outline form:
>
>
> import Tkinter
>
> Class App(Frame)
> define two frames, buttons in one and
Gabriel gave me the key to a fine solution, so
just to put a bow tie on this thread:
#!/usr/bin/python
import sys
sys.path.extend (['../lib', '../bin'])
from VLMLegacy.CardReader import CardReader
rdr = CardReader ("../example/B767.dat","PRINTABLE")
iotypes = ["WINGTL","VLMPC","VLM4997"]
fo
Dale Amon wrote:
On Thu, Apr 30, 2009 at 08:32:31AM +0200, Jeroen Ruigrok van der Werven wrote:
-On [20090430 02:21], Dale Amon (a...@vnl.com) wrote:
import sys
sys.path.extend (['../lib', '../bin'])
>from VLMLegacy.CardReader import CardReader
rdr = CardReade
>
>
> * This writeup, and the virtually identical one at effbot.org that Diez
> referenced, address the *what* of default arguments, but don't really
> address the *why*, beyond the statement that "Default values are created
> exactly once, when the function is defined (by executing the *def* <
> h
On Thu, Apr 30, 2009 at 04:33:57AM -0300, Gabriel Genellina wrote:
> En Thu, 30 Apr 2009 03:04:40 -0300, alex23 escribió:
>> Are you familiar with __import__?
>>
>> iotypes = ["WINGTL","VLMPC","VLM4997"]
>> for iotype in iotypes:
>> packagename = "VLMLegacy." + iotype + ".Conditions"
>> classn
Дамјан Георгиевски wrote:
I'm writing a script that should modify ODF files. ODF files are just
.zip archives with some .xml files, images etc.
So far I open the zip file and play with the xml with lxml.etree, but I
can't replace the files in it.
Is there some recipe that does this ?
You'l
Lie Ryan wrote:
MRAB wrote:
You're almost there:
re.subn('\x61','b','')
or better yet:
re.subn(r'\x61','b','')
Wouldn't that becomes a literal \x61 instead of "a" as it is inside raw
string?
Yes. The re module will understand the \x sequence within a regular
expression.
Dear Pythoners,
I think I do not yet have a good understanding of namespaces. Here is
what I have in broad outline form:
import Tkinter
Class App(Frame)
define two frames, buttons in one and Listbox in the other
Class App2(Frame)
define one fram
On Apr 30, 8:30 am, Esmail wrote:
> Matt Nordhoff wrote:
> > Esmail wrote:
> >> Hello all,
>
> >> I use the print method with % for formatting my output to
> >> the console since I am quite familiar with printf from my
> >> C days, and I like it quite well.
>
> >> I am wondering if there is a way
On Thu, Apr 30, 2009 at 02:38:03AM -0400, Dave Angel wrote:
> As Scott David Daniels says, you have two built-in choices, depending on
> Python version. If you can use __import__(), then realize that
> mod = __import__("WINGTL")
>
> will do an import, using a string as the import name. I do
On Thu, Apr 30, 2009 at 08:32:31AM +0200, Jeroen Ruigrok van der Werven wrote:
-On [20090430 02:21], Dale Amon (a...@vnl.com) wrote:
>>import sys
>>sys.path.extend (['../lib', '../bin'])
>>
>>from VLMLegacy.CardReader import CardReader
>>
> Linuxguy123 (L) wrote:
>L> I thought that applets weren't allowed to access URLs directly. If they
>L> can, this problem becomes trivial.
They are allowed if the URL is on the same IP address as where the
applet came from (same origin policy). But in your original post you
wanted RPC.
--
1 - 100 of 144 matches
Mail list logo