Are you traveling abroad on holiday??? Does the resort have enough information
on the internet??? Would you like to ask local people information about
attractions, good places to eat, nice places, that is, just about anything???
For this site, I have asked people around the world to join and tel
Hi
Inside a function i get a two arguments, say arg1 and arg2, how can i convert
arg2 to same type as arg1 ?
I dont know type of arg1 or arg2 for that matter, I just want to convert arg2
to type of arg1 if possible and handle the exception if raised.
Also:
>>> int('2')
2
>>> float('2.0')
2.0
>>>
On Sat, Feb 9, 2013 at 9:29 PM, Vijay Shanker wrote:
> Hi
> Inside a function i get a two arguments, say arg1 and arg2, how can i convert
> arg2 to same type as arg1 ?
> I dont know type of arg1 or arg2 for that matter, I just want to convert arg2
> to type of arg1 if possible and handle the exc
This seems to return a bytes object in Python 3.3.0. I was expecting a
string. The documentation here:
http://docs.python.org/3/library/binascii.html#binascii.hexlify
also keeps me expecting a string. Am I missing something?
Example:
[hg/css-venti-bytes+utf8]fleet*2> python3
Python 3.3.0
Hi *Monte-Pythons*,
x = "this is a simple : text: that has colon"
s = x.replace(string.punctuation, ""); OR
s = x.replace(string.punctuation, "");
print x # 'this is a simple : text: that has colon'
# The colon is still in the text
Is this a bug or am I doing something wrong ?
Py.Version
Cameron Simpson wrote:
> This seems to return a bytes object in Python 3.3.0. I was expecting a
> string. The documentation here:
>
> http://docs.python.org/3/library/binascii.html#binascii.hexlify
>
> also keeps me expecting a string. Am I missing something?
"""Return the hexadecimal represe
On Sat, Feb 9, 2013 at 10:04 PM, Joshua Robinson
wrote:
> Hi Monte-Pythons,
>
> x = "this is a simple : text: that has colon"
> s = x.replace(string.punctuation, ""); OR
> s = x.replace(string.punctuation, "");
> print x # 'this is a simple : text: that has colon'
> # The colon is still in the
Hello.
I found strange behavior of curses module, that i can't understand. I
initialize screen with curses.initscr(), then i create subwin of screen with
screen.subwin(my_subwin_sizes). After that i fill subwin with my_char in
for-loop. On last char in last line subwin.addch() raises exception.
On Saturday, February 9, 2013 4:13:28 PM UTC+5:30, Chris Angelico wrote:
> On Sat, Feb 9, 2013 at 9:29 PM, Vijay Shanker wrote:
>
> > Hi
>
> > Inside a function i get a two arguments, say arg1 and arg2, how can i
> > convert arg2 to same type as arg1 ?
>
> > I dont know type of arg1 or arg2 fo
On Sat, Feb 9, 2013 at 10:10 PM, Peter Otten <__pete...@web.de> wrote:
> """Return the hexadecimal representation of the binary data. Every byte of
> data is converted into the corresponding 2-digit hex representation.
> """
>
> makes it pretty clear that the function is operating on bytes, not str
On Sat, Feb 9, 2013 at 10:23 PM, Vlasov Vitaly wrote:
> Hello.
>
> I found strange behavior of curses module, that i can't understand. I
> initialize screen with curses.initscr(), then i create subwin of screen with
> screen.subwin(my_subwin_sizes). After that i fill subwin with my_char in
> fo
On Sat, Feb 9, 2013 at 10:23 PM, Vijay Shanker wrote:
> well it will always return me this:
>
>
> what i want is if i know arg1 is of string type(and it can be of any type,
> say list, int,float) and arg2 is of any type, how can i convert it to type of
> arg1,
> if arg1='hello world', type(arg1
Are there any opensource alternatives to Splunk?
Need tool to analyze the log files..
--
http://mail.python.org/mailman/listinfo/python-list
суббота, 9 февраля 2013 г., 15:28:51 UTC+4 пользователь Chris Angelico написал:
> On Sat, Feb 9, 2013 at 10:23 PM, Vlasov Vitaly wrote:
>
> > Hello.
>
> >
>
> > I found strange behavior of curses module, that i can't understand. I
> > initialize screen with curses.initscr(), then i create subw
Here is the fucked up thing that I learned from all the hours of reading from
different websites and documentation.
To install Pip I need to install Easy_Install--> To install Easy_install I need
to install Setup Tools whitch is NOT compatible with Python 3.XX ... If PIP is
a replacement for Ea
On Sat, Feb 9, 2013 at 1:55 PM, Robert Iulian wrote:
> Here is the fucked up thing that I learned from all the hours of reading from
> different websites and documentation.
>
> To install Pip I need to install Easy_Install--> To install Easy_install I
> need to install Setup Tools whitch is NOT
Ah...Must have slipped that. It worked!
Thank you all for the support ! Be well !
Robert
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Feb 9, 2013 at 7:27 AM, sssdevelop wrote:
> Are there any opensource alternatives to Splunk?
> Need tool to analyze the log files..
>
>
This is highly off topic, however I'm using logstash + kibana for my log
analysis.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
ht
On 02/09/2013 09:27 AM, Morten Engvoldsen wrote:
Hi Team,
I Have saved my output in .doc file and want to format the output with
*Start the File
Some data here
***End of File*
Can you let me know how can i do th
On Sat, 9 Feb 2013 15:27:16 +0100
Morten Engvoldsen wrote:
> I Have saved my output in .doc file and want to format the output with
>
> *Start the File
>
> Some data here
>
>
> ***End of File*
>
> Can you let me
Hi Cain,
Thanks for your reply. I am stroning all the contents in "batchdate" and
then,
data = base64.encodestring(batchdata)
and then writing "data" in doc file.
I know i can append "***Start file***" in the
batchdata, but is there a better python code like multiply * into
Morten Engvoldsen wrote:
> I know i can append "***Start file***" in the
> batchdata, but is there a better python code like multiply * into 10 times
> -- any python code i can add the formatting in dynamic way instead of
> hardcoding with "***Start file***
Hi Davea,
I am using Python 2.7.
--
http://mail.python.org/mailman/listinfo/python-list
Hello, I am trying to run this code, but I get an answer incorrect arguments
numbers. someone could put an example of arguments for me to use in the / var /
log?
Thank you.
import os, sys
from optparse import OptionParser
In article <1de56e5b-4f9b-477d-a1d4-71e7222a2...@googlegroups.com>,
Cleuson Alves wrote:
> Hello, I am trying to run this code, but I get an answer incorrect arguments
> numbers. someone could put an example of arguments for me to use in the / var
> / log?
Since the first cave man tried to so
On Feb 9, 7:27 pm, Morten Engvoldsen wrote:
> Hi Team,
> I Have saved my output in .doc file and want to format the output with
>
> *Start the File
>
> Some data here
>
> ***End of File*
>
> Can you let me know how ca
On 02/09/2013 10:01 AM, Morten Engvoldsen wrote:
Hi Davea,
I am using Python 2.7.
Sorry, I should have noticed the python version in the subject line, but
didn't until this reply.
How about print >> outfile, "Start the File".center(55, "*")
after creating the file, and
print >> outfile, "
Yup - its off topic. I was triggered to write here because Splunk is written in
Python. And Python is good at Parsing/Regex.
Thank you for your response about logstash, kibana. I was looking for such
tools only - thank you so much.
---sss
On Saturday, February 9, 2013 7:05:57 PM UTC+5:30, R
Look up any nosql database. At it's heart that is what splunk is built on.
Or, if you're working with less than 500mb of data a day, just use the free
version of splunk.
On Sat, Feb 9, 2013 at 12:09 PM, sssdevelop wrote:
> Yup - its off topic. I was triggered to write here because Splunk is
> w
On 09/02/2013 14:27, Morten Engvoldsen wrote:
Hi Team,
I Have saved my output in .doc file and want to format the output with
*Start the File
Some data here
***End of File*
Can you let me know how can i do that using
On 2/9/2013 6:23 AM, Vlasov Vitaly wrote:
Hello.
I found strange behavior of curses module, that i can't understand. I
initialize screen with curses.initscr(), then i create subwin of
screen with screen.subwin(my_subwin_sizes). After that i fill subwin
with my_char in for-loop. On last char in l
On 2/9/2013 11:21 AM, rusi wrote:
On Feb 9, 7:27 pm, Morten Engvoldsen wrote:
Hi Team,
I Have saved my output in .doc file and want to format the output with
*Start the File
Some data here
***End of File*
Can y
On 09Feb2013 22:26, Chris Angelico wrote:
| On Sat, Feb 9, 2013 at 10:10 PM, Peter Otten <__pete...@web.de> wrote:
| > """Return the hexadecimal representation of the binary data. Every byte of
| > data is converted into the corresponding 2-digit hex representation.
| > """
| >
| > makes it pretty
sssdevelop wrote:
> Are there any opensource alternatives to Splunk?
> Need tool to analyze the log files..
Is Google blocked where you are?
How about other search engines like DuckDuckGo, Bling, Yahoo, etc? Surely
*some* search engine must work.
If not, I suggest asking on a mailing list for
Vijay Shanker wrote:
> Hi
> Inside a function i get a two arguments, say arg1 and arg2, how can i
> convert arg2 to same type as arg1 ? I dont know type of arg1 or arg2 for
> that matter, I just want to convert arg2 to type of arg1 if possible and
> handle the exception if raised.
How do you pr
Grant Edwards wrote:
>
>IMO, a "scripting language" is used to automate tasks that would
>otherwise be done by a human sitting at a keyboard typing commands.
>[Perhaps that definition should be extended to include tasks that
>would otherwise by done by a human sitting and clicking on a GUI.]
I th
On 02/09/2013 04:26 PM, Tim Roberts wrote:
> Most people would call bash a "scripting language", but it is also clearly
> a programming language. It has syntax, variables and expressions. I
> suspect it is Turing-complete, although I haven't seen a proof of that.
>
> I would assert that scriptin
On 2/9/2013 6:53 PM, Michael Torrie wrote:
On 02/09/2013 04:26 PM, Tim Roberts wrote:
Most people would call bash a "scripting language", but it is also clearly
a programming language. It has syntax, variables and expressions. I
suspect it is Turing-complete, although I haven't seen a proof of
On 2/9/2013 6:26 PM, Tim Roberts wrote:
Grant Edwards wrote:
IMO, a "scripting language" is used to automate tasks that would
otherwise be done by a human sitting at a keyboard typing commands.
[Perhaps that definition should be extended to include tasks that
would otherwise by done by a human
On 02/09/2013 07:40 PM, Terry Reedy wrote:
> If the language has arrays, conditional execution, and explicit (while)
> loops or recursion, you can be pretty sure it is Turing complete. I
> presume this covers awk and bash. Something like the game of Life, where
> the looping in implicit in the o
On Fri, 08 Feb 2013 21:04:33 -0800, Victor Hooi wrote:
> I have a Python script that I'd like to spawn a separate process (SSH
> client, in this case), and then have the script exit whilst the process
> continues to run.
>
> I looked at Subprocess, however, that leaves the script running, and it'
On Friday, February 8, 2013 9:36:52 PM UTC-6, Steven D'Aprano wrote:
> Rick Johnson wrote:
>
> > The solution is simple. Do not offer the "copy-mutate" methods and force
> > all mutation to happen in-place:
> >
> > py> l = [1,2,3]
> > py> l.reverse
> > py> l
> > [3,2,1]
> >
> > If the user wants
On Sun, Feb 10, 2013 at 2:54 PM, Rick Johnson
wrote:
> My point was this: All mutate methods should mutate "in-place", if the
> programmer wishes to create a mutated copy of the object, then the programmer
> should /explicitly/ create a copy of the object and then apply the correct
> mutator me
On Friday, February 8, 2013 11:01:00 PM UTC-6, Chris Angelico wrote:
> [...]
> Another advantage of using two characters: There's no conflict between
> set and dict literals. How do you notate an empty set in Python? {}
> means an empty dict.
What makes you believe that a language must provide lit
On Sun, Feb 10, 2013 at 3:26 PM, Rick Johnson
wrote:
> On Friday, February 8, 2013 11:01:00 PM UTC-6, Chris Angelico wrote:
>> [...]
>> Another advantage of using two characters: There's no conflict between
>> set and dict literals. How do you notate an empty set in Python? {}
>> means an empty di
On Sat, Feb 9, 2013 at 8:20 PM, Chris Angelico wrote:
> On Sun, Feb 10, 2013 at 2:54 PM, Rick Johnson
> wrote:
>> My point was this: All mutate methods should mutate "in-place", if the
>> programmer wishes to create a mutated copy of the object, then the
>> programmer should /explicitly/ create
On Friday, February 8, 2013 7:17:26 PM UTC-6, Chris Angelico wrote:
> On Sat, Feb 9, 2013 at 11:49 AM, Rick Johnson
> > nested_list = array(array(string))
>
> Actually, that's not a declaration, that's an assignment; and in Pike,
> a 'type' is a thing, same as it is in Python (though not quite).
On Sun, Feb 10, 2013 at 3:54 PM, Rick Johnson
wrote:
> Well Chris i have wonderful news for you! Python /does/ have "homogenous
> arrays", and they're called, wait for it. arrays! Imagine that!
That's not a built-in. But you were the one who complained about the
way sum() could be applie
On Friday, February 8, 2013 7:06:34 PM UTC-6, Ian wrote:
> On Fri, Feb 8, 2013 at 12:58 PM, Rick Johnson
> wrote:
> > I'm a bit unnerved by the sum function. Summing a
> > sequence only makes sense if the sequence in question
> > contains /only/ numeric types. For that reason i decided
> > to crea
Hi Dave,
This sounds great, thanks for your help :)
On Sat, Feb 9, 2013 at 6:13 PM, Dave Angel wrote:
> On 02/09/2013 10:01 AM, Morten Engvoldsen wrote:
>
>> Hi Davea,
>> I am using Python 2.7.
>>
>>
> Sorry, I should have noticed the python version in the subject line, but
> didn't until this r
50 matches
Mail list logo