User Profile

Collapse

Profile Sidebar

Collapse
Raj4perl
Raj4perl
Last Activity: Aug 4 '16, 10:17 AM
Joined: Aug 11 '14
Location: Hyderabad
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Unable to Save Screenshots with dynamic name using image.grab() in PIL library

    import sys
    import time
    import os
    from PIL import ImageGrab

    print("Enter time interval to take screenshot")
    time_int = 3
    print("Time interval entered is %(time)d" %{"time":time_i nt})
    img = ImageGrab.grab( )
    localtime = time.asctime( time.localtime( time.time()) )
    localtime = localtime.repla ce(" ","_")
    environ = os.environ...
    See more | Go to post

  • cpan App::cpanminus

    Does it works?
    See more | Go to post

    Leave a comment:


  • Raj4perl
    started a topic tuples reading issue

    tuples reading issue

    Hi,

    Can you help me with this

    File contains first 500 lines. each has a header around 3 pages then you may find footer with some column names like "Total,..."

    Image contains actual data. I need to split the file with respect to pages & account num (can get the account from each page 10 line)

    I have written a udf which reads tuples of the whole file and gets the output as...
    See more | Go to post

  • Can anyone help me suggesting H1B sponsors (consultants)

    I'm looking for H1B sponsors (consultants)
    See more | Go to post

  • Hi Hari,

    here's the script for following output. There is a small error in the output.. couldn't fix it... :(

    it could be great if you can explain the logic behind the generation of output.!!

    Code:
    use warnings;
    @values = 0;
    $file = "input.txt";
    open HNDL, "$file" or die "Unable to open the text file";
    
    unlink "output_f.txt";
    $out_file
    ...
    See more | Go to post
    Last edited by Rabbit; Aug 15 '14, 10:39 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Leave a comment:


  • Raj4perl
    replied to removing spaces from the input text
    in Perl
    OK.. anyways.. it's working now..Thanks a lot..!!
    See more | Go to post

    Leave a comment:


  • Raj4perl
    replied to removing spaces from the input text
    in Perl
    Thanks Vinoth.. That's the problem.. I have tried saving the file in ANSI encoding format and now it's working..

    But, I think we need a encoding module to be dowloaded right?
    See more | Go to post

    Leave a comment:


  • Raj4perl
    replied to removing spaces from the input text
    in Perl
    1.What is the perl version you are using ?
    Perl 5.16

    2.How you code this 1.txt file, which generated by any other scripts ?
    it's an internal tool generated from batch file

    3.If you are from linu/unix execute this "file 1.txt" and let me know the output.
    I'm using Windows

    -Raj
    See more | Go to post

    Leave a comment:


  • Raj4perl
    replied to removing spaces from the input text
    in Perl
    1.First confirm that "1 0 0" comes in the second line only.
    [Raj] Yes, 1 0 0 comes in the second line itself

    2.From your sample input, I can see that, 100 spaces removed already?
    [Raj] In the text file spaces are not there. But, when you read it to a variable by using above script.. the variable is storing with a space for each character.

    Even if i print first line, output will be

    X X...
    See more | Go to post

    Leave a comment:


  • Raj4perl
    replied to how to automate vlc player using perl script
    in Perl
    Hi Siva,

    Why do you want to run VLC in perl itself.?

    Give a try with simple batch file.

    1.Open VLC through cmd line and throw url as an argument
    2.give timedelay
    3.taskill from tray to close it

    If you use hotkey, you may not be able to control app when it runs in the background

    -Raj
    See more | Go to post

    Leave a comment:


  • Raj4perl
    replied to removing spaces from the input text
    in Perl
    Hi Vino,

    Thanks for the reply..!!

    here's the content.. I'm sending you little part of it.

    --content in text file --

    "XXXXXXXXXXXRem aining
    100 "

    these are the first two lines of the text file
    See more | Go to post

    Leave a comment:


  • Raj4perl
    started a topic removing spaces from the input text
    in Perl

    removing spaces from the input text

    open(HNDL, "1.txt") or die "Cannot open text file";

    while (<HNDL>)
    {
    if($.==2)
    {
    print $_;
    $_ =~ s/\s//g;
    print "after removing spaces $. :",$_;
    }
    }

    output --
    " 1 0 0 "

    Actually, I need it as "100". So that I can perform some arithmetic operations.

    Excuse if there is silly mistakes...
    See more | Go to post
No activity results to display
Show More
Working...